From c34a55ed5a27da9c4ea2328edda825a3a9421607 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 13 Oct 2013 22:44:05 +0200 Subject: [PATCH] wmaker: Marked args as unused for compiler in XExposeEvent callback code 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 --- 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 576ba3b7..f61ae0ee 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 30197f5d..9da119cd 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 91572951..68a1b740 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 064b6890..f1f08cd2 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 c9dc53c4..e0a32a66 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); }