warning in I.h from gcc 4.6.3 with -Wall
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nana (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu 12.04 LTS
Release: 12.04
nana:
Installed: 2.5-12
Candidate: 2.5-12
Version table:
*** 2.5-12 0
500 http://
100 /var/lib/
This test file:
--- BEGIN ---
#include "eiffel.h"
int main(int argc, char** argv)
{
ENSURE(true);
return 0;
}
--- END ---
when compiled with gcc 4.6.3: `g++ -Wall nana_test.cc`, gets the following warnings:
nana_test.cc: In function ‘int main(int, char**)’:
nana_test.cc:5:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
nana_test.cc:5:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
nana_test.cc:5:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
nana_test.cc:5:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
I expect to be able to use ENSURE and related nana macros with -Wall and not get compiler warnings.
These warnings are caused by this declaration in I.h:
void _I_default_
Both expr and file should be of type "const char*". The attached patch fixes the problem by adding a const to both parameters in I.h and I.c.
The attachment "Fix "deprecated conversion from string constant to 'char*'" warning." of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.
[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]