diff --git a/sys/quad_math/muldi3.c b/sys/quad_math/muldi3.c index 61b781ca52..4e703238c8 100644 --- a/sys/quad_math/muldi3.c +++ b/sys/quad_math/muldi3.c @@ -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 diff --git a/sys/quad_math/qdivrem.c b/sys/quad_math/qdivrem.c index 9ef434b991..8ff7ecb15b 100644 --- a/sys/quad_math/qdivrem.c +++ b/sys/quad_math/qdivrem.c @@ -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) {