Merge commit '8eb4892b4976e82e020d0e30dcf8f0705b76bb4e'

This commit is contained in:
2024-01-12 21:30:48 +01:00
126 changed files with 1556 additions and 2484 deletions

View File

@ -31,8 +31,8 @@ out = (subprocess.run(
errors = 0
for line in out.split("\n"):
# other/fun can do what it wants.
if "/fun/" in line:
# other/fun and mallocfail can do what they want.
if "/fun/" in line or "/mallocfail/" in line:
continue
filename, include = line.split(":", 1)
# We only check headers.

View File

@ -15,7 +15,7 @@ CPPFLAGS+=("-Itoxav")
CPPFLAGS+=("-Itoxencryptsave")
CPPFLAGS+=("-Ithird_party/cmp")
LDFLAGS=("-lopus" "-lsodium" "-lvpx" "-lpthread" "-lconfig" "-lgtest")
LDFLAGS=("-lopus" "-lsodium" "-lvpx" "-lpthread" "-lconfig" "-lgmock" "-lgtest")
LDFLAGS+=("-fuse-ld=gold")
LDFLAGS+=("-Wl,--detect-odr-violations")
LDFLAGS+=("-Wl,--warn-common")

View File

@ -10,7 +10,7 @@ run() {
"${CPPFLAGS[@]}" \
"${LDFLAGS[@]}" \
"$@" \
-std=c++11 \
-std=c++17 \
-Werror \
-Weverything \
-Wno-alloca \

View File

@ -9,7 +9,7 @@ run() {
clang++ --analyze amalgamation.cc \
"${CPPFLAGS[@]}" \
"$@" \
-std=c++11
-std=c++20
}
. other/analysis/variants.sh

View File

@ -34,6 +34,8 @@ CPPCHECK_CXX+=("--suppress=AssignmentAddressToInteger")
CPPCHECK_CXX+=("--suppress=cstyleCast")
# Used in Messenger.c for a static_assert(...)
CPPCHECK_CXX+=("--suppress=sizeofFunctionCall")
# This is outdated. Range-for is a good choice.
CPPCHECK_CXX+=("--suppress=useStlAlgorithm")
run() {
echo "Running cppcheck in variant '$*'"

View File

@ -11,7 +11,7 @@ run() {
"${CPPFLAGS[@]}" \
"${LDFLAGS[@]}" \
"$@" \
-std=c++11 \
-std=c++17 \
-fdiagnostics-color=always \
-Wall \
-Wextra \

View File

@ -1,25 +0,0 @@
#!/bin/sh
# --bufferoverrun \
# --pulse \
read -r -d '' SCRIPT <<'EOF'
infer \
--report-console-limit 100 \
--jobs 8 \
--biabduction \
--loop-hoisting \
--quandary \
--racerd \
--starvation \
--uninit \
-- clang++ -fsyntax-only \
$(pkg-config --cflags libconfig libsodium opus vpx) \
/work/other/bootstrap_daemon/src/*.c \
/work/other/bootstrap_node_packets.c \
/work/toxav/*.c \
/work/toxcore/*.c \
/work/toxencryptsave/*.c
EOF
docker run --rm -it -v "$PWD:/work" toxchat/infer bash -c "$SCRIPT"