Add check if fromat at PDEBUG() is consistent (like printf)

The bugs it found are fixed too.
This commit is contained in:
Andreas Eversberg
2016-10-07 07:52:17 +02:00
parent b205cfcf03
commit 0cec2f28be
4 changed files with 8 additions and 7 deletions

View File

@@ -22,7 +22,7 @@
#define PDEBUG(cat, level, fmt, arg...) _printdebug(__FILE__, __FUNCTION__, __LINE__, cat, level, -1, fmt, ## arg)
#define PDEBUG_CHAN(cat, level, fmt, arg...) _printdebug(__FILE__, __FUNCTION__, __LINE__, cat, level, CHAN, fmt, ## arg)
void _printdebug(const char *file, const char *function, int line, int cat, int level, int chan, const char *fmt, ...);
void _printdebug(const char *file, const char *function, int line, int cat, int level, int chan, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 7, 8)));
const char *debug_amplitude(double level);