aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAmerigo Wang <amwang@redhat.com>2009-06-10 12:48:23 -0700
committerSam Ravnborg <sam@ravnborg.org>2009-06-14 22:36:23 +0200
commitd067aa741589a9783cc43315119e0f431b4e382c (patch)
tree2dbfbd85123be195e0ca3bf5365f6a16995f8f03 /scripts
parentf2ac5e78928bf94118b4d4911166a02e8a87d3ea (diff)
downloadkernel_samsung_espresso10-d067aa741589a9783cc43315119e0f431b4e382c.zip
kernel_samsung_espresso10-d067aa741589a9783cc43315119e0f431b4e382c.tar.gz
kernel_samsung_espresso10-d067aa741589a9783cc43315119e0f431b4e382c.tar.bz2
kbuild: fix a compile warning
gcc-4.4.1: HOSTCC scripts/basic/fixdep scripts/basic/fixdep.c: In function 'traps': scripts/basic/fixdep.c:377: warning: dereferencing type-punned pointer will break strict-aliasing rules scripts/basic/fixdep.c:379: warning: dereferencing type-punned pointer will break strict-aliasing rules (Apparently -fno-strict-aliasing will fix this too) Signed-off-by: WANG Cong <amwang@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/basic/fixdep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 8912c0f..72c1520 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -373,10 +373,11 @@ void print_deps(void)
void traps(void)
{
static char test[] __attribute__((aligned(sizeof(int)))) = "CONF";
+ int *p = (int *)test;
- if (*(int *)test != INT_CONF) {
+ if (*p != INT_CONF) {
fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n",
- *(int *)test);
+ *p);
exit(2);
}
}