From patchwork Sat Oct 30 16:46:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 69665 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 0354FB70CC for ; Sun, 31 Oct 2010 03:47:34 +1100 (EST) Received: from localhost ([127.0.0.1]:52729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCEaY-0000Qk-W8 for incoming@patchwork.ozlabs.org; Sat, 30 Oct 2010 12:47:31 -0400 Received: from [140.186.70.92] (port=41421 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCEZw-0000QV-FM for qemu-devel@nongnu.org; Sat, 30 Oct 2010 12:46:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PCEZt-0006Ji-2S for qemu-devel@nongnu.org; Sat, 30 Oct 2010 12:46:52 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:65099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PCEZs-0006Jc-QG for qemu-devel@nongnu.org; Sat, 30 Oct 2010 12:46:48 -0400 Received: by vws4 with SMTP id 4so1464663vws.4 for ; Sat, 30 Oct 2010 09:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=T1LdroQgZLwV2v5XNghLdnUVen0ACe7E6rx7NZn7vlA=; b=kt7LcIynSmZr6cfITR1amt6tV0YQdqdw2B/K15tSybq1mtgzVLAX0YgGmFyoZGdr8V cQtIVz2hbmkIQODJNZPYa61ofpZi8umRw7ILm43O07AU7k3PCk7KqHi13yMUxjfWzoJh RdgOt1IbIQMTHdQRHP9Lf7u90RLw4kpwuf238= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=mMk18AMdcQUQqhrDD4Za3rgH+A8/jh/OqQopKzGUnmmfCJN2J3BCaK7eIDyeOzH/MO 0WgSbSNTF7AgTp1ianXageOGpa1f0c9RiPZYNSP7bD6EYqf8LF1D7K8LEs0eVLM37hjC XIqEaJsSrVK/XT1CNhMNSa4V0gbVJMHDJJizs= Received: by 10.224.182.65 with SMTP id cb1mr2936459qab.45.1288457207195; Sat, 30 Oct 2010 09:46:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.185.78 with HTTP; Sat, 30 Oct 2010 09:46:27 -0700 (PDT) From: Blue Swirl Date: Sat, 30 Oct 2010 16:46:27 +0000 Message-ID: To: Kevin Wolf , qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: Subject: [Qemu-devel] [PATCH] block: avoid a warning on 64 bit hosts with long as int64_t 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 When building on a 64 bit host which uses 'long' for int64_t, GCC emits a warning: CC block/blkverify.o /src/qemu/block/blkverify.c: In function `blkverify_verify_readv': /src/qemu/block/blkverify.c:304: warning: long long int format, long unsigned int arg (arg 3) Rework a77cffe7e916f4dd28f2048982ea2e0d98143b11 to avoid the warning. Signed-off-by: Blue Swirl --- block/blkverify.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blkverify.c b/block/blkverify.c index b2a12fe..4d9ab6b 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -300,8 +300,8 @@ 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 %lld", - acb->sector_num + (offset / BDRV_SECTOR_SIZE)); + blkverify_err(acb, "contents mismatch in sector %" PRId64, + acb->sector_num + (int64_t)(offset / BDRV_SECTOR_SIZE)); } }