GNOME Bugzilla – Bug 739246
[review] fix build failures from clang [th/bgo739246_clang]
Last modified: 2014-10-29 12:36:59 UTC
Please review With these changes I am able to build nm-applet using clang. To test it, define the following variables: CC='ccache clang' CXX='ccache clang++' export CCACHE_CPP2=yes
Branch: th/bgo739246_clang
just nitpicks: > build/clang: fix detection of valid warning compiler flags So I diffed this against NM's version of the macro to make sure it was the same, and noticed that we pass more -W flags in NM now than in nma. We should look at synching them up. > build: rename nm-gvaluearray-compat.h to nm-glib-compat.h Note that all of the deprecated API usage will be going away with the libnm port, so this will probably end up getting deleted then.
pushed two more commits: build: update m4/compiler_warnings.m4 gconf-helpers: remove commented-out code (#if UNUSED) The change to gconf-helpers is necessary, because it would trigger a warning: make[5]: Entering directory `./network-manager-applet/src/gconf-helpers' CC libgconf_helpers_la-gconf-helpers.lo In file included from gconf-helpers.c:54: ./gconf-helpers.h:95:5: error: 'UNUSED' is not defined, evaluates to 0 [-Werror,-Wundef] #if UNUSED ^
> keep also -Wstrict-prototypes (which NM does not enable). huh... that's weird. I wonder why... Anyway, looks good
Hmm, did this branch disappear?
nm-applet, not NM
I think overall the changes are uncontroversial. merged to master as: https://git.gnome.org/browse/network-manager-applet/commit/?id=b75fc2c67503a5f76036f96033f29f74ab5e62a9
(In reply to comment #4) > > keep also -Wstrict-prototypes (which NM does not enable). > > huh... that's weird. I wonder why... http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=db9b1df0e47996ff8aaea468a11e1e97f64ee126 Maybe we should reenable -Wstrict-prototypes for NM again? It builds without errors for me (I have WiMAX sdk installed).
(In reply to comment #8) > (In reply to comment #4) > > > keep also -Wstrict-prototypes (which NM does not enable). > > > > huh... that's weird. I wonder why... > > http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=db9b1df0e47996ff8aaea468a11e1e97f64ee126 > > Maybe we should reenable -Wstrict-prototypes for NM again? It builds without > errors for me (I have WiMAX sdk installed). I was wrong, WiMax doesn't build with -Wstrict-prototypes. I only tested with clang, which doesn't warn. gcc does.