switched to a sizeof() version

avoid -Werror=unused-variable issue
dev
Yann Collet 2018-06-26 14:08:35 -07:00
parent f98ec46979
commit 7b9bbf77c9
1 changed files with 3 additions and 2 deletions

View File

@ -58,8 +58,9 @@ extern "C" {
/* static assert is triggered at compile time, leaving no runtime artefact,
* but can only work with compile-time constants */
#define DEBUG_STATIC_ASSERT(c) { extern char DEBUG_static_assert[(c) ? 1 : -1]; }
* but can only work with compile-time constants.
* This variant can only be used inside a function. */
#define DEBUG_STATIC_ASSERT(c) (void)sizeof(char[(c) ? 1 : -1])
/* DEBUGLEVEL is expected to be defined externally,