Skip to content

Commit

Permalink
Fix -Wmaybe-uninitialized warnings in benchmarks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dead2 committed Feb 1, 2025
1 parent 057104f commit a3c0430
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/benchmarks/benchmark_compare256_rle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class compare256_rle: public benchmark::Fixture {

void Bench(benchmark::State& state, compare256_rle_func compare256_rle) {
int32_t match_len = (int32_t)state.range(0) - 1;
uint32_t len;
uint32_t len = 0;

str2[match_len] = 0;
for (auto _ : state) {
Expand Down
2 changes: 1 addition & 1 deletion test/benchmarks/benchmark_compress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class compress_bench: public benchmark::Fixture {
}

void Bench(benchmark::State& state) {
int err;
int err = 0;

for (auto _ : state) {
err = PREFIX(compress)(outbuff, &maxlen, inbuff, (size_t)state.range(0));
Expand Down

0 comments on commit a3c0430

Please sign in to comment.