On Tue 16.Mar'10 at 18:17:37 +0100, Tamas TEVESZ wrote:
> On Tue, 16 Mar 2010, Carlos R. Mafra wrote:
>
> > Yep, I folded into your "Kill redundant function" patch and the result
> > is already in #next.
>
> you either made a typo, or git is playing games with me.
It was a typo, thanks for catching that.
>
> now its:
>
> static int strmatch(const char *str1, const char *str2)
> {
>
> but it should be
> static int strmatch(const void *str1, const void *str2)
> {
>
> the function takes void*, not char*. you should be getting the same
> warnings with this you did before, are they gone for some reason?
Oh, the warning was still there (and I confess being confused why).
But it's still there after fixing the typo:
Making all in src
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 void *, const void *)’
This warning only goes away if in addition I do
diff --git a/WINGs/WINGs/WUtil.h b/WINGs/WINGs/WUtil.h
index 347e70e..9569b32 100644
--- a/WINGs/WINGs/WUtil.h
+++ b/WINGs/WINGs/WUtil.h
@@ -142,7 +142,7 @@ typedef int WMCompareDataProc(const void *item1, const void
*item2);
typedef void WMFreeDataProc(void *data);
/* Used by WMBag or WMArray for matching data */
-typedef int WMMatchDataProc(void *item, void *cdata);
+typedef int WMMatchDataProc(const void *item, const void *cdata);
but that opens another can of worms (various warnings in other places).
Perhaps they are worth addressing too, but I wont have time for this :-(
--
To unsubscribe, send mail to [email protected].