1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-02 06:05:45 +01:00

Constify WMMatchDataProc and fix fallout

It addresses this warning

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 *)’

but induces others in other places. One of them was this one

window.c: In function ‘wManageWindow’:
window.c:782: warning: passing argument 2 of ‘WMFindInArray’ from incompatible pointer type
../WINGs/WINGs/WUtil.h:455: note: expected ‘int (*)(const void *, const void *)’ but argument is of type ‘int (*)(void *, void *)’

which is fixed by constifying the arguments of matchIdentifier(). The other warnings are
fixed similarly.
This commit is contained in:
Carlos R. Mafra
2010-03-16 19:01:01 +01:00
parent 034339320f
commit 8018da8149
10 changed files with 12 additions and 12 deletions

View File

@@ -125,7 +125,7 @@ void WMDeleteLeafForTreeNode(WMTreeNode * aNode, int index)
WMDeleteFromArray(aNode->leaves, index);
}
static int sameData(void *item, void *data)
static int sameData(const void *item, const void *data)
{
return (((WMTreeNode *) item)->data == data);
}