From patchwork Thu Apr 18 20:21:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 237732 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2EFB62C01E6 for ; Fri, 19 Apr 2013 06:24:37 +1000 (EST) Received: from localhost ([::1]:37833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USvNj-00017X-CH for incoming@patchwork.ozlabs.org; Thu, 18 Apr 2013 16:24:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USvKW-0004Rt-N7 for qemu-devel@nongnu.org; Thu, 18 Apr 2013 16:21:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USvKS-00010C-Ns for qemu-devel@nongnu.org; Thu, 18 Apr 2013 16:21:16 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:38623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USvKS-0000zq-IX; Thu, 18 Apr 2013 16:21:12 -0400 Received: from localhost (v220110690675601.yourvserver.net.local [127.0.0.1]) by v220110690675601.yourvserver.net (Postfix) with ESMTP id 7F853728002C; Thu, 18 Apr 2013 22:21:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at weilnetz.de Received: from v220110690675601.yourvserver.net ([127.0.0.1]) by localhost (v220110690675601.yourvserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8JkSAfeMm7Z8; Thu, 18 Apr 2013 22:21:08 +0200 (CEST) Received: by v220110690675601.yourvserver.net (Postfix, from userid 1000) id A5406728003E; Thu, 18 Apr 2013 22:21:08 +0200 (CEST) From: Stefan Weil To: qemu-trivial@nongnu.org Date: Thu, 18 Apr 2013 22:21:05 +0200 Message-Id: <1366316465-32710-1-git-send-email-sw@weilnetz.de> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 78.47.199.172 Cc: Stefan Weil , qemu-devel@nongnu.org, "Richard W.M. Jones" Subject: [Qemu-devel] [PATCH] block/ssh: Add missing gcc format attributes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Now gcc will check whether format string and variable arguments match. Signed-off-by: Stefan Weil --- Please note: I could only run limited tests with the new code because ssh.c is currently not compiled in my w32/w64 environment. Regards, Stefan W. block/ssh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index 8f78e2e..b4e048c 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -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;