Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci/clang-analyze: bump clang version and fix status-bugs #1079

Merged
merged 3 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/clang-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
- name: Install clang-tools
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main"
sudo apt-get update && sudo apt-get install -y clang-tools-15
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main"
sudo apt-get update && sudo apt-get install -y clang-tools-17

- name: analyze
run: |
cmake -B build -DCMAKE_C_COMPILER=clang-15
analyze-build-15 --cdb build/compile_commands.json
cmake -B build -DCMAKE_C_COMPILER=clang-17
analyze-build-17 --cdb build/compile_commands.json --status-bugs -v
2 changes: 1 addition & 1 deletion src/fmt/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int fmt_timestamp_us(struct re_printf *pf, void *arg)
int h, m, s;
uint64_t us;
struct timespec tspec;
struct tm tm;
struct tm tm = {0};

#if defined(WIN32) && !defined(__MINGW32__)
timespec_get(&tspec, TIME_UTC);
Expand Down
8 changes: 4 additions & 4 deletions test/httpauth.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,13 +651,13 @@ int test_httpauth_digest_response(void)
goto out;
}

mb_printed = mem_deref (mb_printed);
resp = mem_deref(resp);
mem_deref(mb_printed);
mem_deref(resp);
continue;

out:
mb_printed = mem_deref (mb_printed);
resp = mem_deref(resp);
mem_deref(mb_printed);
mem_deref(resp);
break;
}

Expand Down
6 changes: 3 additions & 3 deletions test/sipsess.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static int make_sdp(struct mbuf **mbp, const char *sdp)
static void send_update_a(void *arg)
{
struct test *test = arg;
struct mbuf *desc;
struct mbuf *desc = NULL;
int err;

err = make_sdp(&desc, sdp_a);
Expand All @@ -223,7 +223,7 @@ static void send_update_a(void *arg)
static void send_update_b(void *arg)
{
struct test *test = arg;
struct mbuf *desc;
struct mbuf *desc = NULL;
int err;

err = make_sdp(&desc, sdp_b);
Expand Down Expand Up @@ -433,7 +433,7 @@ static void close_handler(int err, const struct sip_msg *msg, void *arg)
static void conn_handler(const struct sip_msg *msg, void *arg)
{
struct test *test = arg;
struct mbuf *desc;
struct mbuf *desc = NULL;
int err;
char *hdrs = test->rel100_b == REL100_REQUIRED ?
"Require: 100rel\r\n" : "";
Expand Down
Loading