mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -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-redundant-decls',
|
||||||
'-Wno-unknown-pragmas',
|
'-Wno-unknown-pragmas',
|
||||||
'-Wno-trigraphs',
|
'-Wno-trigraphs',
|
||||||
'-Wno-format-contains-nul',
|
|
||||||
'-Werror=shadow',
|
'-Werror=shadow',
|
||||||
'-Werror=return-type',
|
'-Werror=return-type',
|
||||||
'-Werror=unused-result',
|
'-Werror=unused-result',
|
||||||
@ -142,6 +141,10 @@ class Board:
|
|||||||
'-Wno-mismatched-tags',
|
'-Wno-mismatched-tags',
|
||||||
'-Wno-gnu-variable-sized-type-not-at-end',
|
'-Wno-gnu-variable-sized-type-not-at-end',
|
||||||
]
|
]
|
||||||
|
else:
|
||||||
|
env.CFLAGS += [
|
||||||
|
'-Wno-format-contains-nul',
|
||||||
|
]
|
||||||
|
|
||||||
if cfg.env.DEBUG:
|
if cfg.env.DEBUG:
|
||||||
env.CFLAGS += [
|
env.CFLAGS += [
|
||||||
@ -175,7 +178,6 @@ class Board:
|
|||||||
'-Wno-redundant-decls',
|
'-Wno-redundant-decls',
|
||||||
'-Wno-unknown-pragmas',
|
'-Wno-unknown-pragmas',
|
||||||
'-Wno-expansion-to-defined',
|
'-Wno-expansion-to-defined',
|
||||||
'-Wno-format-contains-nul',
|
|
||||||
'-Werror=attributes',
|
'-Werror=attributes',
|
||||||
'-Werror=format-security',
|
'-Werror=format-security',
|
||||||
'-Werror=format-extra-args',
|
'-Werror=format-extra-args',
|
||||||
@ -227,6 +229,7 @@ class Board:
|
|||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
env.CXXFLAGS += [
|
env.CXXFLAGS += [
|
||||||
|
'-Wno-format-contains-nul',
|
||||||
'-Werror=unused-but-set-variable'
|
'-Werror=unused-but-set-variable'
|
||||||
]
|
]
|
||||||
(major, minor, patchlevel) = cfg.env.CC_VERSION
|
(major, minor, patchlevel) = cfg.env.CC_VERSION
|
||||||
|
Loading…
Reference in New Issue
Block a user