Add printf attribute to log_err/DPRINTF and fix a few warnings
Modified to not use %z for portability reasons.
This commit is contained in:
committed by
Justin Maggard
parent
45cf9208fb
commit
3a57744735
3
log.h
3
log.h
@ -46,7 +46,8 @@ enum _log_facility
|
||||
extern int log_level[L_MAX];
|
||||
extern int log_init(const char *fname, const char *debug);
|
||||
extern void log_close(void);
|
||||
extern void log_err(int level, enum _log_facility facility, char *fname, int lineno, char *fmt, ...);
|
||||
extern void log_err(int level, enum _log_facility facility, char *fname, int lineno, char *fmt, ...)
|
||||
__attribute__((__format__ (__printf__, 5, 6)));
|
||||
|
||||
#define DPRINTF(level, facility, fmt, arg...) do { log_err(level, facility, __FILE__, __LINE__, fmt, ##arg); } while (0)
|
||||
|
||||
|
Reference in New Issue
Block a user