Set printf format attribute for print().
This allows gcc to check format strings used in pr_* calls. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>master
parent
661639420c
commit
1fa57ac411
3
print.h
3
print.h
|
@ -25,6 +25,9 @@
|
||||||
#define PRINT_LEVEL_MIN LOG_EMERG
|
#define PRINT_LEVEL_MIN LOG_EMERG
|
||||||
#define PRINT_LEVEL_MAX LOG_DEBUG
|
#define PRINT_LEVEL_MAX LOG_DEBUG
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
__attribute__ ((format (printf, 2, 3)))
|
||||||
|
#endif
|
||||||
void print(int level, char const *format, ...);
|
void print(int level, char const *format, ...);
|
||||||
|
|
||||||
void print_set_progname(const char *name);
|
void print_set_progname(const char *name);
|
||||||
|
|
Loading…
Reference in New Issue