From cd78f11abc4f3d3f47d96c168a336ad796853c91 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Fri, 1 Nov 2013 16:06:45 +0100 Subject: [PATCH] util: Marked args as unused for compiler in X Error handlers 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 --- util/wmsetbg.c | 4 ++++ util/wxcopy.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/util/wmsetbg.c b/util/wmsetbg.c index 8c15ea1d..742f7b06 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 89bd4a13..90303fb0 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; }