Просмотр исходного кода

util/error: add G_GNUC_PRINTF for various functions

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>
Daniel P. Berrangé 2 лет назад
Родитель
Сommit
beede7e848
2 измененных файлов с 2 добавлено и 0 удалено
  1. 1 0
      util/error-report.c
  2. 1 0
      util/error.c

+ 1 - 0
util/error-report.c

@@ -193,6 +193,7 @@ real_time_iso8601(void)
  * a single phrase, with no newline or trailing punctuation.
  * a single phrase, with no newline or trailing punctuation.
  * Prepend the current location and append a newline.
  * 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)
 static void vreport(report_type type, const char *fmt, va_list ap)
 {
 {
     gchar *timestr;
     gchar *timestr;

+ 1 - 0
util/error.c

@@ -45,6 +45,7 @@ static void error_handle_fatal(Error **errp, Error *err)
     }
     }
 }
 }
 
 
+G_GNUC_PRINTF(6, 0)
 static void error_setv(Error **errp,
 static void error_setv(Error **errp,
                        const char *src, int line, const char *func,
                        const char *src, int line, const char *func,
                        ErrorClass err_class, const char *fmt, va_list ap,
                        ErrorClass err_class, const char *fmt, va_list ap,