[ovs-dev] [PATCH v3 1/8] Fix strict aliasing violations with GCC 4.1 and 4.4.
blp at nicira.com
Tue Aug 5 18:02:41 UTC 2014
On Thu, Jul 31, 2014 at 03:21:47PM -0700, Jarno Rajahalme wrote:
> The typical use of struct sockaddr_storage is flagged as a strict
> aliasing violation by GCC 4.4.7. Using an explicit union lets the
> compiler know that accessing the same location via different types is
> not an error.
> GCC 4.1.2 had a similar complaint about a cast of ukey's key_buf to
> nlattr. After this patch there are no further warnings with the
> XenServer build, so we could start treating warnings as errors in the
> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>
More information about the dev