mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +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)
|
if (static_cast<int32_t>(scale) + exponent < 0)
|
||||||
{
|
{
|
||||||
/// Too many digits after point. Just cut off excessive digits.
|
/// 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;
|
scale = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user