From: Christophe CURIS <[email protected]>

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 <[email protected]>
---
 src/icon.c       | 3 +++
 src/switchmenu.c | 6 ++++++
 src/wmspec.c     | 3 +++
 3 files changed, 12 insertions(+)

diff --git a/src/icon.c b/src/icon.c
index 03187e8..ac728e7 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -93,6 +93,9 @@ static void tileObserver(void *self, WMNotification *notif)
 {
        WIcon *icon = (WIcon *) self;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) notif;
+
        update_icon_pixmap(icon);
 
        XClearArea(dpy, icon->core->window, 0, 0, 1, 1, True);
diff --git a/src/switchmenu.c b/src/switchmenu.c
index 70372c6..051805c 100644
--- a/src/switchmenu.c
+++ b/src/switchmenu.c
@@ -391,6 +391,9 @@ static void observer(void *self, WMNotification * notif)
        const char *name = WMGetNotificationName(notif);
        void *data = WMGetNotificationClientData(notif);
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        if (!wwin)
                return;
 
@@ -419,6 +422,9 @@ static void wsobserver(void *self, WMNotification * notif)
        const char *name = WMGetNotificationName(notif);
        void *data = WMGetNotificationClientData(notif);
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        if (strcmp(name, WMNWorkspaceNameChanged) == 0) {
                UpdateSwitchMenuWorkspace(scr, (uintptr_t)data);
        } else if (strcmp(name, WMNWorkspaceChanged) == 0) {
diff --git a/src/wmspec.c b/src/wmspec.c
index cea4325..3bf95d7 100644
--- a/src/wmspec.c
+++ b/src/wmspec.c
@@ -1574,6 +1574,9 @@ static void wsobserver(void *self, WMNotification *notif)
        WScreen *scr = (WScreen *) WMGetNotificationObject(notif);
        const char *name = WMGetNotificationName(notif);
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        if (strcmp(name, WMNWorkspaceCreated) == 0) {
                updateWorkspaceCount(scr);
                updateWorkspaceNames(scr);
-- 
1.8.4.rc3


-- 
To unsubscribe, send mail to [email protected].

Reply via email to