[so] Warning help

Dumitru Sorin dumitru.sorin87 at gmail.com
Mon Mar 30 13:32:12 EEST 2009


la mine e definit ca:
word_t* temp = command->params;
unde command e un simple_command_t* venit de la parser.

On Mon, Mar 30, 2009 at 1:26 PM, Cosmin Ratiu <cosminratiu at gmail.com> wrote:

>
> On Mon, Mar 30, 2009 at 1:13 PM, Dumitru Sorin <dumitru.sorin87 at gmail.com>wrote:
>
>> Salut,
>>
>> gcc imi da warningul de mai jos la un free la free(temp->string), unde
>> temp = word_t*. Word_t* provine
>> din structura returnata de parser. Cum pot sa scap de warningul asta?
>>
>> warning: passing argument 1 of ‘free’ discards qualifiers from pointer
>> target type
>>
>
> Este cumva temp const? Mesajul ala zice ca protectia oferita de const este
> pierduta cand faci cast la non-const (aka pasezi un pointer const la free).
>
> Cosmin.
>
> _______________________________________________
> so mailing list
> so at cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20090330/886c11c2/attachment.htm>


More information about the so mailing list