]> git.proxmox.com Git - qemu.git/commitdiff
block/ssh: Add missing gcc format attributes
authorStefan Weil <sw@weilnetz.de>
Thu, 18 Apr 2013 20:21:05 +0000 (22:21 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 19 Apr 2013 09:44:16 +0000 (11:44 +0200)
Now gcc will check whether format string and variable arguments match.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/ssh.c

index 8f78e2e4b9cf868f428a57d91556275dbaf28c45..b4e048c70fdbdc601cbc912d06b6537a7d7e1302 100644 (file)
@@ -109,7 +109,7 @@ static void ssh_state_free(BDRVSSHState *s)
 /* Wrappers around error_report which make sure to dump as much
  * information from libssh2 as possible.
  */
-static void
+static void GCC_FMT_ATTR(2, 3)
 session_error_report(BDRVSSHState *s, const char *fs, ...)
 {
     va_list args;
@@ -132,7 +132,7 @@ session_error_report(BDRVSSHState *s, const char *fs, ...)
     error_printf("\n");
 }
 
-static void
+static void GCC_FMT_ATTR(2, 3)
 sftp_error_report(BDRVSSHState *s, const char *fs, ...)
 {
     va_list args;