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]> --- WINGs/dragcommon.c | 3 +++ WINGs/selection.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/WINGs/dragcommon.c b/WINGs/dragcommon.c index 8cce2ee..db5e5f1 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 200b919..64d71fb 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; -- 1.8.4.rc3 -- To unsubscribe, send mail to [email protected].
