diff options
author | Stef Walter <stefw@gnome.org> | 2012-05-13 14:03:17 +0200 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2012-05-13 14:03:17 +0200 |
commit | 7bd4114182fcc86cd2515708fdf4d76622e0237d (patch) | |
tree | 5efb237c364a4a2259a747ae0edfcad6b5e45e40 /p11-kit/conf.c | |
parent | 14b0be4353e5c4464cb9f61e419a2f8caf8757d0 (diff) | |
download | p11-kit-7bd4114182fcc86cd2515708fdf4d76622e0237d.tar.gz |
Use gcc extensions to check varargs during compile
* Add macros GNUC_PRINTF and GNUC_NULL_TERMINATED to check
correct printf and NULL terminated style varargs
Diffstat (limited to 'p11-kit/conf.c')
-rw-r--r-- | p11-kit/conf.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/p11-kit/conf.c b/p11-kit/conf.c index 5c09ff5..917ce4c 100644 --- a/p11-kit/conf.c +++ b/p11-kit/conf.c @@ -111,8 +111,13 @@ strequal (const char *one, const char *two) return strcmp (one, two) == 0; } -static char* -strconcat (const char *first, ...) +static char * +strconcat (const char *first, + ...) GNUC_NULL_TERMINATED; + +static char * +strconcat (const char *first, + ...) { size_t length = 0; const char *arg; @@ -646,7 +651,7 @@ _p11_conf_parse_boolean (const char *string, return 0; } else { _p11_message ("invalid setting '%s' defaulting to '%s'", - default_value ? "yes" : "no"); + string, default_value ? "yes" : "no"); return default_value; } } |