[Git][NTPsec/ntpsec][master] 4 commits: waf: Use -Wmultichar by default if available

Gary E. Miller gitlab at mg.gitlab.com
Fri Apr 14 04:31:17 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
e3b9f3bf by Gary E. Miller at 2017-04-13T21:19:56-07:00
waf: Use -Wmultichar by default if available

- - - - -
5be68d84 by Gary E. Miller at 2017-04-13T21:23:36-07:00
waf: Use -Winvalid-pch by default if available.

- - - - -
db8c9456 by Gary E. Miller at 2017-04-13T21:27:01-07:00
waf: Use -Wimplicit-function-declaration by default if available.

- - - - -
cf07e3e5 by Gary E. Miller at 2017-04-13T21:30:47-07:00
waf: Enable -Wdisabled-optimization by default if available

- - - - -


1 changed file:

- wafhelpers/configure.py


Changes:

=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -258,11 +258,16 @@ def cmd_configure(ctx, config):
         ('gnu99', '-std=gnu99'),
         # this quiets most of macOS warnings on -fpie
         ('unused', '-Qunused-arguments'),
+        ('w_disabled_optimizaation', "-Wdisabled-optimization"),
         ('w_format', '-Wformat'),
         # fails on OpenBSD 6
         ('w_format_signedness', '-Wformat-signedness'),
+        ('w_implicit_function_declaration', "-Wimplicit-function-declaration"),
         ('w_init_self', '-Winit-self'),
         ('w_inline', '-Winline'),
+        ('w_invalid_pch', '-Winvalid-pch'),
+        ('w_multichar', '-Wmultichar'),
+        ('w_pointer_arith', '-Wpointer-arith'),
         ('w_shadow', '-Wshadow'),
         ('w_write_strings', '-Wwrite-strings'),
         ]
@@ -300,15 +305,11 @@ def cmd_configure(ctx, config):
             "-Wfloat-equal",          # Not Ready For Prime Time
             "-Wformat-nonliteral",    # needs -Wformat
             "-Wformat-security",      # needs -Wformat
-            "-Wimplicit-function-declaration",
-            "-Winvalid-pch",
             "-Wmissing-declarations", # Not Ready For Prime Time
             "-Wmissing-format-attribute",
-            "-Wmultichar",
             # "-Wnested-externs",     # incompatible w/ Unity...
             "-Wpacked",
             # "-Wpadded",             # duck... over 3k warnings
-            "-Wpointer-arith",
             # "-Wredundant-decls",    # incompatible w/ Unity
             "-Wswitch-default",       # warns on Bison bug
         ] + ctx.env.CFLAGS
@@ -390,6 +391,14 @@ int main(int argc, char **argv) {
         ctx.env.CFLAGS = ['-Winline'] + ctx.env.CFLAGS
     if ctx.env.HAS_w_write_strings:
         ctx.env.CFLAGS = ['-Wwrite-strings'] + ctx.env.CFLAGS
+    if ctx.env.HAS_w_pointer_arith:
+        ctx.env.CFLAGS = ['-Wpointer-arith'] + ctx.env.CFLAGS
+    if ctx.env.HAS_w_invalid_pch:
+        ctx.env.CFLAGS = ['-Winvalid-pch'] + ctx.env.CFLAGS
+    if ctx.env.HAS_w_implicit_function_declaration:
+        ctx.env.CFLAGS = ['-Wimplicit-function-declaration'] + ctx.env.CFLAGS
+    if ctx.env.HAS_w_disabled_optimization:
+        ctx.env.CFLAGS = ['-Wdisabled-optimization'] + ctx.env.CFLAGS
     if ctx.env.HAS_w_shadow:
         ctx.env.CFLAGS = ['-Wshadow'] + ctx.env.CFLAGS
     if ctx.env.HAS_w_sign_conversion:



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/3b798346c07c59bb2e2c3fe58515e1cfcf89e158...cf07e3e56dc5e0bd97d6d4f6b538dd472d83eb69

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/3b798346c07c59bb2e2c3fe58515e1cfcf89e158...cf07e3e56dc5e0bd97d6d4f6b538dd472d83eb69
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170414/82113c6d/attachment.html>


More information about the vc mailing list