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;
|
union uu u, v, low, prod;
|
||||||
u_int high, mid, udiff, vdiff;
|
u_int high, mid, udiff, vdiff;
|
||||||
int negall, negmid;
|
int negall;
|
||||||
#define u1 u.ul[H]
|
#define u1 u.ul[H]
|
||||||
#define u0 u.ul[L]
|
#define u0 u.ul[L]
|
||||||
#define v1 v.ul[H]
|
#define v1 v.ul[H]
|
||||||
@ -131,6 +131,7 @@ quad_t __muldi3(quad_t a, quad_t b)
|
|||||||
prod.q = __lmulq(u0, v0);
|
prod.q = __lmulq(u0, v0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
int negmid;
|
||||||
/*
|
/*
|
||||||
* Compute the three intermediate products, remembering
|
* Compute the three intermediate products, remembering
|
||||||
* whether the middle term is negative. We can discard
|
* 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. */
|
/* divide by zero. */
|
||||||
static volatile const unsigned int zero = 0;
|
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;
|
tmp.ul[H] = tmp.ul[L] = 1 / zero;
|
||||||
|
|
||||||
if (arq) {
|
if (arq) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user