aboutsummaryrefslogtreecommitdiff
path: root/modutils/modutils-24.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-02-04 15:00:15 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-02-04 15:00:15 +0100
commit98a4c7cf3d799ab953cb77e8b34597c73e3e7335 (patch)
tree2d9c07825697cd7c6e96647ff0992dce4d4a0115 /modutils/modutils-24.c
parent1821d188ca674b42bf0f384b0c2332ff95701bba (diff)
downloadbusybox-w32-98a4c7cf3d799ab953cb77e8b34597c73e3e7335.tar.gz
busybox-w32-98a4c7cf3d799ab953cb77e8b34597c73e3e7335.tar.bz2
busybox-w32-98a4c7cf3d799ab953cb77e8b34597c73e3e7335.zip
*: suppress ~60% of "aliased warnings" on gcc-4.4.1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils/modutils-24.c')
-rw-r--r--modutils/modutils-24.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/modutils/modutils-24.c b/modutils/modutils-24.c
index 442e80f2f..05c1bf2b2 100644
--- a/modutils/modutils-24.c
+++ b/modutils/modutils-24.c
@@ -3203,6 +3203,7 @@ static int obj_create_image(struct obj_file *f, char *image)
3203 3203
3204static struct obj_file *obj_load(char *image, size_t image_size, int loadprogbits) 3204static struct obj_file *obj_load(char *image, size_t image_size, int loadprogbits)
3205{ 3205{
3206 typedef uint32_t aliased_uint32_t FIX_ALIASING;
3206#if BB_LITTLE_ENDIAN 3207#if BB_LITTLE_ENDIAN
3207# define ELFMAG_U32 ((uint32_t)(ELFMAG0 + 0x100 * (ELFMAG1 + (0x100 * (ELFMAG2 + 0x100 * ELFMAG3))))) 3208# define ELFMAG_U32 ((uint32_t)(ELFMAG0 + 0x100 * (ELFMAG1 + (0x100 * (ELFMAG2 + 0x100 * ELFMAG3)))))
3208#else 3209#else
@@ -3224,7 +3225,7 @@ static struct obj_file *obj_load(char *image, size_t image_size, int loadprogbit
3224 bb_error_msg_and_die("error while loading ELF header"); 3225 bb_error_msg_and_die("error while loading ELF header");
3225 memcpy(&f->header, image, sizeof(f->header)); 3226 memcpy(&f->header, image, sizeof(f->header));
3226 3227
3227 if (*(uint32_t*)(&f->header.e_ident) != ELFMAG_U32) { 3228 if (*(aliased_uint32_t*)(&f->header.e_ident) != ELFMAG_U32) {
3228 bb_error_msg_and_die("not an ELF file"); 3229 bb_error_msg_and_die("not an ELF file");
3229 } 3230 }
3230 if (f->header.e_ident[EI_CLASS] != ELFCLASSM 3231 if (f->header.e_ident[EI_CLASS] != ELFCLASSM