Add -fno-strict-aliasing to default CFLAGS
commitd508979b6bde816e31caaa3cf29aeeccb60e70a2
authorChristophe Fergeau <cfergeau@redhat.com>
Mon, 15 Jun 2015 14:31:44 +0000 (15 16:31 +0200)
committerVictor Toso <victortoso@redhat.com>
Wed, 17 Jun 2015 08:44:13 +0000 (17 10:44 +0200)
tree46caaab639c47f34685e292d8724e0412e4e42b8
parente7f78761905b5b0f18e6a42b5e1772b6c4050313
Add -fno-strict-aliasing to default CFLAGS

Compilation breaks with older gcc versions (gcc (GCC) 4.4.7 20120313
(Red Hat 4.4.7-11) on RHEL6) with the following error (due to the
additional use of -Werror in the default CFLAGS)
CC     src/src_spice_vdagent-vdagent-x11-randr.o
cc1: warnings being treated as errors
src/vdagent-x11-randr.c: In function ‘vdagent_x11_randr_handle_event’:
src/vdagent-x11-randr.c:499: error: dereferencing pointer ‘sce’ does break strict-aliasing rules
src/vdagent-x11-randr.c:499: error: dereferencing pointer ‘sce’ does break strict-aliasing rules
src/vdagent-x11-randr.c:498: note: initialized from here
make: *** [src/src_spice_vdagent-vdagent-x11-randr.o] Error 1

Strict aliasing is not something we must have for the agent, and the
alternative would most likely involve an anonymous union, or some
casting. Given that this warning only occurs with these older compilers,
better to go with a fix as non-invasive as possible.

Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=90981
configure.ac