From 23b55d6b3e705794613111e9d343adee3c987e02 Mon Sep 17 00:00:00 2001 From: Mitch Phillips <31459023+hctim@users.noreply.github.com> Date: Tue, 14 Jul 2020 08:49:43 -0700 Subject: [PATCH] Fix -Wunused-variable under FUZZING_BUILD_MODE... Fuzzing build modes (FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) doesn't necessarily imply that assert() is enabled, according to the manual. When the current do-nothing is expanded under -Wunused-variable (-Wall), it results in unused variables in some of the FUZZING_BUILD_MODE... blocks. This patch extends the do-nothing to avoid the unused variable. --- lib/common/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/debug.h b/lib/common/debug.h index ac622488..37ce370c 100644 --- a/lib/common/debug.h +++ b/lib/common/debug.h @@ -79,7 +79,7 @@ extern "C" { # include #else # ifndef assert /* assert may be already defined, due to prior #include */ -# define assert(condition) ((void)0) /* disable assert (default) */ +# define assert(condition) ((void) (condition)) /* disable assert (default) */ # endif #endif