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 <kenneth@whitecape.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Emil Velikov 2016-11-24 18:18:13 +00:00 committed by Emil Velikov
parent 6dae5be806
commit 7feac8bdb9
1 changed files with 8 additions and 7 deletions

View File

@ -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