[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] mini-os: enable compiler check for printk format types



On 7 August 2014 15:55, Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> wrote:
> Thomas Leonard, le Wed 06 Aug 2014 10:44:00 +0100, a Ãcrit :
[...]
>> 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 = -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_RING_SIZE);
>> +    printk("net RX ring size %llu\n", (unsigned long long) 
>> NET_RX_RING_SIZE);
>
> lib/printf.c does not actually support %ll yet, it uses %L instead.

Actually, it looks like it does:

if (qualifier == 'l' && *fmt == 'l') {
  qualifier = 'L';
  ++fmt;
}

https://github.com/talex5/xen/blob/f71a229144d1316ff52fc8f1229c7c70573f44e2/extras/mini-os/lib/printf.c#L352


-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.