From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54952 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5kdx-0006kK-44 for qemu-devel@nongnu.org; Fri, 01 Apr 2011 16:08:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5kdv-00032z-Rn for qemu-devel@nongnu.org; Fri, 01 Apr 2011 16:08:29 -0400 Received: from hall.aurel32.net ([88.191.126.93]:33253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5kdv-00032S-Kw for qemu-devel@nongnu.org; Fri, 01 Apr 2011 16:08:27 -0400 Date: Fri, 1 Apr 2011 22:08:23 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] fix build errors when we enable acpi_piix4 debug Message-ID: <20110401200823.GA31037@volta.aurel32.net> References: <4D6B06E9.7080303@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4D6B06E9.7080303@cn.fujitsu.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang Cc: qemu-devel On Mon, Feb 28, 2011 at 10:22:33AM +0800, Wen Congyang wrote: > I enable acpi_piix4 debug, and got the following build errors: > # make > CC libhw64/acpi_piix4.o > cc1: warnings being treated as errors > /home/wency/source/qemu/hw/acpi_piix4.c: In function ‘pm_ioport_write’: > /home/wency/source/qemu/hw/acpi_piix4.c:193: error: format ‘%04x’ expects type ‘unsigned int’, but argument 2 has type ‘uint64_t’ > /home/wency/source/qemu/hw/acpi_piix4.c:193: error: format ‘%04x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’ > /home/wency/source/qemu/hw/acpi_piix4.c: In function ‘pm_ioport_read’: > /home/wency/source/qemu/hw/acpi_piix4.c:219: error: format ‘%04x’ expects type ‘unsigned int’, but argument 2 has type ‘uint64_t’ > make[1]: *** [acpi_piix4.o] Error 1 > make: *** [subdir-libhw64] Error 2 > > Signed-off-by: Wen Congyang > > --- > hw/acpi_piix4.c | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) Thanks, applied. > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c > index 5bbc2b5..b5a2762 100644 > --- a/hw/acpi_piix4.c > +++ b/hw/acpi_piix4.c > @@ -190,7 +190,8 @@ static void pm_ioport_write(IORange *ioport, uint64_t addr, unsigned width, > default: > break; > } > - PIIX4_DPRINTF("PM writew port=0x%04x val=0x%04x\n", addr, val); > + PIIX4_DPRINTF("PM writew port=0x%04x val=0x%04x\n", (unsigned int)addr, > + (unsigned int)val); > } > > static void pm_ioport_read(IORange *ioport, uint64_t addr, unsigned width, > @@ -216,7 +217,7 @@ static void pm_ioport_read(IORange *ioport, uint64_t addr, unsigned width, > val = 0; > break; > } > - PIIX4_DPRINTF("PM readw port=0x%04x val=0x%04x\n", addr, val); > + PIIX4_DPRINTF("PM readw port=0x%04x val=0x%04x\n", (unsigned int)addr, val); > *data = val; > } > > -- > 1.7.1 > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net