Tools: waf: add various conversion warning compiler options

suggested by @patrickelectric
This commit is contained in:
Peter Barker 2019-04-04 08:48:18 +11:00 committed by Andrew Tridgell
parent 02d976f264
commit 1dd5c33374
1 changed files with 15 additions and 1 deletions

View File

@ -182,6 +182,20 @@ class Board:
'-Werror=inconsistent-missing-override',
'-Werror=overloaded-virtual',
# catch conversion issues:
'-Werror=bitfield-enum-conversion',
'-Werror=bool-conversion',
'-Werror=constant-conversion',
'-Werror=enum-conversion',
'-Werror=int-conversion',
'-Werror=literal-conversion',
'-Werror=non-literal-null-conversion',
'-Werror=null-conversion',
'-Werror=objc-literal-conversion',
# '-Werror=shorten-64-to-32', # ARRAY_SIZE() creates this all over the place as the caller typically takes a uint32_t not a size_t
'-Werror=string-conversion',
# '-Werror=sign-conversion', # can't use as we assign into AP_Int8 from uint8_ts
'-Wno-gnu-designator',
'-Wno-mismatched-tags',
'-Wno-gnu-variable-sized-type-not-at-end',
@ -318,7 +332,7 @@ class sitl(Board):
)
env.CXXFLAGS += [
'-Werror=float-equal'
'-Werror=float-equal',
]
if not cfg.env.DEBUG: