[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.
diff --git a/openbsc/include/openbsc/debug.h b/openbsc/include/openbsc/debug.h
index 089132e..6ac3a54 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);