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 707475 - Allow custom warnings in GNOME_COMPILE_WARNINGS
Allow custom warnings in GNOME_COMPILE_WARNINGS
Status: RESOLVED FIXED
Product: gnome-common
Classification: Core
Component: general
git master
Other All
: Normal enhancement
: ---
Assigned To: Gnome Common Maintainer(s)
Gnome Common Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-09-04 15:02 UTC by Philip Withnall
Modified: 2013-09-05 05:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
compiler-flags: Add an optional second argument for custom warnings (2.33 KB, patch)
2013-09-04 15:03 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2013-09-04 15:02:45 UTC
Patch coming up which adds an optional second parameter to GNOME_COMPILE_WARNINGS which allows projects to specify additional warning/error flags which they want to use (dependent on --enable-compile-warnings).

This will allow projects to enable stricter compilation warnings on a per-project basis, but still allow them to be turned off by users (with --enable-compile-warnings=no) if they’re a problem for some reason.

This should fix the situation where the maintainer compiles a module with some set of locally-enabled strict warning flags, then someone else commits a patch which was developed only against the standard warning flags, and introduces a warning which breaks the build for the maintainer (and nobody else).
Comment 1 Philip Withnall 2013-09-04 15:03:56 UTC
Created attachment 254099 [details] [review]
compiler-flags: Add an optional second argument for custom warnings

This allows module authors to choose to enforce stricter warnings on
a per-module basis, to avoid the situation where an outside
contributor submits a patch which introduces warnings the maintainer
has enabled locally.

Closes:
Comment 2 David King 2013-09-04 15:24:26 UTC
Review of attachment 254099 [details] [review]:

The changes look fine to me.

Should a serial be added to gnome-compiler-flags.m4, or is the one in gnome-common.m4 sufficient?
Comment 3 Philip Withnall 2013-09-05 05:22:30 UTC
(In reply to comment #2)
> Should a serial be added to gnome-compiler-flags.m4, or is the one in
> gnome-common.m4 sufficient?

Looking at the manual, serials are per-file, so I’ve added one to gnome-compiler-flags.m4. I didn’t know about them before; thanks for pointing them out!

commit f8f5bc923239d02a5e2f5f8ee8d357eafb2bfc12
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Wed Sep 4 23:11:14 2013 -0600

    compiler-flags: Add a #serial line
    
    As suggested in bug #707475, this will ensure the latest version of
    gnome-compiler-flags.m4 is used if conflicting versions are found in
    different directories in the autoconf search path.
    
    Helps: https://bugzilla.gnome.org/show_bug.cgi?id=707475

 macros2/gnome-compiler-flags.m4 | 5 +++++
 1 file changed, 5 insertions(+)

commit c834b24651e1b0f510ede8610bde0be1e940de14
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Wed Sep 4 00:48:19 2013 -0600

    compiler-flags: Add an optional second argument for custom warnings
    
    This allows module authors to choose to enforce stricter warnings on
    a per-module basis, to avoid the situation where an outside
    contributor submits a patch which introduces warnings the maintainer
    has enabled locally.
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=707475

 macros2/gnome-compiler-flags.m4 | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)