diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2026-03-02 15:31:35 +1100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-03-04 17:53:33 +0100 |
| commit | 685864dea8c35a6abf3ab61de786167e73b18816 (patch) | |
| tree | 30399df2a4635be8ab0ac4adcd5ed5ebbcbfa8e7 | |
| parent | 9ee780567310f2486e1510db502a96e5b1a81a1c (diff) | |
| download | passt-685864dea8c35a6abf3ab61de786167e73b18816.tar passt-685864dea8c35a6abf3ab61de786167e73b18816.tar.gz passt-685864dea8c35a6abf3ab61de786167e73b18816.tar.bz2 passt-685864dea8c35a6abf3ab61de786167e73b18816.tar.lz passt-685864dea8c35a6abf3ab61de786167e73b18816.tar.xz passt-685864dea8c35a6abf3ab61de786167e73b18816.tar.zst passt-685864dea8c35a6abf3ab61de786167e73b18816.zip | |
clang-tidy: Don't insist on #ifdef over #if defined()
Commit 036fb8770 ("checksum: add VSX fast path for POWER8/POWER9") changed
an #ifdef to #if defined, in order to match a newly introduced #if which
needs to check two different symbols. This causes clang-tidy to complain
that the directive could be written more concisely.
In this case consistency with the other #if branch seems more important,
and in general insisting on #ifdef over #if seems unhelpfully pedantic.
Suppress that warning globally.
Reported-by: Laurent Vivier <lvivier@redhat.com>
Fixes: 036fb8770cc2 ("checksum: add VSX fast path for POWER8/POWER9")
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
| -rw-r--r-- | .clang-tidy | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.clang-tidy b/.clang-tidy index 9d346ec..773121f 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -81,6 +81,11 @@ Checks: # precedence over addition in modern mathematical notation. Adding # parentheses to reinforce that certainly won't improve readability. - "-readability-math-missing-parentheses" + + # #if defined(FOO) is fine, and can be more consistent with other + # #if directives. Don't insist on #ifdef instead. + - "-readability-use-concise-preprocessor-directives" + WarningsAsErrors: "*" HeaderFileExtensions: - h |
