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

Re: SoText2



The code in question tries to convert a 'char **' to a 'const char **',
which is an illegal conversion in C++ for const safety reasons (see the
C++ FAQ), and the compiler on Mandrake 7.2 caught the error:

   char* input = (char *)strings[i].getString();
   ...
   if ((iconv(conversionCode &input, &inbytes, ...

This generates the error:

   SoText2.c++:780: passing `char **' as argument 2 of `iconv(void *,
   const char **, size_t *, char **, size_t *)' adds cv-quals without
   intervening `const'

iconv() takes a "const char **" as its second argument.  The fix is to
change the declaration of 'input' to be 'const char *' (5 lines above
the error).  This adds the const qualifier to the 'char *' instead,
which is a valid conversion.  I haven't had the time to generate a patch
for this, but make this change in SoText2.c++ and SoText3.c++ to fix the
problem.

-- 
Joshua P. Dady                   Ph: (248) 945-1100  Fax: (248) 945-1166
Mediascape Corporation                        http://www.mediascape.com/