mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Fix clang-static-analyzer
This commit is contained in:
parent
227afea032
commit
4b7d253c8a
@ -161,7 +161,9 @@ inline void readDecimalText(ReadBuffer & buf, T & x, uint32_t precision, uint32_
|
||||
if (static_cast<int32_t>(scale) + exponent < 0)
|
||||
{
|
||||
/// Too many digits after point. Just cut off excessive digits.
|
||||
x.value /= intExp10OfSize<T>(-exponent - static_cast<int32_t>(scale));
|
||||
auto divisor = intExp10OfSize<T>(-exponent - static_cast<int32_t>(scale));
|
||||
assert(divisor > 0); /// This is for Clang Static Analyzer. It is not smart enough to infer it automatically.
|
||||
x.value /= divisor;
|
||||
scale = 0;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user