From patchwork Thu Sep 23 18:37:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 65566 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BDD11B71B5 for ; Fri, 24 Sep 2010 04:38:21 +1000 (EST) Received: from localhost ([127.0.0.1]:51777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyqgT-0000fh-I7 for incoming@patchwork.ozlabs.org; Thu, 23 Sep 2010 14:38:17 -0400 Received: from [140.186.70.92] (port=45133 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oyqfr-0000fc-97 for qemu-devel@nongnu.org; Thu, 23 Sep 2010 14:37:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oyqfo-0003US-Mc for qemu-devel@nongnu.org; Thu, 23 Sep 2010 14:37:39 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:53175) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oyqfo-0003Sz-9U for qemu-devel@nongnu.org; Thu, 23 Sep 2010 14:37:36 -0400 Received: from flocke.weilnetz.de (p54ADB0BB.dip.t-dialin.net [84.173.176.187]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0Lx3gz-1Oj7Ee2OyX-017EuC; Thu, 23 Sep 2010 20:37:13 +0200 Received: from stefan by flocke.weilnetz.de with local (Exim 4.72) (envelope-from ) id 1OyqfQ-0005yv-A0; Thu, 23 Sep 2010 20:37:12 +0200 From: Stefan Weil To: QEMU Developers Date: Thu, 23 Sep 2010 20:37:11 +0200 Message-Id: <1285267031-22966-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.1 X-Provags-ID: V02:K0:RLcd/UuBS8Tlfl7ZDpVHlB2AqvUFb80PJ1ZZo0l0Su1 vknhwe/vveTwogdidzEqQPLEa2faPjgUPUj1ZEhm3Oa0Cgejp/ 7JTGpuCeBDiyBv/8w824r+MaLt8p/52/Y669t4nGYv9P8D0zEI oq/JM550Bb1q8xvYVoLF8gBHo3FJkaYcsaTjdz1utd8XUoSR4Y JfJ6egzJG9Sz08+DEai+I7A2EknX4rOG/5wrvoQHC3y9NjWAG4 8snEFHZ3bUWu4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Blue Swirl , Kevin Wolf Subject: [Qemu-devel] [PATCH] block: Use GCC_FMT_ATTR and fix a format error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Adding the gcc format attribute detects a format bug which is fixed here. Cc: Blue Swirl Cc: Kevin Wolf Signed-off-by: Stefan Weil --- block/blkverify.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/block/blkverify.c b/block/blkverify.c index 8083464..b39fb67 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -53,7 +53,8 @@ static AIOPool blkverify_aio_pool = { .cancel = blkverify_aio_cancel, }; -static void blkverify_err(BlkverifyAIOCB *acb, const char *fmt, ...) +static void GCC_FMT_ATTR(2, 3) blkverify_err(BlkverifyAIOCB *acb, + const char *fmt, ...) { va_list ap; @@ -300,7 +301,7 @@ static void blkverify_verify_readv(BlkverifyAIOCB *acb) ssize_t offset = blkverify_iovec_compare(acb->qiov, &acb->raw_qiov); if (offset != -1) { blkverify_err(acb, "contents mismatch in sector %ld", - acb->sector_num + (offset / BDRV_SECTOR_SIZE)); + (long)(acb->sector_num + (offset / BDRV_SECTOR_SIZE))); } }