From: Timur Kristóf Date: Fri, 25 Oct 2019 08:44:23 +0000 (+0200) Subject: st/nine: Fix build with -Werror=empty-body X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f091b028251fb38d9555b90ca25c5d616dc94c72;p=mesa.git st/nine: Fix build with -Werror=empty-body Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1995 Fixes: 8d43e2b2ded0fe3c82d4 ("meson: add -Werror=empty-body to disallow `if(x);`") Signed-off-by: Timur Kristóf Reviewed-by: Eric Engestrom --- diff --git a/src/gallium/state_trackers/nine/nine_debug.h b/src/gallium/state_trackers/nine/nine_debug.h index 2bbb73ef96a..905568d0d17 100644 --- a/src/gallium/state_trackers/nine/nine_debug.h +++ b/src/gallium/state_trackers/nine/nine_debug.h @@ -44,15 +44,15 @@ _nine_debug_printf( unsigned long flag, } \ } while(0) #else -#define WARN(fmt, ...) -#define WARN_ONCE(fmt, ...) +#define WARN(fmt, ...) do {} while(0) +#define WARN_ONCE(fmt, ...) do {} while(0) #endif #if defined(DEBUG) || !defined(NDEBUG) #define DBG_FLAG(flag, fmt, ...) \ _nine_debug_printf(flag, __FUNCTION__, fmt, ## __VA_ARGS__) #else -#define DBG_FLAG(flag, fmt, ...) +#define DBG_FLAG(flag, fmt, ...) do {} while(0) #endif #define DBG(fmt, ...) DBG_FLAG(DBG_CHANNEL, fmt, ## __VA_ARGS__)