From 30c744cf07128afe786b5836ea19b2973cac8c1a Mon Sep 17 00:00:00 2001 From: Matt Whitlock Date: Tue, 6 Jun 2023 00:05:09 -0400 Subject: [PATCH] swig_python: add -Wno-unused-parameter to SWIG_WARN_CFLAGS SWIG generates code with unused parameters that trigger hundreds of warnings. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 55ba6e974..91356c010 100644 --- a/configure.ac +++ b/configure.ac @@ -190,6 +190,7 @@ AC_SUBST([NOBUILTIN_CFLAGS]) # SWIG versions vary in generated code quality; skip warnings SWIG_WARN_CFLAGS="-fno-strict-aliasing" +AX_CHECK_COMPILE_FLAG([-Wno-unused-parameter], [SWIG_WARN_CFLAGS="$SWIG_WARN_CFLAGS -Wno-unused-parameter"]) AX_CHECK_COMPILE_FLAG([-Wno-shadow], [SWIG_WARN_CFLAGS="$SWIG_WARN_CFLAGS -Wno-shadow"]) AX_CHECK_COMPILE_FLAG([-Wno-missing-field-initializers], [SWIG_WARN_CFLAGS="$SWIG_WARN_CFLAGS -Wno-missing-field-initializers"]) if echo | "$CC" -dM -E - | grep __clang__ >/dev/null; then