Skip to contentSkip to conversation

blockdev: Use GCC_FMT_ATTR (format checking)

PATCH Applied Stefan Weil 2 participants 2 messages Sep 23, 2010 – Oct 3, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blockdev: Use GCC_FMT_ATTR (format checking)

Additional changes:

* Removed 'extern' from drive_add (avoids too long line).
* Removed 'extern' from other functions (makes declarations consistent with others in same header file).

Cc Blue Swirl <[email protected]>
Cc Kevin Wolf <[email protected]>
---
 blockdev.h |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
blockdev.h +7 -8
index 89dcd9a..653affc 100644
@@ -34,14 +34,13 @@ struct DriveInfo {
 #define MAX_IDE_DEVS	2
 #define MAX_SCSI_DEVS	7
 
-extern DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
-extern int drive_get_max_bus(BlockInterfaceType type);
-extern void drive_uninit(DriveInfo *dinfo);
-extern DriveInfo *drive_get_by_blockdev(BlockDriverState *bs);
-
-extern QemuOpts *drive_add(const char *file, const char *fmt, ...);
-extern DriveInfo *drive_init(QemuOpts *arg, int default_to_scsi,
-                             int *fatal_error);
+DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
+int drive_get_max_bus(BlockInterfaceType type);
+void drive_uninit(DriveInfo *dinfo);
+DriveInfo *drive_get_by_blockdev(BlockDriverState *bs);
+
+QemuOpts *drive_add(const char *file, const char *fmt, ...) GCC_FMT_ATTR(2, 3);
+DriveInfo *drive_init(QemuOpts *arg, int default_to_scsi, int *fatal_error);
 
 /* device-hotplug */
 
Signature · 1 line
1.7.1
Applied
#1 lore raw

Thanks, applied.

Quoted 43 lines · Stefan Weil

Additional changes:

* Removed 'extern' from drive_add (avoids too long line).
* Removed 'extern' from other functions (makes declarations consistent with others in same header file).

Cc Blue Swirl <[email protected]>
Cc Kevin Wolf <[email protected]>

---
 blockdev.h |   15 +++++++--------

 1 files changed, 7 insertions(+), 8 deletions(-)
blockdev.h +7 -9
index 89dcd9a..653affc 100644
@@ -34,14 +34,13 @@ struct DriveInfo {
  #define MAX_IDE_DEVS   2
  #define MAX_SCSI_DEVS  7
 
-extern DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
-extern int drive_get_max_bus(BlockInterfaceType type);
-extern void drive_uninit(DriveInfo *dinfo);
-extern DriveInfo *drive_get_by_blockdev(BlockDriverState *bs);
-
-extern QemuOpts *drive_add(const char *file, const char *fmt, ...);
-extern DriveInfo *drive_init(QemuOpts *arg, int default_to_scsi,
-                             int *fatal_error);
+DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
+int drive_get_max_bus(BlockInterfaceType type);
+void drive_uninit(DriveInfo *dinfo);
+DriveInfo *drive_get_by_blockdev(BlockDriverState *bs);
+
+QemuOpts *drive_add(const char *file, const char *fmt, ...) GCC_FMT_ATTR(2, 3);
+DriveInfo *drive_init(QemuOpts *arg, int default_to_scsi, int *fatal_error);
 
  /* device-hotplug */
 
--

1.7.1