提交 6ae7d660 编写于 作者: S Stefan Weil 提交者: Stefan Hajnoczi

block/ssh: Add missing gcc format attributes

Now gcc will check whether format string and variable arguments match.
Signed-off-by: NStefan Weil <sw@weilnetz.de>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 40508bb4
...@@ -109,7 +109,7 @@ static void ssh_state_free(BDRVSSHState *s) ...@@ -109,7 +109,7 @@ static void ssh_state_free(BDRVSSHState *s)
/* Wrappers around error_report which make sure to dump as much /* Wrappers around error_report which make sure to dump as much
* information from libssh2 as possible. * information from libssh2 as possible.
*/ */
static void static void GCC_FMT_ATTR(2, 3)
session_error_report(BDRVSSHState *s, const char *fs, ...) session_error_report(BDRVSSHState *s, const char *fs, ...)
{ {
va_list args; va_list args;
...@@ -132,7 +132,7 @@ session_error_report(BDRVSSHState *s, const char *fs, ...) ...@@ -132,7 +132,7 @@ session_error_report(BDRVSSHState *s, const char *fs, ...)
error_printf("\n"); error_printf("\n");
} }
static void static void GCC_FMT_ATTR(2, 3)
sftp_error_report(BDRVSSHState *s, const char *fs, ...) sftp_error_report(BDRVSSHState *s, const char *fs, ...)
{ {
va_list args; va_list args;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册