Warn about fallthrough

And fix some fallthroughs
This commit is contained in:
Yuxuan Shui 2018-08-14 10:51:01 +01:00
parent 5e1411c5c6
commit a1afb76c44
2 changed files with 3 additions and 6 deletions

View File

@ -129,7 +129,7 @@ endif
LIBS += $(shell pkg-config --libs $(PACKAGES))
INCS += $(shell pkg-config --cflags $(PACKAGES))
CFLAGS += -Wall
CFLAGS += -Wall -Wimplicit-fallthrough
BINS = compton bin/compton-trans
MANPAGES = man/compton.1 man/compton-trans.1

View File

@ -2017,7 +2017,7 @@ paint_all(session_t *ps, XserverRegion region, XserverRegion region_real, win *t
glx_render(ps, ps->tgt_buffer.ptex, 0, 0, 0, 0,
ps->root_width, ps->root_height, 0, 1.0, false, false,
region_real, NULL, NULL);
// No break here!
// falls through
case BKEND_GLX:
if (ps->o.glx_use_copysubbuffermesa)
glx_swap_copysubbuffermesa(ps, region_real);
@ -6594,10 +6594,7 @@ init_filters(session_t *ps) {
}
#ifdef CONFIG_VSYNC_OPENGL
case BKEND_GLX:
{
if (!glx_init_blur(ps))
return false;
}
return glx_init_blur(ps);
#endif
default:
assert(false);