Rework TRACEF format, handle empty varargs (GNU extension)
This commit is contained in:
@@ -10,9 +10,10 @@
|
||||
} while (0)
|
||||
|
||||
#ifdef DEBUG
|
||||
#define TRACEF(fmt, ...)\
|
||||
#define TRACEF(fmt, args...)
|
||||
do { \
|
||||
fprintf(stderr, "%s:%s(%d)" fmt, __FILE__, __FUNCTION__, __LINE,__VA_ARGS__);\
|
||||
fprintf(stdout, "%s:%d (%s)\t" fmt, __FILE__, __LINE__, __FUNCTION__, ##args);\
|
||||
fflush(stdout);\
|
||||
} while(0)
|
||||
#else
|
||||
#define TRACEF(fmt, ...)
|
||||
|
||||
Reference in New Issue
Block a user