[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <yw1xhans63u0.fsf@unicorn.mansr.com>
Date: Tue, 11 Dec 2012 14:49:59 +0000
From: Måns Rullgård <mans@...sr.com>
To: Christoph Lameter <cl@...ux.com>
Cc: David Rientjes <rientjes@...gle.com>,
Pekka Enberg <penberg@...nel.org>, glommer@...allels.com,
js1304@...il.com, linux-kernel@...r.kernel.org
Subject: Re: signed size_t ?
Christoph Lameter <cl@...ux.com> writes:
> On Tue, 11 Dec 2012, kbuild test robot wrote:
>
>> mm/slab_common.c: In function 'create_boot_cache':
>> mm/slab_common.c:219:6: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t' [-Wformat]
>
> We already changed that once from %td to %zd so that the size_t works
> correctly.
If the argument is correctly of type size_t, the format should be '%zu'
since size_t is unsigned.
> Does a signed size_t make any sense?
A signed type corresponding to size_t sometimes makes sense and it's
called ssize_t.
--
Måns Rullgård
mans@...sr.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists