[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#560457: xnc: FTBFS: commonfuncs.cxx:122: error: invalid conversion from 'const char*' to 'char*'


I fixed the bug in xnc and made a diff file, but I do not have access to debian linux, so I'm sending this pacth here.
Thank you.

Lucas Nussbaum:
Source: xnc
Version: 5.0.4-3
Severity: serious
User: debian-qa@lists.debian.org
Usertags: qa-ftbfs-20091210 qa-ftbfs
Justification: FTBFS on amd64


During a rebuild of all packages in sid, your package failed to build on

Relevant part:
x86_64-linux-gnu-g++ -c -I../../../src/include/xnc -I../../../src/au -I../../../src/lib/manage -I../../../src/lib/vfs -I../../../src/lib/vfs/ftplib  -I../../../intl -I../../../src/include -I../../../src/lib/northgui -I../../../src/lib/image2 -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -DOLD_STYLE -g -O2   commonfuncs.cxx -o commonfuncs.o
commonfuncs.cxx: In function 'char* get_first_content(const char*, char*)':
commonfuncs.cxx:122: error: invalid conversion from 'const char*' to 'char*'
commonfuncs.cxx: In function 'int is_filtered(char*, char*)':
commonfuncs.cxx:265: warning: deprecated conversion from string constant to 'char*'
commonfuncs.cxx: In function 'int hex_one_digit(char)':
commonfuncs.cxx:383: warning: deprecated conversion from string constant to 'char*'
make[4]: *** [commonfuncs.o] Error 1

The full build log is available from:

A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on about 50 AMD64 nodes
of the Grid'5000 platform, using a clean chroot.  Internet was not
accessible from the build systems.

Best regards,
Leo <leo@solvo.ru>
Solvo Ltd.
St.Petersburg, Russia

--- commonfuncs.cxx	2002-10-16 10:44:20.000000000 +0400
+++ /tmp/commonfuncs.cxx	2009-12-16 09:47:28.000000000 +0300
@@ -119,7 +119,7 @@
 //Get first content of dirname
 char*   get_first_content(const char *curdir, char *cont)
-        char *b=strchr(curdir,'/');
+  char *b=strchr((char*)curdir,'/');
@@ -262,7 +262,7 @@
 int    is_filtered(char *s, char *ff)
-  char  *f="";
+  char  *f=0;
   while (*s != 0)
     f = ff;
@@ -299,7 +299,7 @@
     if (*f == '*')
       ff = f;
-  if (*f == 0 || *f == '*')
+  if (f==0 || *f == 0 || *f == '*')
     return 1;
   return 0;
@@ -380,7 +380,7 @@
 int hex_one_digit(char ch1)
   char ch=toupper(ch1);
-  char *hex="0123456789ABCDEF";
+  char hex[]="0123456789ABCDEF";
   int  i;

Reply to: