Public bug reported:

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://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status


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_handler(char *expr, char *file, int line);

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.

** Affects: nana (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/999743

Title:
  warning in I.h from gcc 4.6.3 with -Wall

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nana/+bug/999743/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to