mirror of
https://github.com/esphome/esphome.git
synced 2025-03-01 00:08:15 +00:00
Reverting the clang-analyzer-core.DivideZero
There is a protection for this on the set_sample_count function, so I've ignored clang-analyzer just like in the original code.
This commit is contained in:
parent
fa437896a1
commit
bf2823a52c
@ -96,7 +96,7 @@ float ADCSensor::sample() {
|
||||
}
|
||||
sum += raw;
|
||||
}
|
||||
sum = (sum + (this->sample_count_ >> 1)) / this->sample_count_;
|
||||
sum = (sum + (this->sample_count_ >> 1)) / this->sample_count_; // NOLINT(clang-analyzer-core.DivideZero)
|
||||
if (this->output_raw_) {
|
||||
return sum;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user