summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-11-24 18:18:13 +0000
committerEmil Velikov <[email protected]>2016-11-28 19:12:38 +0000
commit7feac8bdb9d8f76f20e41e3b0314168738dd37fd (patch)
tree8f9e2bd05925451c9a85d5ca041e7296a4c14ee4 /src/intel
parent6dae5be806d385a6ef628aa8144885c1a218c051 (diff)
anv: use do { } while (0) in the anv_finishme macro
Use the generic construct instead of the currect GCC specific one. Suggested-by: Kenneth Graunke <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_private.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 2fc543daacc..edc008db715 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -207,13 +207,14 @@ void anv_loge_v(const char *format, va_list va);
/**
* Print a FINISHME message, including its source location.
*/
-#define anv_finishme(format, ...) ({ \
- static bool reported = false; \
- if (!reported) { \
- __anv_finishme(__FILE__, __LINE__, format, ##__VA_ARGS__); \
- reported = true; \
- } \
-})
+#define anv_finishme(format, ...) \
+ do { \
+ static bool reported = false; \
+ if (!reported) { \
+ __anv_finishme(__FILE__, __LINE__, format, ##__VA_ARGS__); \
+ reported = true; \
+ } \
+ } while (0)
/* A non-fatal assert. Useful for debugging. */
#ifdef DEBUG