[PATCH] makefile bug and some cleanup
Jörn Engel
joern at wohnheim.fh-wedel.de
Sun Mar 2 13:14:39 EST 2003
On Sun, 2 March 2003 11:57:30 +0100, Jörn Engel wrote:
>
> First looks trivial. The second feels wrong.
>
> > printf("\rPerforming Flash Erase of length %lu at offset 0x%lx",
> > - erase.length, erase.start);
> > + (unsigned long)erase.length, (unsigned long)erase.start);
>
> People (including me) are easily lured into fixing the warnings, which
> are only symptoms, instead of the real causes. And this looks exactly
> like a symptom fix.
Here are the warnings:
erase.c: In function `region_erase':
erase.c:66: warning: long unsigned int format, u_int32_t arg (arg 2)
erase.c:66: warning: long unsigned int format, u_int32_t arg (arg 3)
erase.c: In function `non_region_erase':
erase.c:103: warning: long unsigned int format, u_int32_t arg (arg 2)
erase.c:103: warning: long unsigned int format, u_int32_t arg (arg 3)
erase.c:109: warning: long unsigned int format, u_int32_t arg (arg 2)
And they are correct. u_int32_t is typedef'd to be unsigned int on all
platforms for the linux kernel and in glibc for i386.
I'd have to check this on a 64bit machine on Monday but I expect
pretty ugly results. Correct fix would be to remove the 'l' from the
format string each and every time.
Robert, do you agree? Is is ok if I commit my proposed patch?
Jörn
--
When people work hard for you for a pat on the back, you've got
to give them that pat.
-- Robert Heinlein
More information about the linux-mtd
mailing list