]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
build: fix build on older gcc
authorEric Blake <eblake@redhat.com>
Fri, 7 Sep 2012 17:42:10 +0000 (11:42 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 7 Sep 2012 20:15:22 +0000 (14:15 -0600)
commit892242519acceec2b43d9b534acb468a99330cf4
tree4fe77c7eecda30da3f529487d3457c54c024c69a
parent3f685c4dd83d52b6993061e4abaa58b9c7680b6d
build: fix build on older gcc

On RHEL 6.2, gcc 4.4.6 complains:
cc1: warning: command line option "-Wenum-compare" is valid for C++/ObjC++ but not for C
which in turn breaks a -Werror build.

Meanwhile, in Fedora 17, gcc 4.7.0, -Wenum-compare has been enhanced
to also work on C, but at the same time, it is documented that -Wall
now implicitly includes -Wenum-compare.

Therefore, it is sufficient to remove explicit checks for this option,
avoiding the warning from older gcc while still getting the
compile-time safety from newer gcc.

* m4/virt-compile-warnings.m4 (-Wenum-compare): Omit explicit check.
m4/virt-compile-warnings.m4