On Tue 16.Mar'10 at 16:04:00 +0100, Tamas TEVESZ wrote:
> On Tue, 16 Mar 2010, Carlos R. Mafra wrote:
> 
>  > Making all in .
>  >      CC proplist.lo
>  > proplist.c: In function WMMkDirHier:
>  > proplist.c:1651: warning: passing argument 1 of wstrdup discards 
> qualifiers from pointer target type
>  > ../WINGs/WINGs/WUtil.h:248: note: expected 'char *' but argument is of 
> type 'const char *'
>  >      CC userdefaults.lo
> 
> i'd say dont bother. half of the stuff could and should be constified, 
> now new stuff is, and the old ones will eventually be converted as 
> they itch someone.

Well, they itch me :-)

> 
>  >      CC dialog.o
>  > dialog.c: In function ‘LoadHistory’:
>  > dialog.c:209: warning: passing argument 2 of ‘WMFindInArray’ from 
> incompatible pointer type
>  > ../WINGs/WINGs/WUtil.h:455: note: expected ‘int (*)(void *, void *)’ but 
> argument is of type ‘int (*)(const char *, const char *)’
>  >      CC dockedapp.o
> 
> same for const/not const. for the type mismatch, modify strmatch to:
> 
> static int strmatch(const void *str1, const void *str2)
> {
>         return !strcmp((const char *)str1, (const char *)str2);
> }
> 
> that should keep it at bay, while it is still correct (and keeps 
> wmmatchdataproc correct).

Ok.

>  > I think the first one can be fixed by making wstrdup() use 'const char *' 
> in its 
>  > definition (which I think makes sense). 
> 
> indeed it does, but then it will probably trigger another avalanche of 
> qualifier mismatches :)

I don't have the time right now, but as wstrdup() has already bothered me
while I was writing wmgenmenu for not having a const qualifier, I will
convert it and try to address the fallout.


-- 
To unsubscribe, send mail to [email protected].

Reply via email to