mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Silence clang static analyzer complaint about potential div by 0.
It can't, because if b is 0 the function would have returned already; since b.m_hi is 0 b.m_lo can't be. The assert reassures clang that this is the case.
This commit is contained in:
parent
3d1362757b
commit
43a30e1c97
@ -770,6 +770,7 @@ GncInt128::div (const GncInt128& b, GncInt128& q, GncInt128& r) const noexcept
|
||||
q.m_hi = set_flags(hi, qflags);
|
||||
if (hi == 0 && bhi == 0) //let the hardware do it
|
||||
{
|
||||
assert (b.m_lo != 0); // b.m_hi is 0 but b isn't or we didn't get here.
|
||||
q.m_lo = m_lo / b.m_lo;
|
||||
r.m_lo = m_lo % b.m_lo;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user