Mercurial > hg > th-libs
diff th_util.h @ 570:262411458cde
Add __attribute__(__format__ ..) specifiers for functions that use printf() style format specifiers.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 09 Jan 2020 13:36:41 +0200 |
parents | 3a852e9f70a6 |
children | 7c0aa6bf484a |
line wrap: on
line diff
--- a/th_util.h Wed Jan 08 02:36:42 2020 +0200 +++ b/th_util.h Thu Jan 09 13:36:41 2020 +0200 @@ -133,9 +133,12 @@ int th_errno_to_error(int error); const char *th_error_str(int error); -void THERR(const char *fmt, ...); -void THMSG(int level, const char *fmt, ...); -void THPRINT(int level, const char *fmt, ...); +void THERR(const char *fmt, ...) + __attribute__ ((__format__ (__printf__, 1, 2))); +void THMSG(int level, const char *fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); +void THPRINT(int level, const char *fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); void THERR_V(const char *fmt, va_list ap); void THMSG_V(int level, const char *fmt, va_list ap);