From patchwork Sun Sep 5 18:14:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 63851 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 049A8B70DD for ; Mon, 6 Sep 2010 04:22:38 +1000 (EST) Received: from localhost ([127.0.0.1]:36346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OsJrO-00039m-Ps for incoming@patchwork.ozlabs.org; Sun, 05 Sep 2010 14:22:34 -0400 Received: from [140.186.70.92] (port=47543 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OsJpU-0002O2-22 for qemu-devel@nongnu.org; Sun, 05 Sep 2010 14:20:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OsJpS-0000td-MD for qemu-devel@nongnu.org; Sun, 05 Sep 2010 14:20:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12210) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OsJpS-0000tU-Eh for qemu-devel@nongnu.org; Sun, 05 Sep 2010 14:20:34 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o85IKUbn011618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 5 Sep 2010 14:20:31 -0400 Received: from redhat.com (vpn-6-15.tlv.redhat.com [10.35.6.15]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o85IKSKj032402; Sun, 5 Sep 2010 14:20:29 -0400 Date: Sun, 5 Sep 2010 21:14:36 +0300 From: "Michael S. Tsirkin" To: cam@cs.ualberta.ca, qemu-devel@nongnu.org, Anthony Liguori Message-ID: <20100905181435.GA24728@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id o85IKUbn011618 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] ivshmem: fix build on a 32 bit system 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 /scm/qemu/hw/ivshmem.c: In function ‘check_shm_size’: /scm/qemu/hw/ivshmem.c:356: error: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘__off64_t’ Fix by casting to u64. Signed-off-by: Michael S. Tsirkin --- hw/ivshmem.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index bbb5cba..6f41383 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -352,8 +352,9 @@ static int check_shm_size(IVShmemState *s, int fd) { if (s->ivshmem_size > buf.st_size) { fprintf(stderr, "IVSHMEM ERROR: Requested memory size greater"); - fprintf(stderr, " than shared object size (%" PRIu64 " > %ld)\n", - s->ivshmem_size, buf.st_size); + fprintf(stderr, " than shared object size " + "(%" PRIu64 " > %" PRIu64 "d)\n", + s->ivshmem_size, (uint64_t)buf.st_size); return -1; } else { return 0;