[json-glib] Annotate internal set_error() wrapper



commit 91d84fd860cb98d95dfff800d08cd341e6e1338d
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Mar 13 12:48:29 2017 +0000

    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 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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]