[U-Boot] [PATCH] nand: fixup printf modifiers to match types used

Mike Frysinger vapier at gentoo.org
Mon Jan 19 01:38:12 CET 2009


On Thursday 15 January 2009 16:33:20 Scott Wood wrote:
> On Tue, Jan 06, 2009 at 11:32:37AM -0500, Mike Frysinger wrote:
> > @@ -499,7 +499,7 @@ int nand_write_skip_bad(nand_info_t *nand, size_t
> > offset, size_t *length, size_t write_size;
> >
> >  		if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
> > -			printf ("Skip bad block 0x%08x\n",
> > +			printf ("Skip bad block 0x%08lx\n",
> >  				offset & ~(nand->erasesize - 1));
> >  			offset += nand->erasesize - block_offset;
> >  			continue;
>
> nand_util.c:503: warning: format '%08lx' expects type 'long unsigned
> int', but argument 2 has type 'size_t'

erasesize is unsigned long and so the combination of size_t/unsigned long 
looked like it resulted in unsigned long.  but %08zx looks like it works for 
me as well, so i'll change it to that.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090118/f9fdbe4e/attachment-0001.pgp 


More information about the U-Boot mailing list