qemu-devel@nongnu.org
[Top] [All Lists]

[Qemu-devel] [PATCH 3/4] qemu-char.h: Add GCC attribute (check format ar

Subject: [Qemu-devel] [PATCH 3/4] qemu-char.h: Add GCC attribute check format arguments
From: Stefan Weil
Date: Thu, 1 Jul 2010 13:08:21 +0200
Signed-off-by: Stefan Weil <weil@xxxxxxxxxxxxxxx>
---
 qemu-char.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/qemu-char.h b/qemu-char.h
index e3a0783..1bbac6e 100644
--- a/qemu-char.h
+++ b/qemu-char.h
@@ -76,7 +76,8 @@ CharDriverState *qemu_chr_open_opts(QemuOpts *opts,
                                     void (*init)(struct CharDriverState *s));
 CharDriverState *qemu_chr_open(const char *label, const char *filename, void 
(*init)(struct CharDriverState *s));
 void qemu_chr_close(CharDriverState *chr);
-void qemu_chr_printf(CharDriverState *s, const char *fmt, ...);
+void qemu_chr_printf(CharDriverState *s, const char *fmt, ...)
+    __attribute__ ((__format__ (__printf__, 2, 3)));
 int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len);
 void qemu_chr_send_event(CharDriverState *s, int event);
 void qemu_chr_add_handlers(CharDriverState *s,
-- 
1.7.1


<Prev in Thread] Current Thread [Next in Thread>