diff --git a/other/analysis/run-infer b/other/analysis/run-infer index 43d66b04e76..bbfd8123147 100755 --- a/other/analysis/run-infer +++ b/other/analysis/run-infer @@ -1,10 +1,25 @@ -#!/bin/bash +#!/bin/sh -# Infer ignores everything that's not in the "current file". -SKIP_LINES=1 +# --bufferoverrun \ +# --pulse \ -set -e +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 -. other/analysis/gen-file.sh - -infer --no-progress-bar -- clang++ -fsyntax-only amalgamation.cc "${CPPFLAGS[@]}" +docker run --rm -it -v "$PWD:/work" toxchat/infer bash -c "$SCRIPT" diff --git a/toxcore/group.c b/toxcore/group.c index 8d3a77f94bd..fe08fe624b4 100644 --- a/toxcore/group.c +++ b/toxcore/group.c @@ -2375,12 +2375,11 @@ static unsigned int send_message_all_connections(const Group_Chats *g_c, const G * return number of messages sent. */ static unsigned int send_lossy_all_connections(const Group_Chats *g_c, const Group_c *g, const uint8_t *data, - uint16_t length, - int receiver) + uint16_t length, int receiver) { unsigned int sent = 0; unsigned int num_connected_closest = 0; - unsigned int connected_closest[DESIRED_CLOSEST]; + unsigned int connected_closest[DESIRED_CLOSEST] = {0}; for (unsigned int i = 0; i < MAX_GROUP_CONNECTIONS; ++i) { if (g->connections[i].type != GROUPCHAT_CONNECTION_ONLINE) {