summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-17 04:43:15 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-17 04:43:15 -0300
commit34ea81f8d4018fc3ecf91663d741ae5afcbc26d7 (patch)
treef15f364326e016e85aee6e6863f36686205c8a77
parent87016273ecf4904b3668124bc91fb0a145b8c007 (diff)
downloadeeshow-34ea81f8d4018fc3ecf91663d741ae5afcbc26d7.tar.gz
eeshow-34ea81f8d4018fc3ecf91663d741ae5afcbc26d7.tar.bz2
eeshow-34ea81f8d4018fc3ecf91663d741ae5afcbc26d7.zip
eeshow/diag.h: use __attribute__((format(printf, ...
-rw-r--r--diag.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/diag.h b/diag.h
index bf6ee75..e97d599 100644
--- a/diag.h
+++ b/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 */