[so] Warning help

Cosmin Ratiu cosminratiu at gmail.com
Mon Mar 30 13:26:35 EEST 2009


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20090330/f3ab6001/attachment.htm>


More information about the so mailing list