From dcb2d0173c4dadc3e41a5e1ae7c1ff477f54e347 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sun, 27 Apr 2014 18:45:45 +0200 Subject: [PATCH] Mark callback parameters as 'intentionally unused' .. and enable more warnings for others ;) --- de/draw.c | 6 +++--- ioncore/clientwin.c | 2 +- ioncore/event.c | 2 +- ioncore/focus.c | 4 ++-- ioncore/frame-pointer.c | 2 +- ioncore/frame.c | 4 ++-- ioncore/gr.c | 4 ++-- ioncore/grab.c | 2 +- ioncore/group-ws.c | 2 +- ioncore/infowin.c | 2 +- ioncore/kbresize.c | 2 +- ioncore/key.c | 2 +- ioncore/mplex.c | 2 +- ioncore/mplexpholder.c | 2 +- ioncore/pholder.c | 4 ++-- ioncore/pointer.c | 2 +- ioncore/presize.c | 6 +++--- ioncore/regbind.c | 4 ++-- ioncore/region.c | 2 +- ioncore/resize.c | 8 ++++---- ioncore/rootwin.c | 12 ++++++------ ioncore/screen-notify.c | 4 ++-- ioncore/screen.c | 2 +- ioncore/stacking.c | 2 +- libextl/readconfig.c | 2 +- libmainloop/defer.c | 2 +- libmainloop/hooks.c | 8 ++++---- libmainloop/signal.c | 12 ++++++------ mod_dock/dock.c | 10 +++++----- mod_menu/menu.c | 4 ++-- mod_notionflux/mod_notionflux.c | 2 +- mod_query/wedln.c | 4 ++-- mod_query/wmessage.c | 2 +- mod_sm/sm_session.c | 26 +++++++++++++------------- mod_sp/main.c | 4 ++-- mod_statusbar/statusbar.c | 12 ++++++------ mod_tiling/split.c | 22 +++++++++++----------- system-autodetect.mk | 6 +----- 38 files changed, 98 insertions(+), 102 deletions(-) diff --git a/de/draw.c b/de/draw.c index ec914cb1..cd7ac6e4 100644 --- a/de/draw.c +++ b/de/draw.c @@ -412,7 +412,7 @@ void debrush_menuentry_extras(DEBrush *brush, const GrFontExtents *fnte, const GrStyleSpec *a1, const GrStyleSpec *a2, - bool pre, int index) + bool pre, int UNUSED(index)) { int tx, ty; @@ -432,7 +432,7 @@ void debrush_menuentry_extras(DEBrush *brush, void debrush_do_draw_box(DEBrush *brush, const WRectangle *geom, - DEColourGroup *cg, bool needfill) + DEColourGroup *cg, bool UNUSED(needfill)) { GC gc=brush->d->normal_gc; @@ -554,7 +554,7 @@ void debrush_draw_textboxes(DEBrush *brush, const WRectangle *geom, #define MAXSHAPE 16 -void debrush_set_window_shape(DEBrush *brush, bool rough, +void debrush_set_window_shape(DEBrush *brush, bool UNUSED(rough), int n, const WRectangle *rects) { XRectangle r[MAXSHAPE]; diff --git a/ioncore/clientwin.c b/ioncore/clientwin.c index 388dca31..9d126dc3 100644 --- a/ioncore/clientwin.c +++ b/ioncore/clientwin.c @@ -807,7 +807,7 @@ void clientwin_kill(WClientWin *cwin) } -void clientwin_rqclose(WClientWin *cwin, bool relocate_ignored) +void clientwin_rqclose(WClientWin *cwin, bool UNUSED(relocate_ignored)) { /* Ignore relocate parameter -- client windows can always be * destroyed by the application in any case, so way may just as diff --git a/ioncore/event.c b/ioncore/event.c index 3723af02..aeb0be2b 100644 --- a/ioncore/event.c +++ b/ioncore/event.c @@ -200,7 +200,7 @@ void ioncore_flushfocus() /*{{{ X connection FD handler */ -void ioncore_x_connection_handler(int conn, void *unused) +void ioncore_x_connection_handler(int UNUSED(conn), void *UNUSED(unused)) { XEvent ev; diff --git a/ioncore/focus.c b/ioncore/focus.c index a93afa42..863ccaac 100644 --- a/ioncore/focus.c +++ b/ioncore/focus.c @@ -151,7 +151,7 @@ bool ioncore_focushistory_i(ExtlFn iterfn) static Watch await_watch=WATCH_INIT; -static void await_watch_handler(Watch *watch, WRegion *prev) +static void await_watch_handler(Watch *UNUSED(watch), WRegion *prev) { WRegion *r; while(1){ @@ -228,7 +228,7 @@ WRegion *ioncore_await_focus() static WTimer* focuslist_insert_timer=NULL; static WRegion* region_awaiting_insertion; -static void timer_expired__focuslist_insert(WTimer* dummy1, Obj* dummy2) +static void timer_expired__focuslist_insert(WTimer* UNUSED(dummy1), Obj* UNUSED(dummy2)) { region_focuslist_push(region_awaiting_insertion); region_awaiting_insertion = NULL; diff --git a/ioncore/frame-pointer.c b/ioncore/frame-pointer.c index 7b76f3a2..35606385 100644 --- a/ioncore/frame-pointer.c +++ b/ioncore/frame-pointer.c @@ -179,7 +179,7 @@ static void setup_dragwin(WFrame *frame, uint tab) } -static void p_tabdrag_motion(WFrame *frame, XMotionEvent *ev, +static void p_tabdrag_motion(WFrame *UNUSED(frame), XMotionEvent *UNUSED(ev), int dx, int dy) { p_tab_x+=dx; diff --git a/ioncore/frame.c b/ioncore/frame.c index 17731220..a80af2d4 100644 --- a/ioncore/frame.c +++ b/ioncore/frame.c @@ -760,7 +760,7 @@ bool frame_set_grattr_extl(WFrame *frame, const char *attr, const char *how) } -void frame_managed_notify(WFrame *frame, WRegion *sub, WRegionNotify how) +void frame_managed_notify(WFrame *frame, WRegion *UNUSED(sub), WRegionNotify how) { bool complete; @@ -831,7 +831,7 @@ WRegion *frame_managed_disposeroot(WFrame *frame, WRegion *reg) } -int frame_default_index(WFrame *frame) +int frame_default_index(WFrame *UNUSED(frame)) { return ioncore_g.frame_default_index; } diff --git a/ioncore/gr.c b/ioncore/gr.c index b1712a1a..ad6b5610 100644 --- a/ioncore/gr.c +++ b/ioncore/gr.c @@ -448,13 +448,13 @@ bool gr_stylespec_equals(const GrStyleSpec *s1, const GrStyleSpec *s2) /*{{{ Init, deinit */ -bool grbrush_init(GrBrush *brush) +bool grbrush_init(GrBrush *UNUSED(brush)) { return TRUE; } -void grbrush_deinit(GrBrush *brush) +void grbrush_deinit(GrBrush *UNUSED(brush)) { } diff --git a/ioncore/grab.c b/ioncore/grab.c index 4963e8a7..f2f282ec 100644 --- a/ioncore/grab.c +++ b/ioncore/grab.c @@ -88,7 +88,7 @@ static void ungrab_kb_ptr() static void do_holder_remove(WRegion *holder, bool killed); -static void grab_watch_handler(Watch *w, Obj *obj) +static void grab_watch_handler(Watch *UNUSED(w), Obj *obj) { do_holder_remove((WRegion*)obj, TRUE); } diff --git a/ioncore/group-ws.c b/ioncore/group-ws.c index 305c43f2..6c2b4b09 100644 --- a/ioncore/group-ws.c +++ b/ioncore/group-ws.c @@ -245,7 +245,7 @@ WPHolder *groupws_prepare_manage(WGroupWS *ws, const WClientWin *cwin, WPHolder *groupws_prepare_manage_transient(WGroupWS *ws, const WClientWin *cwin, const WManageParams *param, - int unused) + int UNUSED(unused)) { WGroupAttachParams ap=GROUPATTACHPARAMS_INIT; WFramedParam fp=FRAMEDPARAM_INIT; diff --git a/ioncore/infowin.c b/ioncore/infowin.c index 1f28a0a5..1eb31bc3 100644 --- a/ioncore/infowin.c +++ b/ioncore/infowin.c @@ -106,7 +106,7 @@ void infowin_deinit(WInfoWin *p) /*{{{ Drawing and geometry */ -void infowin_draw(WInfoWin *p, bool complete) +void infowin_draw(WInfoWin *p, bool UNUSED(complete)) { WRectangle g; diff --git a/ioncore/kbresize.c b/ioncore/kbresize.c index 26cc5324..e1150a39 100644 --- a/ioncore/kbresize.c +++ b/ioncore/kbresize.c @@ -186,7 +186,7 @@ static bool resize_handler(WRegion *reg, XEvent *xev) static WTimer *resize_timer=NULL; -static void tmr_end_resize(WTimer *unused, WMoveresMode *mode) +static void tmr_end_resize(WTimer *UNUSED(unused), WMoveresMode *mode) { if(mode!=NULL) moveresmode_cancel(mode); diff --git a/ioncore/key.c b/ioncore/key.c index bbe79a34..3db5a800 100644 --- a/ioncore/key.c +++ b/ioncore/key.c @@ -95,7 +95,7 @@ void clientwin_quote_next(WClientWin *cwin) } -static bool waitrelease_handler(WRegion *reg, XEvent *ev) +static bool waitrelease_handler(WRegion *UNUSED(reg), XEvent *ev) { return (ioncore_unmod(ev->xkey.state, ev->xkey.keycode)==0); } diff --git a/ioncore/mplex.c b/ioncore/mplex.c index 390afaa8..e5066930 100644 --- a/ioncore/mplex.c +++ b/ioncore/mplex.c @@ -1828,7 +1828,7 @@ static StringIntMap pos_map[]={ }; -static bool do_attach_stdisp(WRegion *mplex, WRegion *reg, void *unused) +static bool do_attach_stdisp(WRegion *UNUSED(mplex), WRegion *UNUSED(reg), void *UNUSED(unused)) { /* We do not actually manage the stdisp. */ return TRUE; diff --git a/ioncore/mplexpholder.c b/ioncore/mplexpholder.c index 61acd168..bcd4212e 100644 --- a/ioncore/mplexpholder.c +++ b/ioncore/mplexpholder.c @@ -22,7 +22,7 @@ /*{{{ Primitives */ -static bool on_ph_list(WMPlexPHolder *ll, WMPlexPHolder *ph) +static bool on_ph_list(WMPlexPHolder *UNUSED(ll), WMPlexPHolder *ph) { return ph->prev!=NULL; } diff --git a/ioncore/pholder.c b/ioncore/pholder.c index d62da21f..f44076e6 100644 --- a/ioncore/pholder.c +++ b/ioncore/pholder.c @@ -13,13 +13,13 @@ #include "focus.h" -bool pholder_init(WPHolder *ph) +bool pholder_init(WPHolder *UNUSED(ph)) { return TRUE; } -void pholder_deinit(WPHolder *ph) +void pholder_deinit(WPHolder *UNUSED(ph)) { } diff --git a/ioncore/pointer.c b/ioncore/pointer.c index 9e21c04f..a63168f6 100644 --- a/ioncore/pointer.c +++ b/ioncore/pointer.c @@ -204,7 +204,7 @@ static bool handle_key(WRegion *reg, XEvent *ev) } -static void pointer_grab_killed(WRegion *unused) +static void pointer_grab_killed(WRegion *UNUSED(unused)) { if(p_reg!=NULL && p_killed_handler!=NULL) p_killed_handler(p_reg); diff --git a/ioncore/presize.c b/ioncore/presize.c index 494cc5a8..70c3bc41 100644 --- a/ioncore/presize.c +++ b/ioncore/presize.c @@ -69,7 +69,7 @@ void window_p_resize_prepare(WWindow *wwin, XButtonEvent *ev) } -static void p_moveres_end(WWindow *wwin, XButtonEvent *ev) +static void p_moveres_end(WWindow *wwin, XButtonEvent *UNUSED(ev)) { WMoveresMode *mode=moveres_mode((WRegion*)wwin); if(mode!=NULL) @@ -93,7 +93,7 @@ static void confine_to_parent(WWindow *wwin) } -static void p_resize_motion(WWindow *wwin, XMotionEvent *ev, int dx, int dy) +static void p_resize_motion(WWindow *wwin, XMotionEvent *UNUSED(ev), int dx, int dy) { WMoveresMode *mode=moveres_mode((WRegion*)wwin); if(mode!=NULL){ @@ -136,7 +136,7 @@ void window_p_resize(WWindow *wwin) /*{{{ Move */ -static void p_move_motion(WWindow *wwin, XMotionEvent *ev, int dx, int dy) +static void p_move_motion(WWindow *wwin, XMotionEvent *UNUSED(ev), int dx, int dy) { WMoveresMode *mode=moveres_mode((WRegion*)wwin); if(mode!=NULL) diff --git a/ioncore/regbind.c b/ioncore/regbind.c index cd32ab5a..b18e5c8e 100644 --- a/ioncore/regbind.c +++ b/ioncore/regbind.c @@ -73,7 +73,7 @@ static void ungrab_freed_bindings(const WRegion *reg, const WBindmap *bindmap) void rbind_binding_added(const WRegBindingInfo *rbind, const WBinding *binding, - const WBindmap *bindmap) + const WBindmap *UNUSED(bindmap)) { if(binding->area==0 && rbind->reg->flags®ION_BINDINGS_ARE_GRABBED) do_binding_grab_on_ungrab_on(rbind->reg, binding, rbind->bindmap, TRUE); @@ -82,7 +82,7 @@ void rbind_binding_added(const WRegBindingInfo *rbind, void rbind_binding_removed(const WRegBindingInfo *rbind, const WBinding *binding, - const WBindmap *bindmap) + const WBindmap *UNUSED(bindmap)) { if(binding->area==0 && rbind->reg->flags®ION_BINDINGS_ARE_GRABBED) do_binding_grab_on_ungrab_on(rbind->reg, binding, rbind->bindmap, FALSE); diff --git a/ioncore/region.c b/ioncore/region.c index 1ed60dfb..1b4353f9 100644 --- a/ioncore/region.c +++ b/ioncore/region.c @@ -481,7 +481,7 @@ bool region_may_dispose(WRegion *reg) } -static WRegion *region_managed_disposeroot_default(WRegion *mgr, WRegion *reg) +static WRegion *region_managed_disposeroot_default(WRegion *UNUSED(mgr), WRegion *reg) { return reg; } diff --git a/ioncore/resize.c b/ioncore/resize.c index 7ad15fe9..273f8ed8 100644 --- a/ioncore/resize.c +++ b/ioncore/resize.c @@ -446,7 +446,7 @@ void moveresmode_delta_move(WMoveresMode *mode, void moveresmode_rqgeom(WMoveresMode *mode, WRQGeomParams *rq, - WRectangle *rret) + WRectangle *UNUSED(rret)) { mode->mode=MOVERES_SIZE; moveresmode_do_newgeom(mode, rq); @@ -601,7 +601,7 @@ void region_managed_rqgeom_absolute(WRegion *mgr, WRegion *reg, } -void region_managed_rqgeom_allow(WRegion *mgr, WRegion *reg, +void region_managed_rqgeom_allow(WRegion *UNUSED(mgr), WRegion *reg, const WRQGeomParams *rq, WRectangle *geomret) { @@ -613,8 +613,8 @@ void region_managed_rqgeom_allow(WRegion *mgr, WRegion *reg, } -void region_managed_rqgeom_unallow(WRegion *mgr, WRegion *reg, - const WRQGeomParams *rq, +void region_managed_rqgeom_unallow(WRegion *UNUSED(mgr), WRegion *reg, + const WRQGeomParams *UNUSED(rq), WRectangle *geomret) { if(geomret!=NULL) diff --git a/ioncore/rootwin.c b/ioncore/rootwin.c index 8838b0e1..268be320 100644 --- a/ioncore/rootwin.c +++ b/ioncore/rootwin.c @@ -45,7 +45,7 @@ static bool redirect_error=FALSE; static bool ignore_badwindow=TRUE; -static int my_redirect_error_handler(Display *dpy, XErrorEvent *ev) +static int my_redirect_error_handler(Display *UNUSED(dpy), XErrorEvent *UNUSED(ev)) { redirect_error=TRUE; return 0; @@ -325,21 +325,21 @@ static void rootwin_do_set_focus(WRootWin *rootwin, bool warp) } -static bool rootwin_fitrep(WRootWin *rootwin, WWindow *par, - const WFitParams *fp) +static bool rootwin_fitrep(WRootWin *UNUSED(rootwin), WWindow *UNUSED(par), + const WFitParams *UNUSED(fp)) { D(warn("Don't know how to reparent or fit root windows.")); return FALSE; } -static void rootwin_map(WRootWin *rootwin) +static void rootwin_map(WRootWin *UNUSED(rootwin)) { D(warn("Attempt to map a root window.")); } -static void rootwin_unmap(WRootWin *rootwin) +static void rootwin_unmap(WRootWin *UNUSED(rootwin)) { D(warn("Attempt to unmap a root window -- impossible.")); } @@ -350,7 +350,7 @@ static void rootwin_managed_remove(WRootWin *rootwin, WRegion *reg) region_unset_manager(reg, (WRegion*)rootwin); } -static WRegion *rootwin_managed_disposeroot(WRootWin *rootwin, WRegion *reg) +static WRegion *rootwin_managed_disposeroot(WRootWin *UNUSED(rootwin), WRegion *reg) { WScreen *scr=OBJ_CAST(reg, WScreen); if(scr!=NULL && scr==scr->prev_scr){ diff --git a/ioncore/screen-notify.c b/ioncore/screen-notify.c index ed6058ad..6a5d94a2 100644 --- a/ioncore/screen-notify.c +++ b/ioncore/screen-notify.c @@ -380,7 +380,7 @@ void screen_unnotify_workspace_indicatorwin(void) timer_reset( workspace_indicator_remove_timer ); } -static void timer_expired__workspace_indicator_remove(WTimer* dummy1, Obj* dummy2) +static void timer_expired__workspace_indicator_remove(WTimer* UNUSED(dummy1), Obj* UNUSED(dummy2)) { if( workspace_indicator_active_screen != NULL ) screen_unnotify_workspace_indicatorwin(); @@ -480,7 +480,7 @@ void screen_update_notifywin(WScreen *scr) } -void screen_managed_notify(WScreen *scr, WRegion *reg, WRegionNotify how) +void screen_managed_notify(WScreen *scr, WRegion *UNUSED(reg), WRegionNotify how) { if(how==ioncore_g.notifies.tag) screen_update_infowin(scr); diff --git a/ioncore/screen.c b/ioncore/screen.c index dde20e78..41950b2a 100644 --- a/ioncore/screen.c +++ b/ioncore/screen.c @@ -358,7 +358,7 @@ static WRegion *screen_managed_disposeroot(WScreen *scr, WRegion *reg) } -static bool screen_may_dispose(WScreen *scr) +static bool screen_may_dispose(WScreen *UNUSED(scr)) { return TRUE; } diff --git a/ioncore/stacking.c b/ioncore/stacking.c index 72578aa1..5e213e22 100644 --- a/ioncore/stacking.c +++ b/ioncore/stacking.c @@ -588,7 +588,7 @@ WStacking *stacking_find_to_focus(WStacking *stacking, } -static bool mapped_filt(WStacking *st, void *unused) +static bool mapped_filt(WStacking *st, void *UNUSED(unused)) { return (st->reg!=NULL && REGION_IS_MAPPED(st->reg)); } diff --git a/libextl/readconfig.c b/libextl/readconfig.c index ab135f34..db9dca4d 100644 --- a/libextl/readconfig.c +++ b/libextl/readconfig.c @@ -369,7 +369,7 @@ char *extl_lookup_script(const char *file, const char *sp) return tmp; } -static int warn_notfound(const char *file, void *param) +static int warn_notfound(const char *file, void *UNUSED(param)) { warn(TR("Tried: '%s'"), file); diff --git a/libmainloop/defer.c b/libmainloop/defer.c index 3e38080a..a9a77791 100644 --- a/libmainloop/defer.c +++ b/libmainloop/defer.c @@ -71,7 +71,7 @@ static void free_defer(WDeferred *d) } -static void defer_watch_handler(Watch *w, Obj *obj) +static void defer_watch_handler(Watch *w, Obj *UNUSED(obj)) { WDeferred *d=(WDeferred*)w; diff --git a/libmainloop/hooks.c b/libmainloop/hooks.c index 2ec4b346..1ab6bb9e 100644 --- a/libmainloop/hooks.c +++ b/libmainloop/hooks.c @@ -269,14 +269,14 @@ bool hook_remove_extl(WHook *hk, ExtlFn efn) /*{{{ Basic marshallers */ -static bool marshall_v(WHookDummy *fn, void *param) +static bool marshall_v(WHookDummy *fn, void *UNUSED(param)) { fn(); return TRUE; } -static bool marshall_extl_v(ExtlFn fn, void *param) +static bool marshall_extl_v(ExtlFn fn, void *UNUSED(param)) { extl_call(fn, NULL, NULL); return TRUE; @@ -303,13 +303,13 @@ static bool marshall_p(WHookDummy *fn, void *param) } -static bool marshall_alt_v(bool (*fn)(), void *param) +static bool marshall_alt_v(bool (*fn)(), void *UNUSED(param)) { return fn(); } -static bool marshall_extl_alt_v(ExtlFn fn, void *param) +static bool marshall_extl_alt_v(ExtlFn fn, void *UNUSED(param)) { bool ret=FALSE; extl_call(fn, NULL, "b", &ret); diff --git a/libmainloop/signal.c b/libmainloop/signal.c index e8dd710c..76b70bba 100644 --- a/libmainloop/signal.c +++ b/libmainloop/signal.c @@ -176,13 +176,13 @@ static bool mrsh_chld_extl(ExtlFn fn, ChldParams *p) return ret; } -static bool mrsh_usr2(void (*fn)(void), void *p) +static bool mrsh_usr2(void (*fn)(void), void *UNUSED(p)) { fn(); return TRUE; } -static bool mrsh_usr2_extl(ExtlFn fn, void *p) +static bool mrsh_usr2_extl(ExtlFn fn, void *UNUSED(p)) { bool ret; ExtlTab t=extl_create_table(); @@ -433,7 +433,7 @@ static void deadly_signal_handler(int signal_num) } -static void chld_handler(int signal_num) +static void chld_handler(int UNUSED(signal_num)) { #if 0 pid_t pid; @@ -446,7 +446,7 @@ static void chld_handler(int signal_num) #endif } -static void usr2_handler(int signal_num) +static void usr2_handler(int UNUSED(signal_num)) { usr2_sig=1; } @@ -462,13 +462,13 @@ static void exit_handler(int signal_num) } -static void timer_handler(int signal_num) +static void timer_handler(int UNUSED(signal_num)) { had_tmr=TRUE; } -static void ignore_handler(int signal_num) +static void ignore_handler(int UNUSED(signal_num)) { } diff --git a/mod_dock/dock.c b/mod_dock/dock.c index 4370ceb9..ff6c1da4 100644 --- a/mod_dock/dock.c +++ b/mod_dock/dock.c @@ -1305,7 +1305,7 @@ WRegion *dock_load(WWindow *par, const WFitParams *fp, ExtlTab tab) /*{{{ Client window management setup */ -static bool dock_do_attach_final(WDock *dock, WRegion *reg, void *unused) +static bool dock_do_attach_final(WDock *dock, WRegion *reg, void *UNUSED(unused)) { WDockApp *dockapp, *before_dockapp; WRectangle geom; @@ -1385,20 +1385,20 @@ bool dock_attach(WDock *dock, WRegion *reg) } -static bool dock_handle_drop(WDock *dock, int x, int y, +static bool dock_handle_drop(WDock *dock, int UNUSED(x), int UNUSED(y), WRegion *dropped) { return dock_attach(dock, dropped); } -static WRegion *dock_ph_handler(WDock *dock, int flags, WRegionAttachData *data) +static WRegion *dock_ph_handler(WDock *dock, int UNUSED(flags), WRegionAttachData *data) { return dock_do_attach(dock, data); } -static WPHolder *dock_managed_get_pholder(WDock *dock, WRegion *mgd) +static WPHolder *dock_managed_get_pholder(WDock *dock, WRegion *UNUSED(mgd)) { return (WPHolder*)create_basicpholder((WRegion*)dock, ((WBasicPHolderHandler*) @@ -1406,7 +1406,7 @@ static WPHolder *dock_managed_get_pholder(WDock *dock, WRegion *mgd) } -static WPHolder *dock_prepare_manage(WDock *dock, const WClientWin *cwin, +static WPHolder *dock_prepare_manage(WDock *dock, const WClientWin *UNUSED(cwin), const WManageParams *param UNUSED, int priority) { diff --git a/mod_menu/menu.c b/mod_menu/menu.c index 6857cf9e..1914b966 100644 --- a/mod_menu/menu.c +++ b/mod_menu/menu.c @@ -1317,7 +1317,7 @@ void menu_release(WMenu *menu, XButtonEvent *ev) } -void menu_motion(WMenu *menu, XMotionEvent *ev, int dx, int dy) +void menu_motion(WMenu *menu, XMotionEvent *ev, int UNUSED(dx), int UNUSED(dy)) { menu_select_entry_at(menu, ev->x_root, ev->y_root); check_scroll(menu, ev->x_root, ev->y_root); @@ -1332,7 +1332,7 @@ void menu_button(WMenu *menu, XButtonEvent *ev) } -int menu_press(WMenu *menu, XButtonEvent *ev, WRegion **reg_ret) +int menu_press(WMenu *menu, XButtonEvent *ev, WRegion **UNUSED(reg_ret)) { menu_button(menu, ev); menu=menu_head(menu); diff --git a/mod_notionflux/mod_notionflux.c b/mod_notionflux/mod_notionflux.c index 5444053a..c055c443 100644 --- a/mod_notionflux/mod_notionflux.c +++ b/mod_notionflux/mod_notionflux.c @@ -142,7 +142,7 @@ static void receive_data(int fd, void *buf_) } -static void connection_attempt(int lfd, void *data) +static void connection_attempt(int lfd, void *UNUSED(data)) { int i, fd; struct sockaddr_un from; diff --git a/mod_query/wedln.c b/mod_query/wedln.c index f284ed2d..dd2c1084 100644 --- a/mod_query/wedln.c +++ b/mod_query/wedln.c @@ -711,7 +711,7 @@ static bool wedln_do_call_completor(WEdln *wedln, int id, int cycle) } -static void timed_complete(WTimer *tmr, Obj *obj) +static void timed_complete(WTimer *UNUSED(tmr), Obj *obj) { WEdln *wedln=(WEdln*)obj; @@ -1069,7 +1069,7 @@ void wedln_insstr(WEdln *wedln, const char *buf, size_t n) } -static const char *wedln_style(WEdln *wedln) +static const char *wedln_style(WEdln *UNUSED(wedln)) { return "input-edln"; } diff --git a/mod_query/wmessage.c b/mod_query/wmessage.c index 876550b4..80ba2033 100644 --- a/mod_query/wmessage.c +++ b/mod_query/wmessage.c @@ -234,7 +234,7 @@ static void wmsg_deinit(WMessage *wmsg) } -static const char *wmsg_style(WMessage *wmsg) +static const char *wmsg_style(WMessage *UNUSED(wmsg)) { return "input-message"; } diff --git a/mod_sm/sm_session.c b/mod_sm/sm_session.c index 9c4b6a83..23c643b8 100644 --- a/mod_sm/sm_session.c +++ b/mod_sm/sm_session.c @@ -64,7 +64,7 @@ char *mod_sm_get_ion_id() unpacks the message and sends it to the client via registered callbacks. */ -static void sm_process_messages(int fd, void *data) +static void sm_process_messages(int UNUSED(fd), void *UNUSED(data)) { Bool ret; @@ -77,9 +77,9 @@ static void sm_process_messages(int fd, void *data) opened or closed. */ static void sm_ice_watch_fd(IceConn conn, - IcePointer client_data, + IcePointer UNUSED(client_data), Bool opening, - IcePointer *watch_data) + IcePointer *UNUSED(watch_data)) { if(opening){ if(sm_fd!=-1){ /* shouldn't happen */ @@ -220,7 +220,7 @@ static void sm_set_properties() saving state. This is requested in the save yourself callback by clients like this one that manages other clients. */ -static void sm_save_yourself_phase2(SmcConn conn, SmPointer client_data) +static void sm_save_yourself_phase2(SmcConn conn, SmPointer UNUSED(client_data)) { Bool success; @@ -236,12 +236,12 @@ static void sm_save_yourself_phase2(SmcConn conn, SmPointer client_data) /* Callback. Called when the client recieves a save yourself message from the sm. */ -static void sm_save_yourself(SmcConn conn, - SmPointer client_data, - int save_type, - Bool shutdown, - int interact_style, - Bool fast) +static void sm_save_yourself(SmcConn UNUSED(conn), + SmPointer UNUSED(client_data), + int UNUSED(save_type), + Bool UNUSED(shutdown), + int UNUSED(interact_style), + Bool UNUSED(fast)) { if(!SmcRequestSaveYourselfPhase2(sm_conn, sm_save_yourself_phase2, NULL)){ warn(TR("Failed to request save-yourself-phase2 from " @@ -255,7 +255,7 @@ static void sm_save_yourself(SmcConn conn, /* Response to the shutdown cancelled message */ -static void sm_shutdown_cancelled(SmcConn conn, SmPointer client_data) +static void sm_shutdown_cancelled(SmcConn conn, SmPointer UNUSED(client_data)) { save_complete_fn=NULL; if(!sent_save_done){ @@ -266,7 +266,7 @@ static void sm_shutdown_cancelled(SmcConn conn, SmPointer client_data) /* Callback */ -static void sm_save_complete(SmcConn conn, SmPointer client_data) +static void sm_save_complete(SmcConn UNUSED(conn), SmPointer UNUSED(client_data)) { if(save_complete_fn){ save_complete_fn(); @@ -276,7 +276,7 @@ static void sm_save_complete(SmcConn conn, SmPointer client_data) /* Callback */ -static void sm_die(SmcConn conn, SmPointer client_data) +static void sm_die(SmcConn conn, SmPointer UNUSED(client_data)) { assert(conn==sm_conn); ioncore_do_exit(); diff --git a/mod_sp/main.c b/mod_sp/main.c index 0f7d8e9a..5c863151 100644 --- a/mod_sp/main.c +++ b/mod_sp/main.c @@ -53,14 +53,14 @@ char mod_sp_ion_api_version[]=NOTION_API_VERSION; static WRegion *create_frame_scratchpad(WWindow *parent, const WFitParams *fp, - void *unused) + void *UNUSED(unused)) { return (WRegion*)create_frame(parent, fp, FRAME_MODE_UNKNOWN, "Scratchpad Frame"); } static WRegion *create_scratchws(WWindow *parent, const WFitParams *fp, - void *unused) + void *UNUSED(unused)) { WRegion *reg; WRegionAttachData data; diff --git a/mod_statusbar/statusbar.c b/mod_statusbar/statusbar.c index fbc0af2b..55e44e53 100644 --- a/mod_statusbar/statusbar.c +++ b/mod_statusbar/statusbar.c @@ -489,7 +489,7 @@ static void systray_adjust_size(WRegion *reg, WRectangle *g) static WRegion *statusbar_do_attach_final(WStatusBar *sb, WRegion *reg, - void *unused) + void *UNUSED(unused)) { WFitParams fp; WSBElem *el; @@ -538,7 +538,7 @@ static WRegion *statusbar_do_attach(WStatusBar *sb, WRegionAttachData *data) } -static WRegion *statusbar_attach_ph(WStatusBar *sb, int flags, +static WRegion *statusbar_attach_ph(WStatusBar *sb, int UNUSED(flags), WRegionAttachData *data) { return statusbar_do_attach(sb, data); @@ -546,8 +546,8 @@ static WRegion *statusbar_attach_ph(WStatusBar *sb, int flags, static WPHolder *statusbar_prepare_manage(WStatusBar *sb, - const WClientWin *cwin, - const WManageParams *param, + const WClientWin *UNUSED(cwin), + const WManageParams *UNUSED(param), int priority) { if(!MANAGE_PRIORITY_OK(priority, MANAGE_PRIORITY_LOW)) @@ -651,7 +651,7 @@ bool statusbar_fitrep(WStatusBar *sb, WWindow *par, const WFitParams *fp) WPHolder *statusbar_prepare_manage_transient(WStatusBar *sb, const WClientWin *cwin, const WManageParams *param, - int unused) + int UNUSED(unused)) { WRegion *mgr=REGION_MANAGER(sb); @@ -976,7 +976,7 @@ void statusbar_updategr(WStatusBar *p) /*{{{ Misc */ -int statusbar_orientation(WStatusBar *sb) +int statusbar_orientation(WStatusBar *UNUSED(sb)) { return REGION_ORIENTATION_HORIZONTAL; } diff --git a/mod_tiling/split.c b/mod_tiling/split.c index 86a31211..25b66b6a 100644 --- a/mod_tiling/split.c +++ b/mod_tiling/split.c @@ -318,7 +318,7 @@ void splitst_deinit(WSplitST *split) /*{{{ Size bounds management */ -static void splitregion_update_bounds(WSplitRegion *node, bool recursive) +static void splitregion_update_bounds(WSplitRegion *node, bool UNUSED(recursive)) { WSizeHints hints; WSplit *snode=(WSplit*)node; @@ -337,7 +337,7 @@ static void splitregion_update_bounds(WSplitRegion *node, bool recursive) } -static void splitst_update_bounds(WSplitST *node, bool rec) +static void splitst_update_bounds(WSplitST *node, bool UNUSED(rec)) { WSplit *snode=(WSplit*)node; @@ -547,16 +547,16 @@ static WSplit *dodge_stdisp(WSplit *node, bool keep_within) static void split_do_resize_default(WSplit *node, const WRectangle *ng, - WPrimn hprimn, WPrimn vprimn, - bool transpose) + WPrimn UNUSED(hprimn), WPrimn UNUSED(vprimn), + bool UNUSED(transpose)) { node->geom=*ng; } static void splitregion_do_resize(WSplitRegion *node, const WRectangle *ng, - WPrimn hprimn, WPrimn vprimn, - bool transpose) + WPrimn UNUSED(hprimn), WPrimn UNUSED(vprimn), + bool UNUSED(transpose)) { assert(node->reg!=NULL); region_fit(node->reg, ng, REGION_FIT_EXACT); @@ -1017,7 +1017,7 @@ bool splitregion_do_restore(WSplitRegion *node, int dir) return ret; } -bool splitst_do_restore(WSplit *node, int dir) +bool splitst_do_restore(WSplit *UNUSED(node), int UNUSED(dir)) { return FALSE; } @@ -1110,7 +1110,7 @@ void splitregion_do_maxhelper(WSplitRegion *node, int dir, int action) frame->flags&=~FRAME_KEEP_FLAGS; } -void splitst_do_maxhelper(WSplit *node, int dir, int action) +void splitst_do_maxhelper(WSplit *UNUSED(node), int UNUSED(dir), int UNUSED(action)) { return; } @@ -1171,7 +1171,7 @@ bool splitregion_do_verify(WSplitRegion *node, int dir) return ret; } -bool splitst_do_verify(WSplit *node, int dir) +bool splitst_do_verify(WSplit *UNUSED(node), int UNUSED(dir)) { return TRUE; } @@ -1783,7 +1783,7 @@ static bool defaultfilter(WSplit *node) static WSplit *split_current_todir_default(WSplit *node, - WPrimn hprimn, WPrimn vprimn, + WPrimn UNUSED(hprimn), WPrimn UNUSED(vprimn), WSplitFilter *filter) { if(filter==NULL) @@ -1890,7 +1890,7 @@ WSplit *split_nextto(WSplit *node, WPrimn hprimn, WPrimn vprimn, } -void splitinner_mark_current_default(WSplitInner *split, WSplit *child) +void splitinner_mark_current_default(WSplitInner *split, WSplit *UNUSED(child)) { if(((WSplit*)split)->parent!=NULL) splitinner_mark_current(((WSplit*)split)->parent, (WSplit*)split); diff --git a/system-autodetect.mk b/system-autodetect.mk index e26eed91..3a9b371c 100644 --- a/system-autodetect.mk +++ b/system-autodetect.mk @@ -147,11 +147,7 @@ EXTRA_LIBS += -lrt CC ?= gcc -# Same as '-Wall -pedantic' without '-Wunused' as callbacks often -# have unused variables. -WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \ - -Wtrigraphs -Wformat -Wchar-subscripts \ - -Wparentheses -pedantic -Wuninitialized +WARN=-W -Wall -pedantic CFLAGS += -Os $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) \ -DHAS_SYSTEM_ASPRINTF=$(HAS_SYSTEM_ASPRINTF) -- 2.11.4.GIT