Skip to content

Commit 3485b5f

Browse files
committed
chore: Disable -Wswitch-default and -Wunsafe-buffer-usage
1 parent 719041e commit 3485b5f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/scripts/flags-clang.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,17 @@ add_flag -Wno-reserved-id-macro
3939
# TODO(iphydf): Clean these up. They are likely not bugs, but still
4040
# potential issues and probably confusing.
4141
add_flag -Wno-sign-compare
42+
# We don't want to have default cases, we want to explicitly define all cases
43+
add_flag -Wno-switch-default
4244
# __attribute__((nonnull)) causes this warning on defensive null checks.
4345
add_flag -Wno-tautological-pointer-compare
4446
# Our use of mutexes results in a false positive, see 1bbe446.
4547
add_flag -Wno-thread-safety-analysis
4648
# File transfer code has this.
4749
add_flag -Wno-type-limits
50+
# Generates false positives in toxcore similar to
51+
# https://github.com/llvm/llvm-project/issues/64646
52+
add_flag -Wno-unsafe-buffer-usage
4853
# Callbacks often don't use all their parameters.
4954
add_flag -Wno-unused-parameter
5055
# cimple does this better

other/analysis/run-clang

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ run() {
2828
-Wno-old-style-cast \
2929
-Wno-padded \
3030
-Wno-sign-compare \
31+
-Wno-switch-default \
3132
-Wno-tautological-pointer-compare \
3233
-Wno-unreachable-code-return \
34+
-Wno-unsafe-buffer-usage \
3335
-Wno-unused-parameter \
3436
-Wno-used-but-marked-unused \
3537
-Wno-source-uses-openmp

0 commit comments

Comments
 (0)