The previous commit
1eadeaed0a6ca3a58eb9fd176a7ae5bcc28f64ef had a couple of
errors, the unpicky flags were being set on all builds (not just old
compiler builds) due to confusing variable names, and Ubuntu 16.04
would not build (for fuzzing) because it thought some variables
were maybe-uninitialized.
This keeps stricter warnings->errors on modern compilers while
allowing the full build, even in the near future when a modern
Heimdal is imported.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jun 16 14:43:17 UTC 2021 on sn-devel-184
def HEIMDAL_CFLAGS(use_hostcc=False, extra_cflags=[]):
cflags_unpicky=[]
- if not bld.env.enable_heimdal_warnings:
+ if bld.env.allow_heimdal_warnings:
cflags_unpicky += bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS
+ cflags_unpicky += bld.env.HEIMDAL_UNPICKY_WNO_MAYBE_UNINITIALIZED_CFLAGS
# old compilers on centos7 or ubuntu1604 need this
allow_warnings = bld.env.allow_heimdal_warnings
conf.ADD_NAMED_CFLAGS('HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS',
'-Wno-strict-overflow',
testflags=True)
+ conf.ADD_NAMED_CFLAGS('HEIMDAL_UNPICKY_WNO_MAYBE_UNINITIALIZED_CFLAGS',
+ '-Wno-error=maybe-uninitialized',
+ testflags=True)
Logs.info("Allowing warnings in Heimdal code as this compiler does "
"not support enough -Wno-error flags (bad)")