From 0c890d26a08309388b5aab17fd19eb969cd038a8 Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Sat, 27 Apr 2024 10:37:37 -0400 Subject: [PATCH] chore: Disable -Wswitch-default and -Wunsafe-buffer-usage --- .github/scripts/flags-clang.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/scripts/flags-clang.sh b/.github/scripts/flags-clang.sh index f5ae253fbc3..d0a7729813d 100644 --- a/.github/scripts/flags-clang.sh +++ b/.github/scripts/flags-clang.sh @@ -39,12 +39,17 @@ add_flag -Wno-reserved-id-macro # TODO(iphydf): Clean these up. They are likely not bugs, but still # potential issues and probably confusing. add_flag -Wno-sign-compare +# We don't want to have default cases, we want to explicitly define all cases +add_flag -Wno-switch-default # __attribute__((nonnull)) causes this warning on defensive null checks. add_flag -Wno-tautological-pointer-compare # Our use of mutexes results in a false positive, see 1bbe446. add_flag -Wno-thread-safety-analysis # File transfer code has this. add_flag -Wno-type-limits +# Generates false positives in toxcore similar to +# https://github.com/llvm/llvm-project/issues/64646 +add_flag -Wno-unsafe-buffer-usage # Callbacks often don't use all their parameters. add_flag -Wno-unused-parameter # cimple does this better