From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: [PATCH] mini-os: enable compiler check for printk format types Date: Fri, 8 Aug 2014 16:32:07 +0200 Message-ID: <20140808143207.GA18842@type.bordeaux.inria.fr> References: <1407318240-1799-1-git-send-email-talex5@gmail.com> <20140807145509.GK3426@type.youpi.perso.aquilenet.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XFlDF-0001lc-Ft for xen-devel@lists.xenproject.org; Fri, 08 Aug 2014 14:32:09 +0000 Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Thomas Leonard Cc: xen-devel@lists.xenproject.org, Stefano Stabellini , David Scott , Anil Madhavapeddy List-Id: xen-devel@lists.xenproject.org Thomas Leonard, le Fri 08 Aug 2014 15:28:22 +0100, a =E9crit : > On 7 August 2014 15:55, Samuel Thibault wr= ote: > > Thomas Leonard, le Wed 06 Aug 2014 10:44:00 +0100, a =E9crit : > [...] > >> diff --git a/extras/mini-os/netfront.c b/extras/mini-os/netfront.c > >> index 44c3995..6f335fe 100644 > >> --- a/extras/mini-os/netfront.c > >> +++ b/extras/mini-os/netfront.c > >> @@ -327,8 +327,8 @@ struct netfront_dev *init_netfront(char *_nodename= , void (*thenetif_rx)(unsigned > >> dev->fd =3D -1; > >> #endif > >> > >> - printk("net TX ring size %d\n", NET_TX_RING_SIZE); > >> - printk("net RX ring size %d\n", NET_RX_RING_SIZE); > >> + printk("net TX ring size %llu\n", (unsigned long long) NET_TX_RIN= G_SIZE); > >> + printk("net RX ring size %llu\n", (unsigned long long) NET_RX_RIN= G_SIZE); > > > > lib/printf.c does not actually support %ll yet, it uses %L instead. > = > Actually, it looks like it does: > = > if (qualifier =3D=3D 'l' && *fmt =3D=3D 'l') { > qualifier =3D 'L'; > ++fmt; > } Oh, I missed this part of the code, thanks. For this exerpt of code, long long is way too much, but for things like disk offsets and such, it'd be preferrable to go for long long. Samuel