lkml.org 
[lkml]   [2006]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] binfmt_elf CodingStyle cleanup and remove some pointless casts
Jesper Juhl <jesper.juhl@gmail.com> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-24 22:36    [W:0.411 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site