From: Christophe CURIS <[email protected]>

When an error occurs in X, the Xlib is using a callback mechanism to
execute application code to handle the problem, which means having a
fixed argument list for that application 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]>
---
 util/wmsetbg.c | 4 ++++
 util/wxcopy.c  | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/util/wmsetbg.c b/util/wmsetbg.c
index 8c15ea1..742f7b0 100644
--- a/util/wmsetbg.c
+++ b/util/wmsetbg.c
@@ -786,6 +786,10 @@ static Pixmap duplicatePixmap(Pixmap pixmap, int width, 
int height)
 
 static int dummyErrorHandler(Display * dpy, XErrorEvent * err)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) dpy;
+       (void) err;
+
        return 0;
 }
 
diff --git a/util/wxcopy.c b/util/wxcopy.c
index 89bd4a1..90303fb 100644
--- a/util/wxcopy.c
+++ b/util/wxcopy.c
@@ -48,6 +48,10 @@ static void print_help(void)
 
 static int errorHandler(Display * dpy, XErrorEvent * err)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) dpy;
+       (void) err;
+
        /* ignore all errors */
        return 0;
 }
-- 
1.8.4.rc3


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

Reply via email to