aboutgitcodebugslistschat
path: root/Makefile
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-01-30 02:59:12 +0100
committerStefano Brivio <sbrivio@redhat.com>2022-01-30 02:59:12 +0100
commit292c1855531df7baab095ef608cda7240984340b (patch)
treedd5bc98e5b9beaf7721c87542fe37485dd712f37 /Makefile
parent20d271b22604fc11a0b75fee52b89a6654c67db6 (diff)
downloadpasst-292c1855531df7baab095ef608cda7240984340b.tar
passt-292c1855531df7baab095ef608cda7240984340b.tar.gz
passt-292c1855531df7baab095ef608cda7240984340b.tar.bz2
passt-292c1855531df7baab095ef608cda7240984340b.tar.lz
passt-292c1855531df7baab095ef608cda7240984340b.tar.xz
passt-292c1855531df7baab095ef608cda7240984340b.tar.zst
passt-292c1855531df7baab095ef608cda7240984340b.zip
passt: Address new clang-tidy warnings from LLVM 13.0.1
clang-tidy from LLVM 13.0.1 reports some new warnings from these checkers: - altera-unroll-loops, altera-id-dependent-backward-branch: ignore for the moment being, add a TODO item - bugprone-easily-swappable-parameters: ignore, nothing to do about those - readability-function-cognitive-complexity: ignore for the moment being, add a TODO item - altera-struct-pack-align: ignore, alignment is forced in protocol headers - concurrency-mt-unsafe: ignore for the moment being, add a TODO item Fix bugprone-implicit-widening-of-multiplication-result warnings, though, that's doable and they seem to make sense. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 23 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 443c39d..5085578 100644
--- a/Makefile
+++ b/Makefile
@@ -167,6 +167,23 @@ pkgs:
#
# - bugprone-suspicious-string-compare
# Return value of memcmp(), not really suspicious
+#
+# - altera-unroll-loops
+# - altera-id-dependent-backward-branch
+# TODO: check paths where it might make sense to improve performance
+#
+# - bugprone-easily-swappable-parameters
+# Not much can be done about them other than being careful
+#
+# - readability-function-cognitive-complexity
+# TODO: split reported functions
+#
+# - altera-struct-pack-align
+# "Poor" alignment needed for structs reflecting message formats/headers
+#
+# - concurrency-mt-unsafe
+# TODO: check again if multithreading is implemented
+
clang-tidy: $(wildcard *.c) $(wildcard *.h)
clang-tidy -checks=*,-modernize-*,\
-clang-analyzer-valist.Uninitialized,\
@@ -187,7 +204,12 @@ clang-tidy: $(wildcard *.c) $(wildcard *.h)
-bugprone-narrowing-conversions,\
-cppcoreguidelines-narrowing-conversions,\
-cppcoreguidelines-avoid-non-const-global-variables,\
- -bugprone-suspicious-string-compare \
+ -bugprone-suspicious-string-compare,\
+ -altera-unroll-loops,-altera-id-dependent-backward-branch,\
+ -bugprone-easily-swappable-parameters,\
+ -readability-function-cognitive-complexity,\
+ -altera-struct-pack-align,\
+ -concurrency-mt-unsafe \
--warnings-as-errors=* $(wildcard *.c) -- $(CFLAGS)
ifeq ($(shell $(CC) -v 2>&1 | grep -c "gcc version"),1)