From 237c386fdc0db7300826c068bad06f3edb19a7c4 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sat, 19 Oct 2013 22:17:54 +0200 Subject: [PATCH] WINGs: 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 --- WINGs/dragcommon.c | 3 +++ WINGs/selection.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/WINGs/dragcommon.c b/WINGs/dragcommon.c index 8cce2eec..db5e5f11 100644 --- a/WINGs/dragcommon.c +++ b/WINGs/dragcommon.c @@ -95,6 +95,9 @@ char *WMGetDragOperationItemText(WMDragOperationItem * item) static int handleNoWindowXError(Display * dpy, XErrorEvent * errEvt) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) dpy; + if (errEvt->error_code == BadWindow || errEvt->error_code == BadDrawable) { _WindowExists = False; return Success; diff --git a/WINGs/selection.c b/WINGs/selection.c index 200b919a..64d71fb4 100644 --- a/WINGs/selection.c +++ b/WINGs/selection.c @@ -102,6 +102,10 @@ static void WMDeleteSelectionCallback(WMView * view, Atom selection, Time timest static int handleXError(Display * dpy, XErrorEvent * ev) { + /* Parameter not used, but tell the compiler that it is ok */ + (void) dpy; + (void) ev; + gotXError = True; return 1;