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
|
// Blur filter
|
||||||
if (ps->o.blur_background || ps->o.blur_background_frame) {
|
if (ps->o.blur_background || ps->o.blur_background_frame) {
|
||||||
bool ret;
|
bool ret = false;
|
||||||
if (ps->o.backend == BKEND_GLX) {
|
if (ps->o.backend == BKEND_GLX) {
|
||||||
#ifdef CONFIG_OPENGL
|
#ifdef CONFIG_OPENGL
|
||||||
ret = glx_init_blur(ps);
|
ret = glx_init_blur(ps);
|
||||||
#else
|
#else
|
||||||
assert(false);
|
assert(false);
|
||||||
#endif
|
#endif
|
||||||
} else
|
} else {
|
||||||
ret = xr_init_blur(ps);
|
ret = xr_init_blur(ps);
|
||||||
if (!ret)
|
}
|
||||||
return false;
|
if (!ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ps->gaussian_map = gaussian_kernel(ps->o.shadow_radius);
|
ps->gaussian_map = gaussian_kernel(ps->o.shadow_radius);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include "compiler.h"
|
#include "compiler.h"
|
||||||
|
|
||||||
|
@ -29,6 +30,13 @@ safe_isnan(double a) {
|
||||||
return isnan(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.
|
* Normalize an int value to a specific range.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue