From 02c28a0fa84f52aeac074a83a3d7ffb0d8fcd814 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 20 Oct 2009 08:56:06 +0200 Subject: [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. --- openbsc/include/openbsc/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc/include/openbsc/debug.h') 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); -- cgit v1.2.3 From ed0a47b9c5569a8b13566d2dd77da223d456277f Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 1 Aug 2009 16:54:45 +0200 Subject: [debug] Add a debug area for SCCP --- openbsc/include/openbsc/debug.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'openbsc/include/openbsc/debug.h') diff --git a/openbsc/include/openbsc/debug.h b/openbsc/include/openbsc/debug.h index 6ac3a5409..24f45add7 100644 --- a/openbsc/include/openbsc/debug.h +++ b/openbsc/include/openbsc/debug.h @@ -20,6 +20,8 @@ #define DMUX 0x4000 #define DINP 0x8000 +#define DSCCP 0x10000 + #ifdef DEBUG #define DEBUGP(ss, fmt, args...) debugp(ss, __FILE__, __LINE__, 0, fmt, ## args) #define DEBUGPC(ss, fmt, args...) debugp(ss, __FILE__, __LINE__, 1, fmt, ## args) -- cgit v1.2.3 From 32201c50a53aa7981628bef14388067bc3706bf0 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 18 Aug 2009 12:54:50 +0200 Subject: [debug] Add a debug area for MSC --- openbsc/include/openbsc/debug.h | 1 + 1 file changed, 1 insertion(+) (limited to 'openbsc/include/openbsc/debug.h') diff --git a/openbsc/include/openbsc/debug.h b/openbsc/include/openbsc/debug.h index 24f45add7..c8c0013d9 100644 --- a/openbsc/include/openbsc/debug.h +++ b/openbsc/include/openbsc/debug.h @@ -21,6 +21,7 @@ #define DINP 0x8000 #define DSCCP 0x10000 +#define DMSC 0x20000 #ifdef DEBUG #define DEBUGP(ss, fmt, args...) debugp(ss, __FILE__, __LINE__, 0, fmt, ## args) -- cgit v1.2.3 From ff5fa4e45595671cbaf5b319eb6b6b3451b39874 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 20 Nov 2009 13:05:48 +0100 Subject: [debug] Add a debug area for the MGCP code of On Waves --- openbsc/include/openbsc/debug.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'openbsc/include/openbsc/debug.h') diff --git a/openbsc/include/openbsc/debug.h b/openbsc/include/openbsc/debug.h index c8c0013d9..447c3584f 100644 --- a/openbsc/include/openbsc/debug.h +++ b/openbsc/include/openbsc/debug.h @@ -23,6 +23,8 @@ #define DSCCP 0x10000 #define DMSC 0x20000 +#define DMGCP 0x40000 + #ifdef DEBUG #define DEBUGP(ss, fmt, args...) debugp(ss, __FILE__, __LINE__, 0, fmt, ## args) #define DEBUGPC(ss, fmt, args...) debugp(ss, __FILE__, __LINE__, 1, fmt, ## args) -- cgit v1.2.3