waf: add -Werror=use-after-free to CFLAGS and CXXFLAGS

This commit is contained in:
Peter Barker 2024-09-18 16:51:47 +10:00 committed by Peter Barker
parent c6491d6b45
commit 35a8a04787
1 changed files with 7 additions and 0 deletions

View File

@ -439,6 +439,13 @@ class Board:
env.CXXFLAGS += [
'-Werror=sizeof-pointer-div',
]
if self.cc_version_gte(cfg, 13, 2):
env.CXXFLAGS += [
'-Werror=use-after-free',
]
env.CFLAGS += [
'-Werror=use-after-free',
]
if cfg.options.Werror:
errors = ['-Werror',