[so] Warning help

Bogdan Sass bogdan.sass at catc.ro
Mon Mar 30 13:44:42 EEST 2009


Dumitru Sorin wrote:
> la mine e definit ca:
> word_t* temp = command->params;
> unde command e un simple_command_t* venit de la parser.
typedef struct word_t {
    const char * string;
...
}

    t->string este un (const char*), si free accepta un (void *). Se 
pierde qualifier-ul const, si de aici warning-ul.

    Poti sa il castezi la un (char*), dar cred ca mai bine ar fi sa 
folosesti functia de eliberare a memoriei data cu parser-ul.


-- 
Bogdan Sass
CCAI,CCSP,JNCIA-ER,CCIE #22221 (RS)
Information Systems Security Professional
"Curiosity was framed - ignorance killed the cat"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3287 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20090330/176f0af9/attachment.bin>


More information about the so mailing list