From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzuCP-00032u-La for qemu-devel@nongnu.org; Thu, 18 Jul 2013 15:49:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzuCO-0006Qy-II for qemu-devel@nongnu.org; Thu, 18 Jul 2013 15:49:13 -0400 Received: from [2a03:4000:1::4e2f:c7ac:d] (port=35771 helo=v220110690675601.yourvserver.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzuCO-0006Qe-6P for qemu-devel@nongnu.org; Thu, 18 Jul 2013 15:49:12 -0400 Message-ID: <51E846AC.5070309@weilnetz.de> Date: Thu, 18 Jul 2013 21:49:00 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1373647719-32757-1-git-send-email-sw@weilnetz.de> <51E4E011.70407@weilnetz.de> In-Reply-To: <51E4E011.70407@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] PPC: dbdma: macio: Fix format specifiers (build regression) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Alexander Graf , qemu-devel Am 16.07.2013 07:54, schrieb Stefan Weil: > Am 12.07.2013 18:48, schrieb Stefan Weil: >> Fix a number of warnings for 32 bit builds (tested on MingW and Linux)= : >> >> CC hw/ide/macio.o >> qemu/hw/ide/macio.c: In function 'pmac_ide_atapi_transfer_cb': >> qemu/hw/ide/macio.c:134:9: error: format '%lx' expects argument of typ= e 'long unsigned int', but argument 3 has type 'hwaddr' [-Werror=3Dformat= ] >> qemu/hw/ide/macio.c: In function 'pmac_ide_transfer_cb': >> qemu/hw/ide/macio.c:215:5: error: format '%ld' expects argument of typ= e 'long int', but argument 5 has type 'int64_t' [-Werror=3Dformat] >> qemu/hw/ide/macio.c:222:9: error: format '%lx' expects argument of typ= e 'long unsigned int', but argument 3 has type 'hwaddr' [-Werror=3Dformat= ] >> qemu/hw/ide/macio.c:264:9: error: format '%lx' expects argument of typ= e 'long unsigned int', but argument 3 has type 'hwaddr' [-Werror=3Dformat= ] >> cc1: all warnings being treated as errors >> make: *** [hw/ide/macio.o] Error 1 >> >> Signed-off-by: Stefan Weil >> --- >> >> >> >> Hi Anthony, >> >> the patch fixes a build regression which was introduced today. >> Could you please apply it without waiting for the next pull requests? >> >> Thanks, >> Stefan >> >> >> >> hw/ide/macio.c | 9 +++++---- >> 1 file changed, 5 insertions(+), 4 deletions(-) >> >> diff --git a/hw/ide/macio.c b/hw/ide/macio.c >> index 38ad924..ef4ba2b 100644 >> --- a/hw/ide/macio.c >> +++ b/hw/ide/macio.c >> @@ -131,7 +131,7 @@ static void pmac_ide_atapi_transfer_cb(void *opaqu= e, int ret) >> int sector_num =3D (s->lba << 2) + (s->io_buffer_index >> 9); >> int nsector =3D io->len >> 9; >> =20 >> - MACIO_DPRINTF("precopying unaligned %d bytes to %#lx\n", >> + MACIO_DPRINTF("precopying unaligned %d bytes to %#" HWADDR_PR= Ix "\n", >> unaligned, io->addr + io->len - unaligned); >> =20 >> bdrv_read(s->bs, sector_num + nsector, io->remainder, 1); >> @@ -212,14 +212,15 @@ static void pmac_ide_transfer_cb(void *opaque, i= nt ret) >> s->nsector -=3D n; >> } >> =20 >> - MACIO_DPRINTF("remainder: %d io->len: %d nsector: %d sector_num: = %ld\n", >> + MACIO_DPRINTF("remainder: %d io->len: %d nsector: %d " >> + "sector_num: %" PRId64 "\n", >> io->remainder_len, io->len, s->nsector, sector_num)= ; >> if (io->remainder_len && io->len) { >> /* guest wants the rest of its previous transfer */ >> int remainder_len =3D MIN(io->remainder_len, io->len); >> uint8_t *p =3D &io->remainder[0x200 - remainder_len]; >> =20 >> - MACIO_DPRINTF("copying remainder %d bytes at %#lx\n", >> + MACIO_DPRINTF("copying remainder %d bytes at %#" HWADDR_PRIx = "\n", >> remainder_len, io->addr); >> =20 >> switch (s->dma_cmd) { >> @@ -261,7 +262,7 @@ static void pmac_ide_transfer_cb(void *opaque, int= ret) >> if (unaligned) { >> int nsector =3D io->len >> 9; >> =20 >> - MACIO_DPRINTF("precopying unaligned %d bytes to %#lx\n", >> + MACIO_DPRINTF("precopying unaligned %d bytes to %#" HWADDR_PR= Ix "\n", >> unaligned, io->addr + io->len - unaligned); >> =20 >> switch (s->dma_cmd) { > > Ping? Ping=B2?