From 3197f7eb8f1f99d7e1b328b43e8e0da0e927f961 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sun, 20 Mar 2016 20:29:38 +0100 Subject: [PATCH] Fix 2 warnings when building with Clang __attribute__ ((format (printf, 5, 6))) is supported by both GCC and Clang. This fixes the following warnings: In file included from log.c:33: ./log.h:42:48: warning: format attribute argument not supported: gnu_printf [-Wignored-attributes] const char *fmt, ...) __attribute__ ((format (gnu_printf, 5, 6))); ^ ./log.h:43:73: warning: format attribute argument not supported: gnu_printf [-Wignored-attributes] void log_write_direct(int log_id, const char *fmt, ...) __attribute__ ((format (gnu_printf, 2, 3))); ^ 2 warnings generated. --- src/log/log.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/log/log.h b/src/log/log.h index 63792eec..97b1bba7 100644 --- a/src/log/log.h +++ b/src/log/log.h @@ -39,7 +39,7 @@ void log_close(int log_id); void log_shutdown(void); void log_write(int log_id, unsigned priority, const char *cat, const char *func, - const char *fmt, ...) __attribute__ ((format (gnu_printf, 5, 6))); -void log_write_direct(int log_id, const char *fmt, ...) __attribute__ ((format (gnu_printf, 2, 3))); + const char *fmt, ...) __attribute__ ((format (printf, 5, 6))); +void log_write_direct(int log_id, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); #endif /* __LOG_H__ */