summary refs log tree commit diff stats
path: root/include/qapi/error.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-07-24 16:24:42 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-07-24 16:24:42 +0100
commite68808a797d0c585b0e82e4a788d1ba8899b01eb (patch)
treedbcef4afd6dd60afb3a8b942056dd7aa2f9dd849 /include/qapi/error.h
parent7adfbea8fd1efce36019a0c2f198ca73be9d3f18 (diff)
parent192cf54ac5408d21c20c17b3794a632970bbb880 (diff)
downloadfocaccia-qemu-e68808a797d0c585b0e82e4a788d1ba8899b01eb.tar.gz
focaccia-qemu-e68808a797d0c585b0e82e4a788d1ba8899b01eb.zip
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2020-07-24' into staging
Error reporting patches patches for 2020-07-24

# gpg: Signature made Fri 24 Jul 2020 14:03:44 BST
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-error-2020-07-24:
  qapi/error: Check format string argument in error_*prepend()
  sd/milkymist-memcard: Fix format string
  error: Strip trailing '\n' from error string arguments (again)
  coccinelle/err-bad-newline: Fix for Python 3, and add patterns

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/qapi/error.h')
-rw-r--r--include/qapi/error.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/qapi/error.h b/include/qapi/error.h
index 7932594dce..eaa05c4837 100644
--- a/include/qapi/error.h
+++ b/include/qapi/error.h
@@ -382,13 +382,15 @@ void error_propagate(Error **dst_errp, Error *local_err);
  * Please use ERRP_GUARD() and error_prepend() instead when possible.
  */
 void error_propagate_prepend(Error **dst_errp, Error *local_err,
-                             const char *fmt, ...);
+                             const char *fmt, ...)
+    GCC_FMT_ATTR(3, 4);
 
 /*
  * Prepend some text to @errp's human-readable error message.
  * The text is made by formatting @fmt, @ap like vprintf().
  */
-void error_vprepend(Error *const *errp, const char *fmt, va_list ap);
+void error_vprepend(Error *const *errp, const char *fmt, va_list ap)
+    GCC_FMT_ATTR(2, 0);
 
 /*
  * Prepend some text to @errp's human-readable error message.