Mesa (master): st/nine: Fix build with -Werror=empty-body
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Oct 25 11:52:51 UTC 2019
Module: Mesa
Branch: master
Commit: f091b028251fb38d9555b90ca25c5d616dc94c72
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f091b028251fb38d9555b90ca25c5d616dc94c72
Author: Timur Kristóf <timur.kristof at gmail.com>
Date: Fri Oct 25 10:44:23 2019 +0200
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 <timur.kristof at gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
---
src/gallium/state_trackers/nine/nine_debug.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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__)
More information about the mesa-commit
mailing list