diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-01-26 12:57:21 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-01-26 12:57:21 +0000 |
| commit | cd3f3a74f7399db378fc35f8d0cb458b737f8b1b (patch) | |
| tree | 94f592d5d682b5b451449e11f550a6263f95faad /lib/base/eerror.h | |
| parent | cceb3c9e6ec5c92240f592e3a435ca25ce1facca (diff) | |
| download | enigma2-cd3f3a74f7399db378fc35f8d0cb458b737f8b1b.tar.gz enigma2-cd3f3a74f7399db378fc35f8d0cb458b737f8b1b.zip | |
check format strings on eDebug-style functions
Diffstat (limited to 'lib/base/eerror.h')
| -rw-r--r-- | lib/base/eerror.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/base/eerror.h b/lib/base/eerror.h index ea5fcc51..91575878 100644 --- a/lib/base/eerror.h +++ b/lib/base/eerror.h @@ -25,7 +25,13 @@ #define NULL 0 #endif -void eFatal(const char* fmt, ...); +#ifndef SWIG +#define CHECKFORMAT __attribute__ ((__format__(__printf__, 1, 2))) +#else +#define CHECKFORMAT +#endif + +void CHECKFORMAT eFatal(const char*, ...); enum { lvlDebug=1, lvlWarning=2, lvlFatal=4 }; @@ -39,9 +45,9 @@ extern int logOutputConsole; #endif #ifdef DEBUG - void eDebug(const char* fmt, ...); - void eDebugNoNewLine(const char* fmt, ...); - void eWarning(const char* fmt, ...); + void CHECKFORMAT eDebug(const char*, ...); + void CHECKFORMAT eDebugNoNewLine(const char*, ...); + void CHECKFORMAT eWarning(const char*, ...); #ifndef SWIG #define ASSERT(x) { if (!(x)) eFatal("%s:%d ASSERTION %s FAILED!", __FILE__, __LINE__, #x); } #endif |
