From a1e97828c89278770cb249039ec92d959440c640 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 9 Jan 2012 16:34:28 +0100 Subject: xwininfo libX11 mesa mkfontscale xkeyboard-config git update 9 jan 2011 --- mesalib/src/gallium/auxiliary/util/u_debug.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'mesalib/src/gallium/auxiliary/util/u_debug.h') diff --git a/mesalib/src/gallium/auxiliary/util/u_debug.h b/mesalib/src/gallium/auxiliary/util/u_debug.h index cbea35830..ed19cda05 100644 --- a/mesalib/src/gallium/auxiliary/util/u_debug.h +++ b/mesalib/src/gallium/auxiliary/util/u_debug.h @@ -214,6 +214,25 @@ void _debug_assert_fail(const char *expr, #endif +/** + * Emit a warning message, but only once. + */ +#ifdef DEBUG +#define debug_warn_once(__msg) \ + do { \ + static bool warned = FALSE; \ + if (!warned) { \ + _debug_printf("%s:%u:%s: one time warning: %s\n", \ + __FILE__, __LINE__, __FUNCTION__, __msg); \ + warned = TRUE; \ + } \ + } while (0) +#else +#define debug_warn_once(__msg) \ + ((void)0) +#endif + + /** * Output an error message. Not muted on release version. */ -- cgit v1.2.3