Messages in this thread | | | From | Måns Rullgård <> | Subject | Re: signed size_t ? | Date | Tue, 11 Dec 2012 14:49:59 +0000 |
| |
Christoph Lameter <cl@linux.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@mansr.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |