From patchwork Thu Sep 2 23:16:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 63583 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 898A6B717B for ; Fri, 3 Sep 2010 09:22:44 +1000 (EST) Received: from localhost ([127.0.0.1]:40537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrJ79-00015J-5f for incoming@patchwork.ozlabs.org; Thu, 02 Sep 2010 19:22:39 -0400 Received: from [140.186.70.92] (port=49548 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrJ1P-0006pm-Db for qemu-devel@nongnu.org; Thu, 02 Sep 2010 19:16:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OrJ1M-0008Ed-UB for qemu-devel@nongnu.org; Thu, 02 Sep 2010 19:16:42 -0400 Received: from cantor2.suse.de ([195.135.220.15]:47906 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OrJ1M-0008E8-O4 for qemu-devel@nongnu.org; Thu, 02 Sep 2010 19:16:40 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 9B88E8A908 for ; Fri, 3 Sep 2010 01:16:38 +0200 (CEST) From: Alexander Graf To: qemu-devel List Date: Fri, 3 Sep 2010 01:16:35 +0200 Message-Id: <1283469398-19965-2-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1283469398-19965-1-git-send-email-agraf@suse.de> References: <1283469398-19965-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Subject: [Qemu-devel] [PATCH 1/4] Fix compile of ivshmem on 32 bit hosts 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 The compile of ivshmem.c on my ppc system breaks with the following error: ivshmem.c: In function ‘check_shm_size’: ivshmem.c:356: error: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘__off64_t’ This patch adds an explicit cast, making printf happy. Signed-off-by: Alexander Graf --- hw/ivshmem.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index bbb5cba..0c9cc84 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -351,9 +351,9 @@ static int check_shm_size(IVShmemState *s, int fd) { fstat(fd, &buf); 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, "IVSHMEM ERROR: Requested memory size greater than " + "shared object size (%" PRIu64 " > %" PRIu64 ")\n", + s->ivshmem_size, (uint64_t)buf.st_size); return -1; } else { return 0;