Mailing List Archive

[master] 8a8d6f5ee build: improve wflags.py for gcc
commit 8a8d6f5ee837593674d8da73e77a0bcd060417dd
Author: Nils Goroll <nils.goroll@uplex.de>
Date: Thu Jun 10 15:49:07 2021 +0200

build: improve wflags.py for gcc

cc cannot -Wformat-y2k

cc1: warning: -Wformat-y2k ignored without -Wformat [-Wformat-y2k]

cc cannot -Wformat-zero-length

cc1: warning: -Wformat-zero-length ignored without -Wformat [-Wformat-zero-length]

diff --git a/wflags.py b/wflags.py
index 1778fd41b..7cfffea57 100644
--- a/wflags.py
+++ b/wflags.py
@@ -48,8 +48,8 @@ DESIRABLE_WFLAGS = [.
"-Wchar-subscripts",
"-Wempty-body",
"-Wextra",
- "-Wformat-y2k",
- "-Wformat-zero-length",
+ "-Wformat -Wformat-y2k",
+ "-Wformat -Wformat-zero-length",
"-Wmissing-field-initializers",
"-Wmissing-prototypes",
"-Wnested-externs",
@@ -85,7 +85,7 @@ UNDESIRABLE_WFLAGS = [
def cc(compiler, opt, obj, src):
a = [compiler, "-c"]
if opt is not None:
- a.append(opt)
+ a += opt.split()
a += ["-o", obj, src]

try:
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit