mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-24 23:22:30 +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:
@@ -195,7 +195,7 @@ static void toggleLoweredCallback(WMenu * menu, WMenuEntry * entry)
|
||||
wMenuPaint(menu);
|
||||
}
|
||||
|
||||
static int matchWindow(void *item, void *cdata)
|
||||
static int matchWindow(const void *item, const void *cdata)
|
||||
{
|
||||
return (((WFakeGroupLeader *) item)->leader == (Window) cdata);
|
||||
}
|
||||
|
||||
@@ -529,7 +529,7 @@ static void saveTimestamp(XEvent * event)
|
||||
}
|
||||
}
|
||||
|
||||
static int matchWindow(void *item, void *cdata)
|
||||
static int matchWindow(const void *item, const void *cdata)
|
||||
{
|
||||
return (((WFakeGroupLeader *) item)->origLeader == (Window) cdata);
|
||||
}
|
||||
|
||||
@@ -564,7 +564,7 @@ static Window createFakeWindowGroupLeader(WScreen *scr, Window win, char *instan
|
||||
return leader;
|
||||
}
|
||||
|
||||
static int matchIdentifier(void *item, void *cdata)
|
||||
static int matchIdentifier(const void *item, const void *cdata)
|
||||
{
|
||||
return (strcmp(((WFakeGroupLeader *) item)->identifier, (char *)cdata) == 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user