From: Emil Velikov Date: Thu, 24 Nov 2016 18:18:15 +0000 (+0000) Subject: isl: Make isl_finishme only warn once per call-site X-Git-Tag: upstream/17.1.0~4303 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f9397753b9db577ad41ff1e8e72d9ae90401261;p=platform%2Fupstream%2Fmesa.git isl: Make isl_finishme only warn once per call-site Signed-off-by: Emil Velikov --- diff --git a/src/intel/isl/isl_priv.h b/src/intel/isl/isl_priv.h index dc3975d..1867d25 100644 --- a/src/intel/isl/isl_priv.h +++ b/src/intel/isl/isl_priv.h @@ -33,7 +33,13 @@ #include "isl.h" #define isl_finishme(format, ...) \ - __isl_finishme(__FILE__, __LINE__, format, ##__VA_ARGS__) + do { \ + static bool reported = false; \ + if (!reported) { \ + __isl_finishme(__FILE__, __LINE__, format, ##__VA_ARGS__); \ + reported = true; \ + } \ + } while (0) void PRINTFLIKE(3, 4) UNUSED __isl_finishme(const char *file, int line, const char *fmt, ...);