diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-11-12 15:23:52 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-11-12 15:23:52 -0800 |
commit | 09834f092c6fb5ac4945bfd1b7b5bb228e42e04d (patch) | |
tree | c4d873df02aefbd72608c500c2673df47a3a6ad7 | |
parent | d9ba30a6f56b2bb7e6f1b125a3d2eaa871c96eba (diff) |
Tag unused arguments to callback functions as _X_UNUSED
Gets rid of 33 -Wunused-parameter warnings from clang
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | grid.c | 21 | ||||
-rw-r--r-- | xfd.c | 17 |
2 files changed, 23 insertions, 15 deletions
@@ -409,7 +409,8 @@ static XtConvertArgRec xftColorConvertArgs[] = { } while (0) static void -XmuFreeXftColor (XtAppContext app, XrmValuePtr toVal, XtPointer closure, +XmuFreeXftColor (XtAppContext app, XrmValuePtr toVal, + XtPointer closure _X_UNUSED, XrmValuePtr args, Cardinal *num_args) { Screen *screen; @@ -439,7 +440,7 @@ static Boolean XmuCvtStringToXftColor(Display *dpy, XrmValue *args, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { char *spec; XRenderColor renderColor; @@ -489,7 +490,7 @@ XmuCvtStringToXftColor(Display *dpy, } static void -XmuFreeXftFont (XtAppContext app, XrmValuePtr toVal, XtPointer closure, +XmuFreeXftFont (XtAppContext app, XrmValuePtr toVal, XtPointer closure _X_UNUSED, XrmValuePtr args, Cardinal *num_args) { Screen *screen; @@ -515,7 +516,7 @@ static Boolean XmuCvtStringToXftFont(Display *dpy, XrmValue *args, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { char *name; XftFont *font; @@ -571,7 +572,8 @@ ClassInitialize(void) static void -Initialize(Widget request, Widget new, ArgList args, Cardinal *num_args) +Initialize(Widget request, Widget new, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { FontGridWidget reqfg = (FontGridWidget) request; FontGridWidget newfg = (FontGridWidget) new; @@ -684,7 +686,7 @@ Resize(Widget gw) /* ARGSUSED */ static void -Redisplay(Widget gw, XEvent *event, Region region) +Redisplay(Widget gw, XEvent *event _X_UNUSED, Region region) { FontGridWidget fgw = (FontGridWidget) gw; XRectangle rect; /* bounding rect for region */ @@ -880,8 +882,8 @@ PageBlank (Widget w, long first, long last) /*ARGSUSED*/ static Boolean -SetValues(Widget current, Widget request, Widget new, - ArgList args, Cardinal *num_args) +SetValues(Widget current, Widget request _X_UNUSED, Widget new, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { FontGridWidget curfg = (FontGridWidget) current; FontGridWidget newfg = (FontGridWidget) new; @@ -943,7 +945,8 @@ SetValues(Widget current, Widget request, Widget new, /* ARGSUSED */ static void -Notify(Widget gw, XEvent *event, String *params, Cardinal *nparams) +Notify(Widget gw, XEvent *event, + String *params _X_UNUSED, Cardinal *nparams _X_UNUSED) { FontGridWidget fgw = (FontGridWidget) gw; int x, y; /* where the event happened */ @@ -344,7 +344,7 @@ main(int argc, char *argv[]) /*ARGSUSED*/ static void -SelectChar(Widget w, XtPointer closure, XtPointer data) +SelectChar(Widget w, XtPointer closure _X_UNUSED, XtPointer data) { FontGridCharRec *p = (FontGridCharRec *) data; XFontStruct *fs = p->thefont; @@ -422,7 +422,8 @@ SelectChar(Widget w, XtPointer closure, XtPointer data) /*ARGSUSED*/ static void -do_quit (Widget w, XEvent *event, String *params, Cardinal *num_params) +do_quit (Widget w _X_UNUSED, XEvent *event _X_UNUSED, + String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { exit (0); } @@ -489,14 +490,16 @@ set_button_state(void) /* ARGSUSED */ static void -do_prev16(Widget w, XEvent *event, String *params, Cardinal *num_params) +do_prev16(Widget w _X_UNUSED, XEvent *event _X_UNUSED, + String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { change_page (-16); } static void -do_prev(Widget w, XEvent *event, String *params, Cardinal *num_params) +do_prev(Widget w _X_UNUSED, XEvent *event _X_UNUSED, + String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { change_page (-1); } @@ -504,14 +507,16 @@ do_prev(Widget w, XEvent *event, String *params, Cardinal *num_params) /* ARGSUSED */ static void -do_next(Widget w, XEvent *event, String *params, Cardinal *num_params) +do_next(Widget w _X_UNUSED, XEvent *event _X_UNUSED, + String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { change_page (1); } /* ARGSUSED */ static void -do_next16(Widget w, XEvent *event, String *params, Cardinal *num_params) +do_next16(Widget w _X_UNUSED, XEvent *event _X_UNUSED, + String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { change_page (16); } |