Mercurial > hg > dmlib
diff src/dmlib.h @ 2383:43e39d9ec42f
Add __attribute__(__format__ ..) specifiers for functions that use printf() style format specifiers.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 09 Jan 2020 14:55:41 +0200 |
parents | c801995cbb13 |
children | 5ffc48a0bebe |
line wrap: on
line diff
--- a/src/dmlib.h Wed Jan 08 14:59:16 2020 +0200 +++ b/src/dmlib.h Thu Jan 09 14:55:41 2020 +0200 @@ -373,13 +373,17 @@ void dmPrintBanner(FILE *outFile, const char *name, const char *usage); void dmMsgVA(int level, const char *fmt, va_list ap); -void dmMsg(int level, const char *fmt, ...); +void dmMsg(int level, const char *fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); void dmPrintVA(int level, const char *fmt, va_list ap); -void dmPrint(int level, const char *fmt, ...); +void dmPrint(int level, const char *fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); int dmErrorVA(const int error, const char *fmt, va_list); -int dmError(const int error, const char *fmt, ...); -void dmErrorMsg(const char *fmt, ...); +int dmError(const int error, const char *fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); +void dmErrorMsg(const char *fmt, ...) + __attribute__ ((__format__ (__printf__, 1, 2))); int dmGetErrno(); const char *dmErrorStr(const int error);