Re: [BUG] mtd redboot (also gcc 4.1 warning fix)
From: Steven Rostedt
Date: Wed May 10 2006 - 05:04:42 EST
On Wed, 10 May 2006, Matheus Izvekov wrote:
> On 5/9/06, Daniel Walker <dwalker@xxxxxxxxxx> wrote:
> > unsigned long may not always be 32 bits, right ? This patch fixes the
> Incorrect, its defined as 32bits for every standard C compiler
Nope, I believe that long is always suppose to be big enough to hold a
pointer. So if you have 64 bit pointers, long needs to be 64 bits. That
way it is always safe to do:
void *func(void *p) {
unsigned long l = (unsigned long)p;
/* do stuff with l */
p = (void*)l;
return p;
}
-- Steve
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/