mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
wmaker: Marked args as unused for compiler in WINGs Notif callback code
The mechanism of Notifications in the WINGs toolkit is relying on callbacks to dispatch notifications, which means having a fixed argument list for the handling function. It is then correct to not use all the arguments, so this patch adds the appropriate stuff to avoid a false report from compiler. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
f45d57ff16
commit
fd10d4069f
@@ -93,6 +93,9 @@ static void tileObserver(void *self, WMNotification *notif)
|
|||||||
{
|
{
|
||||||
WIcon *icon = (WIcon *) self;
|
WIcon *icon = (WIcon *) self;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) notif;
|
||||||
|
|
||||||
update_icon_pixmap(icon);
|
update_icon_pixmap(icon);
|
||||||
|
|
||||||
XClearArea(dpy, icon->core->window, 0, 0, 1, 1, True);
|
XClearArea(dpy, icon->core->window, 0, 0, 1, 1, True);
|
||||||
|
|||||||
@@ -391,6 +391,9 @@ static void observer(void *self, WMNotification * notif)
|
|||||||
const char *name = WMGetNotificationName(notif);
|
const char *name = WMGetNotificationName(notif);
|
||||||
void *data = WMGetNotificationClientData(notif);
|
void *data = WMGetNotificationClientData(notif);
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) self;
|
||||||
|
|
||||||
if (!wwin)
|
if (!wwin)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -419,6 +422,9 @@ static void wsobserver(void *self, WMNotification * notif)
|
|||||||
const char *name = WMGetNotificationName(notif);
|
const char *name = WMGetNotificationName(notif);
|
||||||
void *data = WMGetNotificationClientData(notif);
|
void *data = WMGetNotificationClientData(notif);
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) self;
|
||||||
|
|
||||||
if (strcmp(name, WMNWorkspaceNameChanged) == 0) {
|
if (strcmp(name, WMNWorkspaceNameChanged) == 0) {
|
||||||
UpdateSwitchMenuWorkspace(scr, (uintptr_t)data);
|
UpdateSwitchMenuWorkspace(scr, (uintptr_t)data);
|
||||||
} else if (strcmp(name, WMNWorkspaceChanged) == 0) {
|
} else if (strcmp(name, WMNWorkspaceChanged) == 0) {
|
||||||
|
|||||||
@@ -1574,6 +1574,9 @@ static void wsobserver(void *self, WMNotification *notif)
|
|||||||
WScreen *scr = (WScreen *) WMGetNotificationObject(notif);
|
WScreen *scr = (WScreen *) WMGetNotificationObject(notif);
|
||||||
const char *name = WMGetNotificationName(notif);
|
const char *name = WMGetNotificationName(notif);
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) self;
|
||||||
|
|
||||||
if (strcmp(name, WMNWorkspaceCreated) == 0) {
|
if (strcmp(name, WMNWorkspaceCreated) == 0) {
|
||||||
updateWorkspaceCount(scr);
|
updateWorkspaceCount(scr);
|
||||||
updateWorkspaceNames(scr);
|
updateWorkspaceNames(scr);
|
||||||
|
|||||||
Reference in New Issue
Block a user