From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZW47z-0007BG-GV for qemu-devel@nongnu.org; Sun, 30 Aug 2015 11:02:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZW47w-0003SR-Ad for qemu-devel@nongnu.org; Sun, 30 Aug 2015 11:02:39 -0400 Received: from v220110690675601.yourvserver.net ([37.221.199.173]:60410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZW47w-0003SH-4V for qemu-devel@nongnu.org; Sun, 30 Aug 2015 11:02:36 -0400 Message-ID: <55E31B08.5020707@weilnetz.de> Date: Sun, 30 Aug 2015 17:02:32 +0200 From: Stefan Weil MIME-Version: 1.0 References: <20150830141909.GA13186@var.home> <55E31561.4080008@weilnetz.de> <20150830145029.GC3238@var.home> In-Reply-To: <20150830145029.GC3238@var.home> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] baum: Fix build with debugging enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Samuel Thibault Cc: qemu-devel@nongnu.org Am 30.08.2015 um 16:50 schrieb Samuel Thibault: > Stefan Weil, le Sun 30 Aug 2015 16:38:25 +0200, a =E9crit : >> Am 30.08.2015 um 16:19 schrieb Samuel Thibault: >>> cur and buf are pointers, so the difference can be a long int on 64bi= t >>> platforms. >>> >>> Signed-off-by: Samuel Thibault >>> >>> diff --git a/backends/baum.c b/backends/baum.c >>> index a69aaff..0fa8025 100644 >>> --- a/backends/baum.c >>> +++ b/backends/baum.c >>> @@ -303,7 +303,7 @@ static int baum_eat_packet(BaumDriverState *baum,= const uint8_t *buf, int len) >>> return 0; >>> cur++; >>> } >>> - DPRINTF("Dropped %d bytes!\n", cur - buf); >>> + DPRINTF("Dropped %ld bytes!\n", (long int) (cur - buf)); >> >> Using %td (and no type cast) would be better. >=20 > Ah, do we assume that %td is supported by libc? >=20 > Samuel >=20 Yes. It is already used in hw/audio/es1370.c and in translate-all.c. Stefan