quad_math: fix or suppress cppcheck warnings
This commit is contained in:
parent
32c60cd0aa
commit
c2dfd8439c
|
@ -97,7 +97,7 @@ quad_t __muldi3(quad_t a, quad_t b)
|
|||
{
|
||||
union uu u, v, low, prod;
|
||||
u_int high, mid, udiff, vdiff;
|
||||
int negall, negmid;
|
||||
int negall;
|
||||
#define u1 u.ul[H]
|
||||
#define u0 u.ul[L]
|
||||
#define v1 v.ul[H]
|
||||
|
@ -131,6 +131,7 @@ quad_t __muldi3(quad_t a, quad_t b)
|
|||
prod.q = __lmulq(u0, v0);
|
||||
}
|
||||
else {
|
||||
int negmid;
|
||||
/*
|
||||
* Compute the three intermediate products, remembering
|
||||
* whether the middle term is negative. We can discard
|
||||
|
|
|
@ -78,6 +78,8 @@ __qdivrem(u_quad_t uq, u_quad_t vq, u_quad_t *arq)
|
|||
/* divide by zero. */
|
||||
static volatile const unsigned int zero = 0;
|
||||
|
||||
/* cppcheck-suppress zerodiv
|
||||
* Divission by zero is on purpose here */
|
||||
tmp.ul[H] = tmp.ul[L] = 1 / zero;
|
||||
|
||||
if (arq) {
|
||||
|
|
Loading…
Reference in New Issue