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]>
---
 WINGs/wcolorpanel.c | 12 ++++++++++++
 WINGs/wlist.c       |  3 +++
 WINGs/wslider.c     |  3 +++
 WINGs/wsplitview.c  |  3 +++
 WINGs/wtextfield.c  |  3 +++
 WINGs/wwindow.c     |  3 +++
 6 files changed, 27 insertions(+)

diff --git a/WINGs/wcolorpanel.c b/WINGs/wcolorpanel.c
index ab70dd2..78e5649 100644
--- a/WINGs/wcolorpanel.c
+++ b/WINGs/wcolorpanel.c
@@ -2321,6 +2321,9 @@ static void grayBrightnessTextFieldCallback(void 
*observerData, WMNotification *
        int value;
        W_ColorPanel *panel = (W_ColorPanel *) observerData;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) notification;
+
        value = atoi(WMGetTextFieldText(panel->grayBrightnessT));
        if (value > 100)
                value = 100;
@@ -2375,6 +2378,9 @@ static void rgbTextFieldCallback(void *observerData, 
WMNotification * notificati
        int n;
        W_ColorPanel *panel = (W_ColorPanel *) observerData;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) notification;
+
        value[0] = atoi(WMGetTextFieldText(panel->rgbRedT));
        value[1] = atoi(WMGetTextFieldText(panel->rgbGreenT));
        value[2] = atoi(WMGetTextFieldText(panel->rgbBlueT));
@@ -2449,6 +2455,9 @@ static void cmykTextFieldCallback(void *observerData, 
WMNotification * notificat
        double scale;
        W_ColorPanel *panel = (W_ColorPanel *) observerData;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) notification;
+
        value[0] = atoi(WMGetTextFieldText(panel->cmykCyanT));
        value[1] = atoi(WMGetTextFieldText(panel->cmykMagentaT));
        value[2] = atoi(WMGetTextFieldText(panel->cmykYellowT));
@@ -2534,6 +2543,9 @@ static void hsbTextFieldCallback(void *observerData, 
WMNotification * notificati
        int n;
        W_ColorPanel *panel = (W_ColorPanel *) observerData;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) notification;
+
        value[0] = atoi(WMGetTextFieldText(panel->hsbHueT));
        value[1] = atoi(WMGetTextFieldText(panel->hsbSaturationT));
        value[2] = atoi(WMGetTextFieldText(panel->hsbBrightnessT));
diff --git a/WINGs/wlist.c b/WINGs/wlist.c
index f15e900..6e69a34 100644
--- a/WINGs/wlist.c
+++ b/WINGs/wlist.c
@@ -92,6 +92,9 @@ static void updateDoubleBufferPixmap(WMList * lPtr)
 
 static void realizeObserver(void *self, WMNotification * not)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) not;
+
        updateDoubleBufferPixmap(self);
 }
 
diff --git a/WINGs/wslider.c b/WINGs/wslider.c
index f1f43fb..839930e 100644
--- a/WINGs/wslider.c
+++ b/WINGs/wslider.c
@@ -49,6 +49,9 @@ static void makeKnobPixmap(Slider * sPtr);
 
 static void realizeObserver(void *self, WMNotification * not)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) not;
+
        makeKnobPixmap(self);
 }
 
diff --git a/WINGs/wsplitview.c b/WINGs/wsplitview.c
index e1dcd81..38b2cb3 100644
--- a/WINGs/wsplitview.c
+++ b/WINGs/wsplitview.c
@@ -351,6 +351,9 @@ static void handleViewResized(void *self, WMNotification * 
notification)
 {
        WMSplitView *sPtr = (WMSplitView *) self;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) notification;
+
 #if 0
        printf("---- (handleViewResized - 1) ----\n");
        dumpSubviews(sPtr);
diff --git a/WINGs/wtextfield.c b/WINGs/wtextfield.c
index 1b3baa5..be0fc41 100644
--- a/WINGs/wtextfield.c
+++ b/WINGs/wtextfield.c
@@ -307,6 +307,9 @@ static void selectionNotification(void *observerData, 
WMNotification * notificat
 
 static void realizeObserver(void *self, WMNotification * not)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) not;
+
        W_CreateIC(((TextField *) self)->view);
 }
 
diff --git a/WINGs/wwindow.c b/WINGs/wwindow.c
index d3ad4aa..139cb53 100644
--- a/WINGs/wwindow.c
+++ b/WINGs/wwindow.c
@@ -95,6 +95,9 @@ static void realizeWindow(WMWindow * win);
 
 static void realizeObserver(void *self, WMNotification * not)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) not;
+
        realizeWindow(self);
 }
 
-- 
1.8.4.rc3


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

Reply via email to