And set the function attribute to printf-style Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> --- rendercheck.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/rendercheck.h b/rendercheck.h index 7dc9dc9..89db20d 100644 --- a/rendercheck.h +++ b/rendercheck.h @@ -31,12 +31,14 @@ #else # include <stdarg.h> # include <stdlib.h> -static inline void errx(int eval, const char *fmt, ...) { +__attribute__((format(printf, 2, 3))) +static inline void errx(int eval, const char *fmt, ...) +{ va_list args; va_start(args, fmt); fprintf(stderr, "Fatal Error: "); - fprintf(stderr, fmt, args); + vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); va_end(args); exit(eval); -- 2.9.3 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel