From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=32768 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHan2-0005sT-3v for qemu-devel@nongnu.org; Thu, 27 May 2010 06:58:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHamz-0006hc-3C for qemu-devel@nongnu.org; Thu, 27 May 2010 06:58:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7060) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHamy-0006hS-PV for qemu-devel@nongnu.org; Thu, 27 May 2010 06:58:13 -0400 Date: Thu, 27 May 2010 13:53:55 +0300 From: "Michael S. Tsirkin" Message-ID: <20100527105355.GA7313@redhat.com> References: <1274955749-20689-1-git-send-email-Jes.Sorensen@redhat.com> <20100527104414.GA7250@redhat.com> <4BFE4FB5.5000300@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BFE4FB5.5000300@redhat.com> Subject: [Qemu-devel] Re: [PATCH] vhost_net.c: v2 Fix build failure introduced by 0bfcd599e3f5c5679cc7d0165a0a1822e2f60de2 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes Sorensen Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org On Thu, May 27, 2010 at 12:55:49PM +0200, Jes Sorensen wrote: > On 05/27/10 12:44, Michael S. Tsirkin wrote: > > On Thu, May 27, 2010 at 12:22:29PM +0200, Jes.Sorensen@redhat.com wrote: > >> From: Jes Sorensen > >> > >> Fix build failure introduced by 0bfcd599e3f5c5679cc7d0165a0a1822e2f60de2 > >> > >> The format statement expects unsigned long on x86_64, but receives > >> unsigned long long, so gcc exits with an error. > >> > >> Signed-off-by: Jes Sorensen > > > > I think this part of 0bfcd599e3f5c5679cc7d0165a0a1822e2f60de2 > > should just be reverted. We have unsigned long, it should be printed > > woith %ll. Casting to uint64_t just so we can print with PRIu64 seems silly. > > That is an option too. Problem is just that unsigned long is 32 bit on > 32 bit systems and Windows (even for 64 bit) so if we need more flags we > need to be careful with it. > > Cheers, > Jes I don't understand, sorry. This field is unsigned long long, not unsigned long. %ll will print unsigned long long for any standard printf, whatever its length. -- MST