Skip to content

Commit a3c0430

Browse files
committed
Fix -Wmaybe-uninitialized warnings in benchmarks.
1 parent 057104f commit a3c0430

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

test/benchmarks/benchmark_compare256_rle.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class compare256_rle: public benchmark::Fixture {
3333

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

3838
str2[match_len] = 0;
3939
for (auto _ : state) {

test/benchmarks/benchmark_compress.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class compress_bench: public benchmark::Fixture {
4343
}
4444

4545
void Bench(benchmark::State& state) {
46-
int err;
46+
int err = 0;
4747

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

0 commit comments

Comments
 (0)