git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cceb3c9
)
check format strings on eDebug-style functions
author
Felix Domke
<tmbinc@elitedvb.net>
Thu, 26 Jan 2006 12:57:21 +0000
(12:57 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Thu, 26 Jan 2006 12:57:21 +0000
(12:57 +0000)
lib/base/eerror.h
patch
|
blob
|
history
diff --git
a/lib/base/eerror.h
b/lib/base/eerror.h
index ea5fcc51380252b1950cfeacb1e963576b155ebc..91575878dbb8a97080bcf2ef00b6d5c1d48cb34d 100644
(file)
--- a/
lib/base/eerror.h
+++ b/
lib/base/eerror.h
@@
-25,7
+25,13
@@
#define NULL 0
#endif
#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 };
enum { lvlDebug=1, lvlWarning=2, lvlFatal=4 };
@@
-39,9
+45,9
@@
extern int logOutputConsole;
#endif
#ifdef DEBUG
#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
#ifndef SWIG
#define ASSERT(x) { if (!(x)) eFatal("%s:%d ASSERTION %s FAILED!", __FILE__, __LINE__, #x); }
#endif