From 8cd91721a94c02f42edbeefc184789313610ccb1 Mon Sep 17 00:00:00 2001 From: Gary Lockyer Date: Mon, 19 May 2025 13:56:10 +1200 Subject: [PATCH] build: Allow developer builds with clang 20 Disable clang warnings to allow samba to be compiled with clang 20. Subsequent commits will fix the offending code and re-enable the warnings. Signed-off-by: Gary Lockyer Reviewed-by: Douglas Bagnall Reviewed-by: Anoop C S --- buildtools/wafsamba/samba_autoconf.py | 7 +++++++ third_party/heimdal_build/wscript_configure | 2 ++ 2 files changed, 9 insertions(+) diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index d4e27e156e6..bcf909e1a93 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -840,6 +840,13 @@ int main(void) { 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) conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=cast-align', testflags=True) + conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=unused-but-set-variable', testflags=True) + conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=unused-function', testflags=True) + conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=format-truncation', testflags=True) + conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=sometimes-uninitialized', testflags=True) + conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=cast-qual', testflags=True) + conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=format-nonliteral', testflags=True) + conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=shadow', testflags=True) if Options.options.fatal_errors: conf.ADD_CFLAGS('-Wfatal-errors', testflags=True) diff --git a/third_party/heimdal_build/wscript_configure b/third_party/heimdal_build/wscript_configure index db3995b9fa2..89947fbf2d6 100644 --- a/third_party/heimdal_build/wscript_configure +++ b/third_party/heimdal_build/wscript_configure @@ -79,6 +79,8 @@ heimdal_no_error_flags = ['-Wno-error=cast-qual', '-Wno-error=discarded-qualifiers', '-Wno-error=old-style-definition', '-Wno-error=unused-result', + '-Wno-error=implicit-fallthrough', + '-Wno-error=strict-prototypes', '-Wno-error=unused-variable' ] for flag in heimdal_no_error_flags: -- 2.47.2