From 91d84fd860cb98d95dfff800d08cd341e6e1338d Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 13 Mar 2017 12:48:29 +0000 Subject: 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. --- json-glib/json-reader.c | 1 + 1 file changed, 1 insertion(+) (limited to 'json-glib/json-reader.c') 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, -- cgit v1.2.1