From: Christophe CURIS <[email protected]>

The custom drawing code for windows is handled using callback functions,
which means having a fixed argument list for that 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/appicon.c  | 3 +++
 src/dock.c     | 7 +++++++
 src/framewin.c | 3 +++
 src/icon.c     | 6 ++++++
 src/menu.c     | 3 +++
 5 files changed, 22 insertions(+)

diff --git a/src/appicon.c b/src/appicon.c
index da6215f..d354946 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -650,6 +650,9 @@ static void openApplicationMenu(WApplication * wapp, int x, 
int y)
 
 static void iconExpose(WObjDescriptor *desc, XEvent *event)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) event;
+
        wAppIconPaint(desc->parent);
 }
 
diff --git a/src/dock.c b/src/dock.c
index e2a4295..0787c80 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -1432,6 +1432,10 @@ void wClipIconPaint(void)
 
 static void clipIconExpose(WObjDescriptor *desc, XEvent *event)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) desc;
+       (void) event;
+
        wClipIconPaint();
 }
 
@@ -4311,6 +4315,9 @@ static char * findUniqueName(WScreen *scr, const char 
*instance_basename)
 
 static void drawerIconExpose(WObjDescriptor *desc, XEvent *event)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) event;
+
        wDrawerIconPaint((WAppIcon *) desc->parent);
 }
 
diff --git a/src/framewin.c b/src/framewin.c
index 9157295..67a5885 100644
--- a/src/framewin.c
+++ b/src/framewin.c
@@ -1378,6 +1378,9 @@ static void handleButtonExpose(WObjDescriptor * desc, 
XEvent * event)
        WFrameWindow *fwin = (WFrameWindow *) desc->parent;
        WCoreWindow *button = (WCoreWindow *) desc->self;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) event;
+
 #ifdef XKB_BUTTON_HINT
        if (button == fwin->language_button) {
                if (wPreferences.modelock)
diff --git a/src/icon.c b/src/icon.c
index 064b689..03187e8 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -784,6 +784,9 @@ void wIconPaint(WIcon *icon)
 
 static void miniwindowExpose(WObjDescriptor * desc, XEvent * event)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) event;
+
        wIconPaint(desc->parent);
 }
 
@@ -791,6 +794,9 @@ static void miniwindowDblClick(WObjDescriptor * desc, 
XEvent * event)
 {
        WIcon *icon = desc->parent;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) event;
+
        assert(icon->owner != NULL);
 
        wDeiconifyWindow(icon->owner);
diff --git a/src/menu.c b/src/menu.c
index c9dc53c..e032270 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1667,6 +1667,9 @@ void wMenuScroll(WMenu * menu, XEvent * event)
 
 static void menuExpose(WObjDescriptor * desc, XEvent * event)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) event;
+
        wMenuPaint(desc->parent);
 }
 
-- 
1.8.4.rc3


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

Reply via email to