lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 May 2009 00:41:00 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Amerigo Wang <amwang@...hat.com>
Cc:	linux-kernel@...r.kernel.org, Sam Ravnborg <sam@...nborg.org>
Subject: Re: [Patch] kbuild: fix a compile warning

On Fri, 15 May 2009 03:51:18 -0400 Amerigo Wang <amwang@...hat.com> wrote:

> 
> I got this warning:

With which gcc version?

>  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
> 

(wtf?)

> 
> --- 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);
>  	}
>  }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ