From nobody Fri Nov 7 08:02:17 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1547640299420332.6461400084446; Wed, 16 Jan 2019 04:04:59 -0800 (PST) Received: from localhost ([127.0.0.1]:33586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjjwF-00013j-Fs for importer@patchew.org; Wed, 16 Jan 2019 07:04:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjjsN-00077D-LN for qemu-devel@nongnu.org; Wed, 16 Jan 2019 07:00:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjjsM-0006lf-CN for qemu-devel@nongnu.org; Wed, 16 Jan 2019 07:00:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50274) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjjsI-0006Ah-NB; Wed, 16 Jan 2019 07:00:50 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 16634BE31C; Wed, 16 Jan 2019 12:00:48 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-236.brq.redhat.com [10.40.204.236]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 033BD105B21A; Wed, 16 Jan 2019 12:00:44 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Wed, 16 Jan 2019 13:00:41 +0100 Message-Id: <20190116120041.17095-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 16 Jan 2019 12:00:48 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] xen: Fix format string X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Stefano Stabellini , qemu-block@nongnu.org, Max Reitz , Paul Durrant , Anthony Perard , xen-devel@lists.xenproject.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Trivial format string fix to solve: hw/block/xen-block.c: In function 'xen_block_realize': hw/block/xen-block.c:218:53: error: format '%lu' expects argument of type= 'long unsigned int', but argument 4 has type 'int64_t {aka long long int}'= [-Werror=3Dformat=3D] xen_device_backend_printf(xendev, "sectors", "%lu", ^ blk_getlength(conf->blk) / conf->logical_block_size); blk_getlength() returns an int64_t. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Paul Durrant --- hw/block/xen-block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index be28b63442..3cf215b730 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c @@ -215,7 +215,7 @@ static void xen_block_realize(XenDevice *xendev, Error = **errp) =20 xen_device_backend_printf(xendev, "sector-size", "%u", conf->logical_block_size); - xen_device_backend_printf(xendev, "sectors", "%lu", + xen_device_backend_printf(xendev, "sectors", "%lld", blk_getlength(conf->blk) / conf->logical_block_size); =20 --=20 2.17.2