From: Christophe CURIS <[email protected]>

The WINGs toolkit dispatch events on widgets using callbacks, 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/dialog.c     | 9 +++++++++
 src/dockedapp.c  | 3 +++
 src/winspector.c | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/src/dialog.c b/src/dialog.c
index a8eb2c6..9485c02 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -105,6 +105,9 @@ int wMessageDialog(WScreen *scr, const char *title, const 
char *message, const c
 
 static void toggleSaveSession(WMWidget *w, void *data)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) data;
+
        wPreferences.save_session_on_exit = WMGetButtonSelected((WMButton *) w);
 }
 
@@ -715,6 +718,9 @@ static void drawIconProc(WMList * lPtr, int index, Drawable 
d, char *text, int s
        RColor color;
        int x, y, width, height, len;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) index;
+
        if (!panel->preview)
                return;
 
@@ -1500,6 +1506,9 @@ static void okButtonCallback(void *self, void *clientData)
 {
        CrashPanel *panel = (CrashPanel *) clientData;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        panel->done = True;
 }
 
diff --git a/src/dockedapp.c b/src/dockedapp.c
index cc7292f..4174b03 100644
--- a/src/dockedapp.c
+++ b/src/dockedapp.c
@@ -122,6 +122,9 @@ static void chooseIconCallback(WMWidget * self, void 
*clientData)
        AppSettingsPanel *panel = (AppSettingsPanel *) clientData;
        int result;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) self;
+
        panel->choosingIcon = 1;
 
        WMSetButtonEnabled(panel->browseBtn, False);
diff --git a/src/winspector.c b/src/winspector.c
index 2f54dca..78f381d 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -813,6 +813,9 @@ static void revertSettings(WMWidget *button, void 
*client_data)
        int i, n, workspace, level;
        char *wm_instance = NULL, *wm_class = NULL;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) button;
+
        if (panel->instRb && WMGetButtonSelected(panel->instRb) != 0)
                wm_instance = wwin->wm_instance;
        else if (panel->clsRb && WMGetButtonSelected(panel->clsRb) != 0)
@@ -1020,6 +1023,9 @@ static void selectWindow(WMWidget *bPtr, void *data)
        XEvent event;
        WWindow *iwin;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) bPtr;
+
        if (XGrabPointer(dpy, scr->root_win, True,
                         ButtonPressMask, GrabModeAsync, GrabModeAsync, None,
                         wPreferences.cursor[WCUR_SELECT], CurrentTime) != 
GrabSuccess) {
-- 
1.8.4.rc3


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

Reply via email to