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

[Qemu-devel] [PATCH 1/4] blockdev.h: Add GCC attribute (check format arg

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

diff --git a/blockdev.h b/blockdev.h
index 23ea576..3c5c85d 100644
--- a/blockdev.h
+++ b/blockdev.h
@@ -42,7 +42,8 @@ extern int drive_get_max_bus(BlockInterfaceType type);
 extern void drive_uninit(DriveInfo *dinfo);
 extern const char *drive_get_serial(BlockDriverState *bdrv);
 
-extern QemuOpts *drive_add(const char *file, const char *fmt, ...);
+extern QemuOpts *drive_add(const char *file, const char *fmt, ...)
+    __attribute__ ((__format__ (__printf__, 2, 3)));
 extern DriveInfo *drive_init(QemuOpts *arg, int default_to_scsi,
                              int *fatal_error);
 
-- 
1.7.1


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