forked from Green-Sky/tomato
Green Sky
b2ae9530a4
f1df709b87 feat: add ngc events 1b6c907235 refactor: Make event dispatch ordered by receive time. b7f9367f6f test: Upgrade cppcheck, fix some warnings. 766e62bc89 chore: Use `pkg_search_module` directly in cmake. 00ff078f91 cleanup: Use target_link_libraries directly in cmake. c58928cc89 chore: Add `IMPORTED_TARGET` to pkg-config packages. 895a6af122 cleanup: Remove NaCl support. 41dfb1c1c0 fix: unpack enum function names in event impl generator 447666d1a1 chore: Disable targets for cross-compilation. 572924e924 chore: Build a docker image with coverage info in it. 415cb78f5e cleanup: Some portability/warning fixes for Windows builds. 425216d9ec fix: Correct a use-after-free and fix some memory leaks. 4b1cfa3e08 refactor: Change all enum-like `#define` sequences into enums. d3c2704fa9 chore: Fix make_single_file to support core-only. 0ce46b644e refactor: Change the `TCP_PACKET_*` defines into an enum. 22cd38ad50 adopt event impl generation tool to #2392 f31ea1088a add the event impl generation tool 4e603bb613 refactor: Use `enum-from-int` rule from tokstyle. 19d8f180d6 chore: Update github actions `uses`. 6a895be0c7 test: Make esp32 build actually try to instantiate tox. 65d09c9bfb cleanup: Remove test net support. REVERT: e29e185c03 feat: add ngc events git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: f1df709b8792da4c0e946d826b11df77d565064d
45 lines
1.5 KiB
Bash
Executable File
45 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
SKIP_GTEST=1
|
|
|
|
. other/analysis/gen-file.sh
|
|
|
|
set -e
|
|
|
|
CPPCHECK=("--enable=all")
|
|
CPPCHECK+=("--inconclusive")
|
|
CPPCHECK+=("--check-level=exhaustive")
|
|
CPPCHECK+=("--inline-suppr")
|
|
CPPCHECK+=("--library=other/docker/cppcheck/toxcore.cfg")
|
|
CPPCHECK+=("--error-exitcode=1")
|
|
# We don't cast function pointers, which cppcheck suggests here.
|
|
CPPCHECK+=("--suppress=constParameterCallback")
|
|
# False positives in switch statements.
|
|
CPPCHECK+=("--suppress=knownConditionTrueFalse")
|
|
# Cppcheck does not need standard library headers to get proper results.
|
|
CPPCHECK+=("--suppress=missingIncludeSystem")
|
|
# TODO(iphydf): Maybe fix?
|
|
CPPCHECK+=("--suppress=signConversion")
|
|
# TODO(iphydf): Fixed in the toxav refactor PR.
|
|
CPPCHECK+=("--suppress=redundantAssignment")
|
|
|
|
# We use this for VLAs.
|
|
CPPCHECK_CXX+=("--suppress=allocaCalled")
|
|
# False positive in auto_tests.
|
|
CPPCHECK_CXX+=("--suppress=shadowFunction")
|
|
# False positive in group.c.
|
|
# Using cppcheck-suppress claims the suppression is unused.
|
|
CPPCHECK_CXX+=("--suppress=AssignmentAddressToInteger")
|
|
# We use C style casts because we write C code.
|
|
CPPCHECK_CXX+=("--suppress=cstyleCast")
|
|
# Used in Messenger.c for a static_assert(...)
|
|
CPPCHECK_CXX+=("--suppress=sizeofFunctionCall")
|
|
|
|
run() {
|
|
echo "Running cppcheck in variant '$*'"
|
|
cppcheck -j8 "${CPPCHECK[@]}" "${CPPCHECK_C[@]}" tox*/*.[ch] tox*/*/*.[ch] "${CPPFLAGS[@]}" "$@"
|
|
cppcheck "${CPPCHECK[@]}" "${CPPCHECK_CXX[@]}" amalgamation.cc "${CPPFLAGS[@]}" "$@"
|
|
}
|
|
|
|
. other/analysis/variants.sh
|