[client] all: use DEBUG_UNREACHABLE instead of assert

Due to the way assert is defined in standard C, compilers in release mode
will not treat it as unreachable. This explains a lot about those pesky
uninitialized variable bugs, actually.
This commit is contained in:
Quantum
2021-08-13 19:43:51 -04:00
committed by Geoffrey McRae
parent b2630024a7
commit 85a96d1e06
4 changed files with 4 additions and 7 deletions

View File

@@ -330,7 +330,7 @@ struct CursorState egl_cursorRender(EGL_Cursor * cursor,
break;
default:
assert(!"unreachable");
DEBUG_UNREACHABLE();
}
state.rect.x = max(0, state.rect.x);

View File

@@ -36,7 +36,6 @@
#include "cimgui.h"
#include "generator/output/cimgui_impl.h"
#include <assert.h>
#include <math.h>
#include <string.h>
@@ -325,7 +324,7 @@ static void egl_calc_mouse_size(struct Inst * this)
break;
default:
assert(!"unreachable");
DEBUG_UNREACHABLE();
}
switch((this->format.rotate + this->rotate) % LG_ROTATE_MAX)