diff --git a/src/common.h b/src/common.h index 2b75ff7..52c3ac7 100644 --- a/src/common.h +++ b/src/common.h @@ -2402,7 +2402,7 @@ xr_sync_(session_t *ps, Drawable d if (!*pfence) *pfence = XSyncCreateFence(ps->dpy, d, False); if (*pfence) { - Bool triggered = False; + Bool __attribute__((unused)) triggered = False; /* if (XSyncQueryFence(ps->dpy, *pfence, &triggered) && triggered) XSyncResetFence(ps->dpy, *pfence); */ // The fence may fail to be created (e.g. because of died drawable) diff --git a/src/compton.c b/src/compton.c index 6af3403..7a16951 100644 --- a/src/compton.c +++ b/src/compton.c @@ -1722,6 +1722,8 @@ win_paint_win(session_t *ps, win *w, XserverRegion reg_paint, reg_paint, pcache_reg); break; #endif + default: + assert(false); } } @@ -2666,29 +2668,6 @@ win_on_factor_change(session_t *ps, win *w) { ps->o.unredir_if_possible_blacklist, &w->cache_uipblst); } -/** - * Process needed window updates. - */ -static void -win_upd_run(session_t *ps, win *w, win_upd_t *pupd) { - if (pupd->shadow) { - win_determine_shadow(ps, w); - pupd->shadow = false; - } - if (pupd->fade) { - win_determine_fade(ps, w); - pupd->fade = false; - } - if (pupd->invert_color) { - win_determine_invert_color(ps, w); - pupd->invert_color = false; - } - if (pupd->focus) { - win_update_focused(ps, w); - pupd->focus = false; - } -} - /** * Update cache data in struct _win that depends on window size. */ @@ -3444,8 +3423,6 @@ wid_get_prop_window(session_t *ps, Window wid, Atom aprop) { */ static void win_update_focused(session_t *ps, win *w) { - bool focused_old = w->focused; - if (UNSET != w->focused_force) { w->focused = w->focused_force; } @@ -6622,6 +6599,8 @@ init_filters(session_t *ps) { return false; } #endif + default: + assert(false); } } diff --git a/src/compton.h b/src/compton.h index 24ef2d5..5acb9bc 100644 --- a/src/compton.h +++ b/src/compton.h @@ -733,6 +733,8 @@ set_tgt_clip(session_t *ps, XserverRegion reg, const reg_data_t *pcache_reg) { glx_set_clip(ps, reg, pcache_reg); break; #endif + default: + assert(false); } } @@ -885,9 +887,6 @@ win_on_wtype_change(session_t *ps, win *w); static void win_on_factor_change(session_t *ps, win *w); -static void -win_upd_run(session_t *ps, win *w, win_upd_t *pupd); - static void calc_win_size(session_t *ps, win *w); diff --git a/src/dbus.h b/src/dbus.h index a806c2d..b924a5e 100644 --- a/src/dbus.h +++ b/src/dbus.h @@ -25,7 +25,7 @@ #define CDBUS_ERROR_BADARG CDBUS_ERROR_PREFIX ".bad_argument" #define CDBUS_ERROR_BADARG_S "Failed to parse argument %d: %s" #define CDBUS_ERROR_BADWIN CDBUS_ERROR_PREFIX ".bad_window" -#define CDBUS_ERROR_BADWIN_S "Requested window %#010lx not found." +#define CDBUS_ERROR_BADWIN_S "Requested window %#010x not found." #define CDBUS_ERROR_BADTGT CDBUS_ERROR_PREFIX ".bad_target" #define CDBUS_ERROR_BADTGT_S "Target \"%s\" not found." #define CDBUS_ERROR_FORBIDDEN CDBUS_ERROR_PREFIX ".forbidden" diff --git a/src/opengl.c b/src/opengl.c index 3a84c98..3707b14 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -1660,8 +1660,10 @@ glx_render_(session_t *ps, const glx_texture_t *ptex, /** * Render a region with color. + * + * Unused but can be useful for debugging */ -static void +static void __attribute__((unused)) glx_render_color(session_t *ps, int dx, int dy, int width, int height, int z, XserverRegion reg_tgt, const reg_data_t *pcache_reg) { static int color = 0; @@ -1696,8 +1698,10 @@ glx_render_color(session_t *ps, int dx, int dy, int width, int height, int z, /** * Render a region with dots. + * + * Unused but can be useful for debugging */ -static void +static void __attribute__((unused)) glx_render_dots(session_t *ps, int dx, int dy, int width, int height, int z, XserverRegion reg_tgt, const reg_data_t *pcache_reg) { glColor4f(0.0f, 0.0f, 0.0f, 1.0f);