From 1e91551885eb370b4c0b6959d8237981aee755e4 Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Mon, 30 Sep 2019 15:59:35 +0200 Subject: [PATCH] Fix -Wtautological-constant-compare in test/fuzzers. This started to be detected by a new version of clang and it is blocking the roll: ../../third_party/webrtc/test/fuzzers/agc_fuzzer.cc:85:29: error: converting the result of '?:' with integer constants to a boolean always evaluates to 'true' [-Werror,-Wtautological-constant-compare] const bool num_channels = fuzz_data->ReadOrDefaultValue(true) ? 2 : 1; Bug: chromium:1007367 Change-Id: Ib9a6e4e3c8f109d10845a315dd0782b1498cb54e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155166 Commit-Queue: Mirko Bonadei Reviewed-by: Nico Weber Reviewed-by: Sam Zackrisson Cr-Commit-Position: refs/heads/master@{#29348} --- test/fuzzers/agc_fuzzer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fuzzers/agc_fuzzer.cc b/test/fuzzers/agc_fuzzer.cc index a40a21382f..4d97a2df23 100644 --- a/test/fuzzers/agc_fuzzer.cc +++ b/test/fuzzers/agc_fuzzer.cc @@ -82,7 +82,7 @@ void FuzzGainController(test::FuzzDataHelper* fuzz_data, GainControlImpl* gci) { const auto sample_rate_hz = static_cast(fuzz_data->SelectOneOf(rate_kinds)); const size_t samples_per_frame = sample_rate_hz / 100; - const bool num_channels = fuzz_data->ReadOrDefaultValue(true) ? 2 : 1; + const size_t num_channels = fuzz_data->ReadOrDefaultValue(true) ? 2 : 1; gci->Initialize(num_channels, sample_rate_hz); FuzzGainControllerConfig(fuzz_data, gci);