aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/debug.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-10-20 08:56:06 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-10-21 16:38:19 +0200
commit02c28a0fa84f52aeac074a83a3d7ffb0d8fcd814 (patch)
treee214c1dfb6f0b22d0b4aa037486ffc028935def0 /openbsc/include/openbsc/debug.h
parent1565bd3226594badb60cb74f0aca9ded25b4b135 (diff)
[debug] Use gcc attribute to enable printf checking
Inform the compiler that the same rules as printf apply to the debugp method. This will check if the arguments match the format string.
Diffstat (limited to 'openbsc/include/openbsc/debug.h')
-rw-r--r--openbsc/include/openbsc/debug.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/debug.h b/openbsc/include/openbsc/debug.h
index 089132ea9..6ac3a5409 100644
--- a/openbsc/include/openbsc/debug.h
+++ b/openbsc/include/openbsc/debug.h
@@ -31,7 +31,7 @@
#define static_assert(exp, name) typedef int dummy##name [(exp) ? 1 : -1];
char *hexdump(const unsigned char *buf, int len);
-void debugp(unsigned int subsys, char *file, int line, int cont, const char *format, ...);
+void debugp(unsigned int subsys, char *file, int line, int cont, const char *format, ...) __attribute__ ((format (printf, 5, 6)));
void debug_parse_category_mask(const char* mask);
void debug_use_color(int use_color);
void debug_timestamp(int enable);