summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-10-14 02:06:09 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-10-14 02:06:09 (EDT)
commit17d73cdba7204d48918ecfdda78d4e79948e1358 (patch)
treee7d55743f350fe051b305788ec8dc382543eab64
parenta1a382be40b53534535d84830486a340ea25ce9d (diff)
downloadtimeteller-17d73cdba7204d48918ecfdda78d4e79948e1358.zip
timeteller-17d73cdba7204d48918ecfdda78d4e79948e1358.tar.gz
timeteller-17d73cdba7204d48918ecfdda78d4e79948e1358.tar.bz2
error(): Type-check args against format string
Silences: src/main.c: In function ‘error’: src/main.c:49:2: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] vfprintf(stderr, format, ap); ^~~~~~~~
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index adbd81b..9bee050 100644
--- a/src/main.c
+++ b/src/main.c
@@ -37,7 +37,7 @@ set_program_name(const char *name)
program_name = name;
}
-static void
+static void __attribute__((format(printf, 1, 2)))
error(const char *format, ...)
{
va_list ap;