forked from irungentoo/toxcore
-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Upgrade cppcheck, fix some warnings.
Also started teaching it about toxcore's alloc/dealloc functions in hopes of it catching some errors (it doesn't seem to be very good at this, but maybe better than nothing?).
- Loading branch information
Showing
31 changed files
with
229 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
f0bff9fe04d56543d95a457afd76c618139eef99a4302337c66d07759d108e8b /usr/local/bin/tox-bootstrapd | ||
68432689967d06dd144e5cdfe37751ccc62b2aa85b73a9cc55aff3732dc47fde /usr/local/bin/tox-bootstrapd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM alpine:3.19.0 | ||
|
||
RUN ["apk", "add", "--no-cache", \ | ||
"bash", \ | ||
"cppcheck", \ | ||
"findutils", \ | ||
"libconfig-dev", \ | ||
"libsodium-dev", \ | ||
"libvpx-dev", \ | ||
"linux-headers", \ | ||
"make", \ | ||
"opus-dev"] | ||
|
||
COPY other/bootstrap_daemon/ /src/workspace/c-toxcore/other/bootstrap_daemon/ | ||
COPY other/bootstrap_node_packets.* /src/workspace/c-toxcore/other/ | ||
COPY other/fun/ /src/workspace/c-toxcore/other/fun/ | ||
COPY auto_tests/check_compat.h /src/workspace/c-toxcore/auto_tests/ | ||
COPY testing/ /src/workspace/c-toxcore/testing/ | ||
COPY toxav/ /src/workspace/c-toxcore/toxav/ | ||
COPY toxcore/ /src/workspace/c-toxcore/toxcore/ | ||
COPY toxencryptsave/ /src/workspace/c-toxcore/toxencryptsave/ | ||
COPY third_party/cmp/cmp.h /src/workspace/c-toxcore/third_party/cmp/ | ||
COPY other/analysis/run-cppcheck \ | ||
other/analysis/gen-file.sh \ | ||
other/analysis/variants.sh \ | ||
/src/workspace/c-toxcore/other/analysis/ | ||
COPY other/docker/cppcheck/toxcore.cfg \ | ||
/src/workspace/c-toxcore/other/docker/cppcheck/ | ||
WORKDIR /src/workspace/c-toxcore | ||
RUN ["other/analysis/run-cppcheck"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
set -eux | ||
BUILD=cppcheck | ||
docker build -t "toxchat/c-toxcore:$BUILD" -f "other/docker/$BUILD/Dockerfile" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<?xml version="1.0"?> | ||
<def format="2"> | ||
<memory> | ||
<alloc init="false" buffer-size="malloc:2">mem_balloc</alloc> | ||
<alloc init="true" buffer-size="malloc:2">mem_alloc</alloc> | ||
<alloc init="true" buffer-size="calloc:2,3">mem_valloc</alloc> | ||
<realloc init="false" buffer-size="calloc:3,4">mem_vrealloc</realloc> | ||
<dealloc arg="2">mem_delete</dealloc> | ||
</memory> | ||
<resource> | ||
<alloc init="true">bin_pack_new</alloc> | ||
<dealloc arg="1">bin_pack_free</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">bin_unpack_new</alloc> | ||
<dealloc arg="1">bin_unpack_free</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">friendreq_new</alloc> | ||
<dealloc arg="1">friendreq_kill</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">logger_new</alloc> | ||
<dealloc arg="1">logger_kill</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">mono_time_new</alloc> | ||
<dealloc arg="1">mono_time_free</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">ping_array_new</alloc> | ||
<dealloc arg="1">ping_array_kill</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">ping_new</alloc> | ||
<dealloc arg="1">ping_kill</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">shared_key_cache_new</alloc> | ||
<dealloc arg="1">shared_key_cache_free</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">tox_dispatch_new</alloc> | ||
<dealloc arg="1">tox_dispatch_free</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">tox_new</alloc> | ||
<dealloc arg="1">tox_kill</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">tox_options_new</alloc> | ||
<dealloc arg="1">tox_options_free</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_announcements</alloc> | ||
<dealloc arg="1">kill_announcements</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_dht</alloc> | ||
<dealloc arg="1">kill_dht</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_dht_groupchats</alloc> | ||
<dealloc arg="1">kill_dht_groupchats</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_forwarding</alloc> | ||
<dealloc arg="1">kill_forwarding</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_friend_connections</alloc> | ||
<dealloc arg="1">kill_friend_connections</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_gca_list</alloc> | ||
<dealloc arg="1">kill_gca_list</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_groupchats</alloc> | ||
<dealloc arg="1">kill_groupchats</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_messenger</alloc> | ||
<dealloc arg="1">kill_messenger</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_net_crypto</alloc> | ||
<dealloc arg="1">kill_net_crypto</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_networking_ex</alloc> | ||
<alloc init="true">new_networking_no_udp</alloc> | ||
<dealloc arg="1">kill_networking</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_onion</alloc> | ||
<dealloc arg="1">kill_onion</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_onion_announce</alloc> | ||
<dealloc arg="1">kill_onion_announce</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_onion_client</alloc> | ||
<dealloc arg="1">kill_onion_client</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_tcp_connections</alloc> | ||
<dealloc arg="1">kill_tcp_connections</dealloc> | ||
</resource> | ||
<resource> | ||
<alloc init="true">new_tcp_server</alloc> | ||
<dealloc arg="1">kill_tcp_server</dealloc> | ||
</resource> | ||
</def> | ||
<!-- vim:ft=xml | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.