From 6ea7bd0196266828a71c689fb9ae70745b83e872 Mon Sep 17 00:00:00 2001 From: "Yury V. Zaytsev" Date: Sun, 3 Nov 2024 09:43:29 +0100 Subject: [PATCH] buildsys: disable buggy or unhelpful warnings Signed-off-by: Yury V. Zaytsev --- .github/workflows/ci.yml | 6 +----- m4.include/mc-cflags.m4 | 9 ++++++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0f5bc15e..5255d321f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,9 +17,6 @@ jobs: call-build-macos: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository uses: ./.github/workflows/ci-macos.yml - with: - # https://github.com/llvm/llvm-project/issues/20574 - CFLAGS: -Wno-assign-enum call-build-solaris: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository @@ -29,6 +26,5 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository uses: ./.github/workflows/ci-freebsd.yml with: - # https://github.com/llvm/llvm-project/issues/20574 # https://github.com/GNUAspell/aspell/pull/651 - CFLAGS: -Wno-assign-enum -Wno-strict-prototypes + CFLAGS: -Wno-strict-prototypes diff --git a/m4.include/mc-cflags.m4 b/m4.include/mc-cflags.m4 index cbe8f0a2f..66753ddb7 100644 --- a/m4.include/mc-cflags.m4 +++ b/m4.include/mc-cflags.m4 @@ -37,7 +37,6 @@ AC_DEFUN([mc_CHECK_CFLAGS],[ AX_APPEND_COMPILE_FLAGS([-Wint-conversion], [mc_configured_cflags], [$EXTRA_OPTION]) dnl Sorted -W options not included in -Wall and -Wextra - AX_APPEND_COMPILE_FLAGS([-Wassign-enum], [mc_configured_cflags], [$EXTRA_OPTION]) AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast], [mc_configured_cflags], [$EXTRA_OPTION]) AX_APPEND_COMPILE_FLAGS([-Wconditional-uninitialized], [mc_configured_cflags], [$EXTRA_OPTION]) AX_APPEND_COMPILE_FLAGS([-Wfloat-conversion], [mc_configured_cflags], [$EXTRA_OPTION]) @@ -60,5 +59,13 @@ AC_DEFUN([mc_CHECK_CFLAGS],[ AX_APPEND_COMPILE_FLAGS([-Wunused-result], [mc_configured_cflags], [$EXTRA_OPTION]) AX_APPEND_COMPILE_FLAGS([-Wwrite-strings], [mc_configured_cflags], [$EXTRA_OPTION]) + dnl Explicitly disabled warnings + + dnl This flags casts like (GCompareDataFunc) with missing parameter + AX_APPEND_COMPILE_FLAGS([-Wno-cast-function-type], [mc_configured_cflags], [$EXTRA_OPTION]) + + dnl https://github.com/llvm/llvm-project/issues/20574 + AX_APPEND_COMPILE_FLAGS([-Wno-assign-enum], [mc_configured_cflags], [$EXTRA_OPTION]) + AC_LANG_POP() ])