mirror of
https://github.com/curl/curl.git
synced 2026-05-28 11:26:20 +03:00
GHA: enable -Wunused-macros in clang-tidy jobs
Also fix fallouts found. Windows clang-tidy CI job is a little pickier than I'd prefer due to the `_CURL_TESTS_CONCAT=ON` option used there, and all macros considered local, thus checked by the compiler. Upside: it revealed macro usage dynamics in tests. If too annoying, `first.h` may be opted-out from the concat logic. Some macros may also be deleted instead of `#if 0`-ing. Follow-up toe0e56e9ae4#21550 Follow-up to5fa5cb3825#20593 Closes #21554
This commit is contained in:
parent
a15483c4ca
commit
47f411c6d8
16 changed files with 66 additions and 33 deletions
4
.github/workflows/macos.yml
vendored
4
.github/workflows/macos.yml
vendored
|
|
@ -300,6 +300,7 @@ jobs:
|
|||
compiler: clang
|
||||
install: llvm gnutls nettle libressl krb5 mbedtls gsasl rustls-ffi libssh fish
|
||||
install_steps: skiprun
|
||||
CFLAGS: -Wunused-macros
|
||||
chkprefill: _chkprefill
|
||||
generate: >-
|
||||
-DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/libressl -DCURL_DEFAULT_SSL_BACKEND=openssl
|
||||
|
|
@ -316,6 +317,7 @@ jobs:
|
|||
compiler: clang
|
||||
install: llvm libnghttp3 libngtcp2 openldap krb5
|
||||
install_steps: skipall
|
||||
CFLAGS: -Wunused-macros
|
||||
generate: >-
|
||||
-DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DUSE_NGTCP2=ON
|
||||
-DLDAP_INCLUDE_DIR=/opt/homebrew/opt/openldap/include
|
||||
|
|
@ -445,6 +447,7 @@ jobs:
|
|||
|
||||
- name: 'configure'
|
||||
env:
|
||||
CFLAGS: '${{ matrix.build.CFLAGS }}'
|
||||
MATRIX_CHKPREFILL: '${{ matrix.build.chkprefill }}'
|
||||
MATRIX_CONFIGURE: '${{ matrix.build.configure }}'
|
||||
MATRIX_GENERATE: '${{ matrix.build.generate }}'
|
||||
|
|
@ -479,7 +482,6 @@ jobs:
|
|||
false
|
||||
fi
|
||||
else
|
||||
export CFLAGS
|
||||
if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then
|
||||
options+=" --target=$(uname -m)-apple-darwin"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue