diff mbox

qtest: Add missing GCC_FMT_ATTR

Message ID 1333206691-8459-1-git-send-email-sw@weilnetz.de
State Accepted
Headers show

Commit Message

Stefan Weil March 31, 2012, 3:11 p.m. UTC
gcc reports an error when the code is compiled with -Wmissing-format-attribute.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 qtest.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Stefan Hajnoczi April 2, 2012, 1 p.m. UTC | #1
On Sat, Mar 31, 2012 at 05:11:31PM +0200, Stefan Weil wrote:
> gcc reports an error when the code is compiled with -Wmissing-format-attribute.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  qtest.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan
diff mbox

Patch

diff --git a/qtest.c b/qtest.c
index cd7186c..53e2ed6 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];