Skip to content

Commit

Permalink
Clear compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
yshui committed May 17, 2018
1 parent af8a08e commit 27fc4a2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/common.h
Expand Up @@ -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)
Expand Down
29 changes: 4 additions & 25 deletions src/compton.c
Expand Up @@ -1722,6 +1722,8 @@ win_paint_win(session_t *ps, win *w, XserverRegion reg_paint,
reg_paint, pcache_reg);
break;
#endif
default:
assert(false);
}
}

Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -6622,6 +6599,8 @@ init_filters(session_t *ps) {
return false;
}
#endif
default:
assert(false);
}
}

Expand Down
5 changes: 2 additions & 3 deletions src/compton.h
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/dbus.h
Expand Up @@ -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"
Expand Down
8 changes: 6 additions & 2 deletions src/opengl.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 27fc4a2

Please sign in to comment.