Tools: only enable -Wno-format-contains-nul if not clang

This commit is contained in:
Andy Piper 2019-11-09 13:08:00 +00:00 committed by Peter Barker
parent a955897b89
commit abb7041c22

View File

@ -115,7 +115,6 @@ class Board:
'-Wno-redundant-decls',
'-Wno-unknown-pragmas',
'-Wno-trigraphs',
'-Wno-format-contains-nul',
'-Werror=shadow',
'-Werror=return-type',
'-Werror=unused-result',
@ -142,6 +141,10 @@ class Board:
'-Wno-mismatched-tags',
'-Wno-gnu-variable-sized-type-not-at-end',
]
else:
env.CFLAGS += [
'-Wno-format-contains-nul',
]
if cfg.env.DEBUG:
env.CFLAGS += [
@ -175,7 +178,6 @@ class Board:
'-Wno-redundant-decls',
'-Wno-unknown-pragmas',
'-Wno-expansion-to-defined',
'-Wno-format-contains-nul',
'-Werror=attributes',
'-Werror=format-security',
'-Werror=format-extra-args',
@ -227,6 +229,7 @@ class Board:
]
else:
env.CXXFLAGS += [
'-Wno-format-contains-nul',
'-Werror=unused-but-set-variable'
]
(major, minor, patchlevel) = cfg.env.CC_VERSION