diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-02-04 15:00:15 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-02-04 15:00:15 +0100 |
commit | 98a4c7cf3d799ab953cb77e8b34597c73e3e7335 (patch) | |
tree | 2d9c07825697cd7c6e96647ff0992dce4d4a0115 /modutils | |
parent | 1821d188ca674b42bf0f384b0c2332ff95701bba (diff) |
*: suppress ~60% of "aliased warnings" on gcc-4.4.1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils')
-rw-r--r-- | modutils/modprobe.c | 2 | ||||
-rw-r--r-- | modutils/modutils-24.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index f339fbdbe..292f2df22 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -70,7 +70,7 @@ struct globals { int num_unresolved_deps; /* bool. "Did we have 'symbol:FOO' requested on cmdline?" */ smallint need_symbols; -}; +} FIX_ALIASING; #define G (*(struct globals*)&bb_common_bufsiz1) #define INIT_G() do { } while (0) 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) static struct obj_file *obj_load(char *image, size_t image_size, int loadprogbits) { + typedef uint32_t aliased_uint32_t FIX_ALIASING; #if BB_LITTLE_ENDIAN # define ELFMAG_U32 ((uint32_t)(ELFMAG0 + 0x100 * (ELFMAG1 + (0x100 * (ELFMAG2 + 0x100 * ELFMAG3))))) #else @@ -3224,7 +3225,7 @@ static struct obj_file *obj_load(char *image, size_t image_size, int loadprogbit bb_error_msg_and_die("error while loading ELF header"); memcpy(&f->header, image, sizeof(f->header)); - if (*(uint32_t*)(&f->header.e_ident) != ELFMAG_U32) { + if (*(aliased_uint32_t*)(&f->header.e_ident) != ELFMAG_U32) { bb_error_msg_and_die("not an ELF file"); } if (f->header.e_ident[EI_CLASS] != ELFCLASSM |