Fix a compiler complaint
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
2a41847aa6
commit
bb8fd08b5b
10
src/render.c
10
src/render.c
|
@ -1153,17 +1153,19 @@ bool init_render(session_t *ps) {
|
|||
|
||||
// Blur filter
|
||||
if (ps->o.blur_background || ps->o.blur_background_frame) {
|
||||
bool ret;
|
||||
bool ret = false;
|
||||
if (ps->o.backend == BKEND_GLX) {
|
||||
#ifdef CONFIG_OPENGL
|
||||
ret = glx_init_blur(ps);
|
||||
#else
|
||||
assert(false);
|
||||
#endif
|
||||
} else
|
||||
} else {
|
||||
ret = xr_init_blur(ps);
|
||||
if (!ret)
|
||||
return false;
|
||||
}
|
||||
if (!ret) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ps->gaussian_map = gaussian_kernel(ps->o.shadow_radius);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
|
@ -29,6 +30,13 @@ safe_isnan(double a) {
|
|||
return isnan(a);
|
||||
}
|
||||
|
||||
/// Same as assert false, but make sure we abort _even in release builds_.
|
||||
/// Silence compiler warning caused by release builds making some code paths reachable.
|
||||
attr_noret static inline void BUG(void) {
|
||||
assert(false);
|
||||
abort();
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize an int value to a specific range.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue