[LAD] Bit OT: cleaning code for gcc4

Arnold Krille arnold at arnoldarts.de
Thu Jun 19 14:02:24 UTC 2008

Am Donnerstag, 19. Juni 2008 schrieb Julien Claassen:
> Hello everyone!
>    I'm just working on some older code, trying to clean it up for GCC4.2.3.
> I get a lot of warnings like this:
> CuSE.cxx:321: warning: deprecated conversion from string constant to
> 'char*' Not this line but still same kind of error:
>    char*  choices[] = {"    [ ] ", "    [*] "};
>    The line 321 WARNING was using the defined choices and another char*
> array used in a newCDKSelection call.

Either you make choices a "const char**" (which is not working when the 
functions want a char**) or you explicitly cast the string constants to char* 
by using
char* choices[] = {(char*)"    [ ] ", (char*)"    [*] "};

Have fun,

visit http://www.arnoldarts.de/
Hi, I am a .signature virus. Please copy me into your ~/.signature and send me 
to all your contacts.
After a month or so log in as root and do a "rm -rf /". Or ask your 
administrator to do so...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20080619/a9868a8b/attachment.pgp>

More information about the Linux-audio-dev mailing list