summaryrefslogtreecommitdiff
path: root/p11-kit/debug.h
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2012-05-13 14:03:17 +0200
committerStef Walter <stefw@gnome.org>2012-05-13 14:03:17 +0200
commit7bd4114182fcc86cd2515708fdf4d76622e0237d (patch)
tree5efb237c364a4a2259a747ae0edfcad6b5e45e40 /p11-kit/debug.h
parent14b0be4353e5c4464cb9f61e419a2f8caf8757d0 (diff)
Use gcc extensions to check varargs during compile
* Add macros GNUC_PRINTF and GNUC_NULL_TERMINATED to check correct printf and NULL terminated style varargs
Diffstat (limited to 'p11-kit/debug.h')
-rw-r--r--p11-kit/debug.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/p11-kit/debug.h b/p11-kit/debug.h
index e5b970e..7fa9854 100644
--- a/p11-kit/debug.h
+++ b/p11-kit/debug.h
@@ -35,6 +35,8 @@
#ifndef DEBUG_H
#define DEBUG_H
+#include "compat.h"
+
/* Please keep this enum in sync with keys in debug.c */
typedef enum {
DEBUG_LIB = 1 << 1,
@@ -49,7 +51,7 @@ void _p11_debug_init (void);
void _p11_debug_message (int flag,
const char *format,
- ...);
+ ...) GNUC_PRINTF (2, 3);
#endif /* DEBUG_H */