Patchwork [3/4] qemu-char.h: Add GCC attribute (check format arguments)

login
register
mail settings
Submitter Stefan Weil
Date July 1, 2010, 11:08 a.m.
Message ID <1277982502-4196-4-git-send-email-weil@mail.berlios.de>
Download mbox | patch
Permalink /patch/57540/
State Superseded
Headers show

Comments

Stefan Weil - July 1, 2010, 11:08 a.m.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 qemu-char.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

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,