]> git.proxmox.com Git - mirror_qemu.git/blobdiff - json-parser.c
slirp: fix unused return value, spotted by clang
[mirror_qemu.git] / json-parser.c
index 579928f2ee0b5fca8763a18cc98ee3c35e266395..b55d76373e8747a456b9295a598607a4e73198be 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include <stdbool.h>
+#include <stdarg.h>
 
 #include "qemu-common.h"
 #include "qstring.h"
@@ -93,7 +94,12 @@ static int token_is_escape(QObject *obj, const char *value)
  */
 static void parse_error(JSONParserContext *ctxt, QObject *token, const char *msg, ...)
 {
-    fprintf(stderr, "parse error: %s\n", msg);
+    va_list ap;
+    va_start(ap, msg);
+    fprintf(stderr, "parse error: ");
+    vfprintf(stderr, msg, ap);
+    fprintf(stderr, "\n");
+    va_end(ap);
 }
 
 /**