[PATCH] ubiformat.c: fix printf(%d, size_t) warning

Artem Bityutskiy dedekind at infradead.org
Tue Dec 9 08:31:29 EST 2008


On Tue, 2008-12-09 at 08:28 -0500, Mike Frysinger wrote:
> A size_t should be printed using %zu (unsigned size_t) rather than %d.  This
> fixes the following warning on my system:
> gcc -O2 -Werror -Wall -Iinclude -Isrc -I../../include src/ubiformat.c -c -o ubiformat.o
> cc1: warnings being treated as errors
> src/ubiformat.c: In function ‘read_all’:
> src/ubiformat.c:345: error: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’
> src/ubiformat.c:352: error: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’
> make: *** [ubiformat.o] Error 1

Pushed, thanks.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list