~sforshee/powerd/fix-power-button

« back to all changes in this revision

Viewing changes to src/log.h

Type check powerd_log() arguments against the format string.

Approved by PS Jenkins bot, Matthew Fischer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#define powerd_info(f, a...)    powerd_log(POWERD_LOG_INFO, f, ##a)
36
36
#define powerd_debug(f, a...)   powerd_log(POWERD_LOG_DEBUG, f, ##a)
37
37
 
38
 
void powerd_log(int level, const char *fmt, ...);
 
38
void powerd_log(int level, const char *fmt, ...)
 
39
        __attribute__ ((format (printf, 2, 3)));
39
40
void powerd_log_init(void);
40
41
 
41
42
#ifdef __cplusplus