mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 00:28:20 +00:00
[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:
parent
b2630024a7
commit
85a96d1e06
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "common/debug.h"
|
||||
#include "common/array.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
#define RESIZE_TIMEOUT (10 * 1000) // 10ms
|
||||
@ -185,7 +184,7 @@ void core_updatePositionInfo(void)
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(!"unreachable");
|
||||
DEBUG_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (g_params.keepAspect)
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <fontconfig/fontconfig.h>
|
||||
|
||||
@ -182,7 +181,7 @@ void util_localCurToGuest(struct DoublePoint *guest)
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(!"unreachable");
|
||||
DEBUG_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user