util/error: add G_GNUC_PRINTF for various functions
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 19 Dec 2022 13:02:03 +0000 (08:02 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 11 Jan 2023 09:44:34 +0000 (10:44 +0100)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221219130205.687815-5-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
util/error-report.c
util/error.c

index 5edb2e604061070baec6c15e4acae8660077d3f6..6e44a557321716f033d7d2da4c441e98ee436c71 100644 (file)
@@ -193,6 +193,7 @@ real_time_iso8601(void)
  * a single phrase, with no newline or trailing punctuation.
  * Prepend the current location and append a newline.
  */
+G_GNUC_PRINTF(2, 0)
 static void vreport(report_type type, const char *fmt, va_list ap)
 {
     gchar *timestr;
index b6c89d141208cf9d7d683eeb6c309e960cd3722f..1e7af665b838da206954b159e5ce771ba681b888 100644 (file)
@@ -45,6 +45,7 @@ static void error_handle_fatal(Error **errp, Error *err)
     }
 }
 
+G_GNUC_PRINTF(6, 0)
 static void error_setv(Error **errp,
                        const char *src, int line, const char *func,
                        ErrorClass err_class, const char *fmt, va_list ap,