mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Tools: only enable -Wno-format-contains-nul if not clang
This commit is contained in:
parent
a955897b89
commit
abb7041c22
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user