From: Christophe CURIS <[email protected]>

As callback have a fixed prototype, it is 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/wcolorwell.c   |  3 +++
 WINGs/winputmethod.c |  7 +++++++
 WINGs/wtext.c        | 14 ++++++++++++++
 WINGs/wtextfield.c   | 13 +++++++++++++
 4 files changed, 37 insertions(+)

diff --git a/WINGs/wcolorwell.c b/WINGs/wcolorwell.c
index 172778c..a4b94ff 100644
--- a/WINGs/wcolorwell.c
+++ b/WINGs/wcolorwell.c
@@ -342,6 +342,9 @@ static void handleActionEvents(XEvent * event, void *data)
        WMScreen *scr = WMWidgetScreen(cPtr);
        WMColorPanel *cpanel;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) event;
+
        if (cPtr->flags.active)
                W_SetViewBackgroundColor(cPtr->view, scr->gray);
        else
diff --git a/WINGs/winputmethod.c b/WINGs/winputmethod.c
index 01ecdc7..7d3aae0 100644
--- a/WINGs/winputmethod.c
+++ b/WINGs/winputmethod.c
@@ -10,6 +10,10 @@ typedef struct W_IMContext {
 
 static void instantiateIM_cb(Display * display, XPointer client_data, XPointer 
call_data)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) display;
+       (void) call_data;
+
        W_InitIM((W_Screen *) client_data);
 }
 
@@ -18,6 +22,9 @@ static void destroyIM_cb(XIM xim, XPointer client_data, 
XPointer call_data)
        W_Screen *scr = (W_Screen *) client_data;
        W_View *target;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) call_data;
+
        if (scr->imctx->xim != xim)
                return;
 
diff --git a/WINGs/wtext.c b/WINGs/wtext.c
index 99b15b9..e9053cd 100644
--- a/WINGs/wtext.c
+++ b/WINGs/wtext.c
@@ -2059,6 +2059,10 @@ static WMData *requestHandler(WMView * view, Atom 
selection, Atom target, void *
        Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
        WMData *data = NULL;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) selection;
+       (void) cdata;
+
        if (target == XA_STRING || target == TEXT || target == COMPOUND_TEXT) {
                char *text = WMGetTextSelectedStream(tPtr);
 
@@ -2093,6 +2097,10 @@ static WMData *requestHandler(WMView * view, Atom 
selection, Atom target, void *
 
 static void lostHandler(WMView * view, Atom selection, void *cdata)
 {
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) selection;
+       (void) cdata;
+
        releaseSelection((WMText *) view->self);
 }
 
@@ -2340,6 +2348,12 @@ static void pasteText(WMView * view, Atom selection, 
Atom target, Time timestamp
        Text *tPtr = (Text *) view->self;
        char *text;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) selection;
+       (void) target;
+       (void) timestamp;
+       (void) cdata;
+
        tPtr->flags.waitingForSelection = 0;
 
        if (data) {
diff --git a/WINGs/wtextfield.c b/WINGs/wtextfield.c
index 45b72cc..de71244 100644
--- a/WINGs/wtextfield.c
+++ b/WINGs/wtextfield.c
@@ -244,6 +244,10 @@ static WMData *requestHandler(WMView * view, Atom 
selection, Atom target, void *
        Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
        WMData *data;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) selection;
+       (void) cdata;
+
        count = tPtr->selection.count < 0
            ? tPtr->selection.position + tPtr->selection.count : 
tPtr->selection.position;
 
@@ -281,6 +285,9 @@ static void lostSelection(WMView * view, Atom selection, 
void *cdata)
 {
        TextField *tPtr = (WMTextField *) view->self;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) cdata;
+
        if (tPtr->flags.ownsSelection) {
                WMDeleteSelectionHandler(view, selection, CurrentTime);
                tPtr->flags.ownsSelection = 0;
@@ -1310,6 +1317,12 @@ static void pasteText(WMView * view, Atom selection, 
Atom target, Time timestamp
        TextField *tPtr = (TextField *) view->self;
        char *str;
 
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) selection;
+       (void) target;
+       (void) timestamp;
+       (void) cdata;
+
        tPtr->flags.waitingSelection = 0;
 
        if (data != NULL) {
-- 
1.8.4.rc3


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

Reply via email to