From patchwork Thu May 23 06:58:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: liguang X-Patchwork-Id: 245827 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 109BE2C0084 for ; Thu, 23 May 2013 17:00:06 +1000 (EST) Received: from localhost ([::1]:35493 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfPVM-0006Ri-8z for incoming@patchwork.ozlabs.org; Thu, 23 May 2013 03:00:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfPV0-0006Pl-9K for qemu-devel@nongnu.org; Thu, 23 May 2013 02:59:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfPUz-0006MO-85 for qemu-devel@nongnu.org; Thu, 23 May 2013 02:59:42 -0400 Received: from [222.73.24.84] (port=1092 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfPUy-0006Lw-R3; Thu, 23 May 2013 02:59:41 -0400 X-IronPort-AV: E=Sophos;i="4.87,726,1363104000"; d="scan'208";a="7342577" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 23 May 2013 14:56:18 +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 r4N6x8Tn017475; Thu, 23 May 2013 14:59:08 +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 2013052314574858-1464763 ; Thu, 23 May 2013 14:57:48 +0800 From: liguang To: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Date: Thu, 23 May 2013 14:58:43 +0800 Message-Id: <1369292323-31762-3-git-send-email-lig.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1369292323-31762-1-git-send-email-lig.fnst@cn.fujitsu.com> References: <1369292323-31762-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/05/23 14:57:48, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/05/23 14:57:48 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][v4 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 | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c index 52fa0ab..3b0637d 100644 --- a/hw/char/debugcon.c +++ b/hw/char/debugcon.c @@ -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%02x]\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;