[U-Boot] [PATCH] kwbimage.c: Fix compile warning when building on 32/64 bit systems
Mike Frysinger
vapier at gentoo.org
Tue Sep 15 22:11:55 CEST 2009
On Tuesday 15 September 2009 15:36:54 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > > if (len % sizeof(uint32_t)) {
> > > - printf ("Error:%s[%d] - lenght is not in multiple of %ld\n",
> > > - __FUNCTION__, len, sizeof(uint32_t));
> > > + printf ("Error:%s[%d] - lenght is not in multiple of %d\n",
> > > + __FUNCTION__, len, (uint32_t)sizeof(uint32_t));
> >
> > why not do it right ? use PRIu32 from inttypes.h like POSIX intended.
> > might
>
> I don't think that would fix it, as PRIu32 is just "u", but what we
> really need to be compatible with both 32 and 64 bit environments is
> "%zu".
i thought it was printing a u32. a sizeof() is size_t, so use %zu.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090915/cbdf1122/attachment.pgp
More information about the U-Boot
mailing list