mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
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>
This commit is contained in:
parent
f2ac5e7892
commit
d067aa7415
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue