From bcd34eaf7dda662e6b6d4f1e0a1d0427dec1b990 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 17 Aug 2016 04:43:15 -0300 Subject: [PATCH] eeshow/diag.h: use __attribute__((format(printf, ... --- eeshow/diag.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/eeshow/diag.h b/eeshow/diag.h index bf6ee75..e97d599 100644 --- a/eeshow/diag.h +++ b/eeshow/diag.h @@ -40,14 +40,16 @@ void diag_perror(const char *s); * E.g., out of memory. */ -void __attribute__((noreturn)) fatal(const char *fmt, ...); +void __attribute__((noreturn)) fatal(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); /* * Operation has failed, but the program as a whole may still be able to * continue. E.g., a schematics component was not found. */ -void error(const char *fmt, ...); +void error(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); /* * A minor operation has failed or some other issue was detected. This may @@ -55,13 +57,15 @@ void error(const char *fmt, ...); * operation. */ -void warning(const char *fmt, ...); +void warning(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); /* * Progress message, used mainly for debugging. "level" is the minimum * verbosity level required. */ -void progress(unsigned level, const char *fmt, ...); +void progress(unsigned level, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); #endif /* !DIAG_H */