diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-05-14 00:57:58 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-05-13 23:02:07 +0200 |
commit | 80f7ff29964f16a9eef107c6c1d0b2c0554deab0 (patch) | |
tree | 9f295a898cdd0e6cae1a1f7605518507d98001dc | |
parent | 29bd08ff0fe09d47155eda3c3191513c3b4f381b (diff) | |
download | passt-80f7ff29964f16a9eef107c6c1d0b2c0554deab0.tar passt-80f7ff29964f16a9eef107c6c1d0b2c0554deab0.tar.gz passt-80f7ff29964f16a9eef107c6c1d0b2c0554deab0.tar.bz2 passt-80f7ff29964f16a9eef107c6c1d0b2c0554deab0.tar.lz passt-80f7ff29964f16a9eef107c6c1d0b2c0554deab0.tar.xz passt-80f7ff29964f16a9eef107c6c1d0b2c0554deab0.tar.zst passt-80f7ff29964f16a9eef107c6c1d0b2c0554deab0.zip |
clang-tidy: Suppress macro to enum conversion warnings
clang-tidy 18.1.1 in Fedora 40 complains about every #define of an integral
value, suggesting it be converted to an enum. Although that's certainly
possible, it's of dubious value and results in some awkward arrangements on
out codebase. Suppress it globally.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -257,6 +257,12 @@ docs: README.md # we use. That sounds nice, but means it will often want a OS # specific header instead of a mostly standard one, such as # <linux/limits.h> instead of <limits.h>. +# +# - cppcoreguidelines-macro-to-enum +# Want to replace all #defines of integers with enums. Kind of +# makes sense when those defines form an enum-like set, but +# weird for cases like standalone constants, and causes other +# awkwardness for a bunch of cases we use clang-tidy: $(SRCS) $(HEADERS) clang-tidy -checks=*,-modernize-*,\ @@ -283,7 +289,8 @@ clang-tidy: $(SRCS) $(HEADERS) -altera-struct-pack-align,\ -concurrency-mt-unsafe,\ -readability-identifier-length,\ - -misc-include-cleaner \ + -misc-include-cleaner,\ + -cppcoreguidelines-macro-to-enum \ -config='{CheckOptions: [{key: bugprone-suspicious-string-compare.WarnOnImplicitComparison, value: "false"}]}' \ --warnings-as-errors=* $(SRCS) -- $(filter-out -pie,$(FLAGS) $(CFLAGS) $(CPPFLAGS)) -DCLANG_TIDY_58992 |