From patchwork Thu Sep 30 19:30:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 66242 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 1A4E2B6F10 for ; Fri, 1 Oct 2010 06:02:28 +1000 (EST) Received: from localhost ([127.0.0.1]:59095 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1Oqc-0003V8-Dr for incoming@patchwork.ozlabs.org; Thu, 30 Sep 2010 15:31:18 -0400 Received: from [140.186.70.92] (port=33319 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1Opu-0003Rd-A2 for qemu-devel@nongnu.org; Thu, 30 Sep 2010 15:30:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P1Opl-0008AB-3D for qemu-devel@nongnu.org; Thu, 30 Sep 2010 15:30:26 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:56956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P1Opk-00089l-Mk for qemu-devel@nongnu.org; Thu, 30 Sep 2010 15:30:25 -0400 Received: from flocke.weilnetz.de (p54ADB6CF.dip.t-dialin.net [84.173.182.207]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MK5Y1-1P0ZLt3u57-0022yA; Thu, 30 Sep 2010 21:30:21 +0200 Received: from stefan by flocke.weilnetz.de with local (Exim 4.72) (envelope-from ) id 1P1Opg-0003iH-4f; Thu, 30 Sep 2010 21:30:20 +0200 From: Stefan Weil To: QEMU Developers Date: Thu, 30 Sep 2010 21:30:19 +0200 Message-Id: <1285875019-14246-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-Provags-ID: V02:K0:xBIxmKMBxN/XhYwGbaG25qObMUry4YeAPTLb1EtsIw7 qezoKIFb3boBt4KYP6vu1qkNxoE5OdzhNUWYzjYLPYTa5m0YNF cwJ1AF2Vbr/YoaeEcaEvIYgU0YdWrX2OBIdQ5vVoDzIYg/j1Qf x020ULvYOyWvIAcncBklKr5LvfkJ7zf+QBzu2zaU+hJn5B4OX7 SAPYslyTcQeBWEfRAmSaY429WGBaiYAsTLJDagmZ+cicEXNmwj PRZIdtD3pWYtC X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Blue Swirl Subject: [Qemu-devel] [PATCH] ds1225y: Fix compiler errors in debug code 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 TARGET_FMT_lx is not allowed here, so use type casts to unsigned (which should be large enough to hold typical nvram addresses). ./hw/ds1225y.c:48:35: error: attempt to use poisoned "TARGET_FMT_lx" ./hw/ds1225y.c: In function ‘nvram_readb’: ./hw/ds1225y.c:48: error: expected ‘)’ before ‘TARGET_FMT_lx’ ./hw/ds1225y.c:48: error: too few arguments for format ./hw/ds1225y.c:76:36: error: attempt to use poisoned "TARGET_FMT_lx" ./hw/ds1225y.c: In function ‘nvram_writeb’: ./hw/ds1225y.c:76: error: expected ‘)’ before ‘TARGET_FMT_lx’ ./hw/ds1225y.c:76: error: too few arguments for format ./hw/ds1225y.c:107:47: error: attempt to use poisoned "TARGET_FMT_lx" ./hw/ds1225y.c: In function ‘nvram_writeb_protected’: ./hw/ds1225y.c:107: error: expected ‘)’ before ‘TARGET_FMT_lx’ ./hw/ds1225y.c:107: error: too few arguments for format Cc: Blue Swirl Signed-off-by: Stefan Weil --- hw/ds1225y.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ds1225y.c b/hw/ds1225y.c index 009d127..381ca65 100644 --- a/hw/ds1225y.c +++ b/hw/ds1225y.c @@ -45,7 +45,7 @@ static uint32_t nvram_readb (void *opaque, target_phys_addr_t addr) val = s->contents[addr]; #ifdef DEBUG_NVRAM - printf("nvram: read 0x%x at " TARGET_FMT_lx "\n", val, addr); + printf("nvram: read 0x%x at %08x\n", val, (unsigned)addr); #endif return val; } @@ -73,7 +73,7 @@ static void nvram_writeb (void *opaque, target_phys_addr_t addr, uint32_t val) ds1225y_t *s = opaque; #ifdef DEBUG_NVRAM - printf("nvram: write 0x%x at " TARGET_FMT_lx "\n", val, addr); + printf("nvram: write 0x%x at %08x\n", val, (unsigned)addr); #endif s->contents[addr] = val & 0xff; @@ -104,7 +104,7 @@ static void nvram_writeb_protected (void *opaque, target_phys_addr_t addr, uint3 if (s->protection != 7) { #ifdef DEBUG_NVRAM - printf("nvram: prevent write of 0x%x at " TARGET_FMT_lx "\n", val, addr); + printf("nvram: prevent write of 0x%x at %08x\n", val, (unsigned)addr); #endif return; }