Re: [PATCH] binfmt_elf CodingStyle cleanup and remove somepointless casts

From: Andrew Morton
Date: Mon Apr 24 2006 - 16:33:54 EST


Jesper Juhl <jesper.juhl@xxxxxxxxx> wrote:
>
> We still need to cast u_platform from pointer to integer or gcc will yell
> at us. But, I don't see why we should first cast it to `unsigned long' and
> then to elf_addr_t, so I removed the `unsigned long' cast.

On 64 bit platforms, these:

some_pointer = (something *)some_u32;
some_u32 = (u32)pointer;

will generate compile warnings concerning the differently-sized quantities
on the lhs and rhs.

The usual way of suppressing this is

some_pointer = (something *)(unsigned long)some_u32;
some_u32 = (unsigned long)pointer;

-
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/