After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739246 - [review] fix build failures from clang [th/bgo739246_clang]
[review] fix build failures from clang [th/bgo739246_clang]
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nm-applet
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-10-27 14:49 UTC by Thomas Haller
Modified: 2014-10-29 12:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2014-10-27 14:49:32 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
Comment 1 Thomas Haller 2014-10-27 14:50:28 UTC
Branch: th/bgo739246_clang
Comment 2 Dan Winship 2014-10-27 17:55:41 UTC
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.
Comment 3 Thomas Haller 2014-10-27 19:02:40 UTC
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
    ^
Comment 4 Dan Winship 2014-10-28 12:14:03 UTC
> keep also -Wstrict-prototypes (which NM does not enable).

huh... that's weird. I wonder why...

Anyway, looks good
Comment 5 Dan Williams 2014-10-28 19:03:49 UTC
Hmm, did this branch disappear?
Comment 6 Dan Winship 2014-10-28 20:36:28 UTC
nm-applet, not NM
Comment 7 Thomas Haller 2014-10-29 09:12:02 UTC
I think overall the changes are uncontroversial.

merged to master as:

https://git.gnome.org/browse/network-manager-applet/commit/?id=b75fc2c67503a5f76036f96033f29f74ab5e62a9
Comment 8 Thomas Haller 2014-10-29 09:14:00 UTC
(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).
Comment 9 Thomas Haller 2014-10-29 12:36:59 UTC
(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.