From patchwork Mon Apr 15 02:14:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: liguang X-Patchwork-Id: 236487 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1E51F2C00AA for ; Mon, 15 Apr 2013 12:17:10 +1000 (EST) Received: from localhost ([::1]:60508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URYyi-0006YP-AH for incoming@patchwork.ozlabs.org; Sun, 14 Apr 2013 22:17:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URYxa-00050W-3e for qemu-devel@nongnu.org; Sun, 14 Apr 2013 22:15:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URYxY-0000gF-Vf for qemu-devel@nongnu.org; Sun, 14 Apr 2013 22:15:58 -0400 Received: from [222.73.24.84] (port=41948 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URYxY-0000fy-L0 for qemu-devel@nongnu.org; Sun, 14 Apr 2013 22:15:56 -0400 X-IronPort-AV: E=Sophos;i="4.87,472,1363104000"; d="scan'208";a="7053552" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 15 Apr 2013 10:13:15 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r3F2FsaH002239 for ; Mon, 15 Apr 2013 10:15:54 +0800 Received: from liguang.fnst.cn.fujitsu.com ([10.167.233.147]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013041510143421-541549 ; Mon, 15 Apr 2013 10:14:34 +0800 From: liguang To: qemu-devel@nongnu.org Date: Mon, 15 Apr 2013 10:14:26 +0800 Message-Id: <1365992066-24348-3-git-send-email-lig.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1365992066-24348-1-git-send-email-lig.fnst@cn.fujitsu.com> References: <1365992066-24348-1-git-send-email-lig.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/04/15 10:14:34, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/04/15 10:14:36 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 222.73.24.84 Cc: liguang Subject: [Qemu-devel] [PATCH v2 3/3] debugcon: fix compiler warning when open DEBUG_DEBUGCON X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org compiler warnings: CC hw/char/debugcon.o hw/char/debugcon.c: In function ‘debugcon_ioport_write’: hw/char/debugcon.c:58: warning: format ‘%02x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’ hw/char/debugcon.c: In function ‘debugcon_ioport_read’: hw/char/debugcon.c:70: warning: format ‘%04x’ expects type ‘unsigned int’, but argument 2 has type ‘hwaddr’ Signed-off-by: liguang --- hw/char/debugcon.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c index b6f2b06..a0d3633 100644 --- a/hw/char/debugcon.c +++ b/hw/char/debugcon.c @@ -33,7 +33,7 @@ #define ISA_DEBUGCON_DEVICE(obj) \ OBJECT_CHECK(ISADebugconState, (obj), TYPE_ISA_DEBUGCON_DEVICE) -//#define DEBUG_DEBUGCON +#define DEBUG_DEBUGCON typedef struct DebugconState { MemoryRegion io; @@ -55,7 +55,7 @@ static void debugcon_ioport_write(void *opaque, hwaddr addr, uint64_t val, unsigned char ch = val; #ifdef DEBUG_DEBUGCON - printf(" [debugcon: write addr=0x%04" HWADDR_PRIx " val=0x%02]\n", addr, val); + printf(" [debugcon: write addr=0x%04" HWADDR_PRIx " val=0x%02" PRIx64 "]\n", addr, val); #endif qemu_chr_fe_write(s->chr, &ch, 1); @@ -67,7 +67,7 @@ static uint64_t debugcon_ioport_read(void *opaque, hwaddr addr, unsigned width) DebugconState *s = opaque; #ifdef DEBUG_DEBUGCON - printf("debugcon: read addr=0x%04x\n", addr); + printf("debugcon: read addr=0x%04" HWADDR_PRIx "\n", addr); #endif return s->readback;