st/nine: Fix build with -Werror=empty-body
authorTimur Kristóf <timur.kristof@gmail.com>
Fri, 25 Oct 2019 08:44:23 +0000 (10:44 +0200)
committerTimur Kristóf <timur.kristof@gmail.com>
Fri, 25 Oct 2019 10:44:44 +0000 (12:44 +0200)
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 <timur.kristof@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/gallium/state_trackers/nine/nine_debug.h

index 2bbb73ef96ae7e25a79207c7cc8f1c75c00d80c3..905568d0d1771812462d0304e7848281902dc2df 100644 (file)
@@ -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__)