mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-28 10:55:48 +01:00
WINGs: Removed cast to change function prototype
When a function is used as a call-back, it is dangerous to have arguments with a type different than what is expected by the call-back definition. This patch sets the argument list to match what is expected by the call-back prototype and inserts an explicit type conversion at the beginning of the function.
This commit is contained in:
committed by
Carlos R. Mafra
parent
bab90b2168
commit
e2d816c7a2
@@ -635,7 +635,10 @@ static void handleEvents(XEvent * event, void *data)
|
||||
|
||||
static int matchTitle(const void *item, const void *title)
|
||||
{
|
||||
return (strcmp(((WMListItem *) item)->text, (const char *)title) == 0 ? 1 : 0);
|
||||
const WMListItem *wl_item = item;
|
||||
const char *s_title = title;
|
||||
|
||||
return (strcmp(wl_item->text, s_title) == 0 ? 1 : 0);
|
||||
}
|
||||
|
||||
int WMFindRowOfListItemWithTitle(WMList * lPtr, const char *title)
|
||||
|
||||
Reference in New Issue
Block a user