diff mbox

[3/8] qtest: Add missing GCC_FMT_ATTR

Message ID 1333449767-16410-4-git-send-email-stefanha@linux.vnet.ibm.com
State New
Headers show

Commit Message

Stefan Hajnoczi April 3, 2012, 10:42 a.m. UTC
From: Stefan Weil <sw@weilnetz.de>

gcc reports an error when the code is compiled with -Wmissing-format-attribute.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 qtest.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/qtest.c b/qtest.c
index daeabb7..18afcd9 100644
--- a/qtest.c
+++ b/qtest.c
@@ -156,7 +156,8 @@  static void qtest_send_prefix(CharDriverState *chr)
             tv.tv_sec, tv.tv_usec);
 }
 
-static void qtest_send(CharDriverState *chr, const char *fmt, ...)
+static void GCC_FMT_ATTR(2, 3) qtest_send(CharDriverState *chr,
+                                          const char *fmt, ...)
 {
     va_list ap;
     char buffer[1024];