diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2017-03-13 12:48:29 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-03-13 12:48:29 +0000 |
commit | 91d84fd860cb98d95dfff800d08cd341e6e1338d (patch) | |
tree | bc44be7ba8aa557e3ca0e7d71718c83733a541e6 /json-glib/json-reader.c | |
parent | 1fa340259e32eb1f5342359391afb45a78ff42bd (diff) | |
download | json-glib-91d84fd860cb98d95dfff800d08cd341e6e1338d.tar.gz |
Annotate internal set_error() wrapper
We need to tell the compiler that the 3rd argument is a format-like
string, and that the arguments for that come in the variadic arguments
list; this allows compilers like GCC to do validation on the format
string itself, and avoid a whole class of bugs.
Diffstat (limited to 'json-glib/json-reader.c')
-rw-r--r-- | json-glib/json-reader.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/json-glib/json-reader.c b/json-glib/json-reader.c index afc2414..cc33629 100644 --- a/json-glib/json-reader.c +++ b/json-glib/json-reader.c @@ -287,6 +287,7 @@ json_reader_set_root (JsonReader *reader, * Return value: %FALSE, to be used to return immediately from * the caller function */ +G_GNUC_PRINTF (3, 4) static gboolean json_reader_set_error (JsonReader *reader, JsonReaderError error_code, |