1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

third_party: Build pypamtest with -Wno-error=declaration-after-statement

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andreas Schneider 2023-11-09 17:16:17 +01:00 committed by Andreas Schneider
parent 9621a3d7a6
commit c290052fd2
2 changed files with 8 additions and 0 deletions

View File

@ -820,6 +820,9 @@ int main(void) {
if CHECK_CFLAGS(conf, ["-Wno-error=stringop-overflow"]):
conf.define('HAVE_WNO_ERROR_STRINGOP_OVERFLOW', 1)
if CHECK_CFLAGS(conf, ["-Wno-error=declaration-after-statement"]):
conf.define('HAVE_WNO_ERROR_DECLARATION_AFTER_STATEMENT', 1)
if not Options.options.disable_warnings_as_errors:
conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Werror -Wno-error=deprecated-declarations', testflags=True)
conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=tautological-compare', testflags=True)

View File

@ -105,8 +105,13 @@ def build(bld):
install=False,
realname='pam_set_items.so')
pypamtest_cflags = ''
if bld.CONFIG_SET('HAVE_WNO_ERROR_DECLARATION_AFTER_STATEMENT'):
pypamtest_cflags = '-Wno-error=declaration-after-statement'
# Can be used to write pam tests in python
bld.SAMBA_PYTHON('pypamtest',
source='python/pypamtest.c',
cflags_end=pypamtest_cflags,
deps='libpamtest',
install=False)