From fe3e1849b7f4d7be9152b488f6926da1d1079a49 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 26 May 2015 18:08:04 +0200 Subject: [PATCH] core: make nm_assert() always compile condition Even if asserts are not enabled, still let the compiler see what we would assert. Otherwise, we get warnings about unused variables or we migth miss compile errors inside nm_assert(). --- include/nm-macros-internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nm-macros-internal.h b/include/nm-macros-internal.h index d510445f32..8260c2b562 100644 --- a/include/nm-macros-internal.h +++ b/include/nm-macros-internal.h @@ -105,7 +105,7 @@ #ifdef NM_MORE_ASSERTS #define nm_assert(cond) G_STMT_START { g_assert (cond); } G_STMT_END #else -#define nm_assert(cond) G_STMT_START { (void) 0; } G_STMT_END +#define nm_assert(cond) G_STMT_START { if (FALSE) { if (cond) { } } } G_STMT_END #endif /*****************************************************************************/