Commit 90e3aee6 authored by Niels Möller's avatar Niels Möller

Workaround to silence the clang static analyzer.

parent 78823b2c
2017-09-14 Niels Möller <nisse@lysator.liu.se>
* ecc-mod.c (ecc_mod): Workaround to silence a false positive from
the clang static analyzer.
2017-09-12 Niels Möller <nisse@lysator.liu.se>
* testsuite/testutils.h (mpn_zero_p): Avoid redefining mpn_zero_p
......
......@@ -51,7 +51,7 @@ ecc_mod (const struct ecc_modulo *m, mp_limb_t *rp)
mp_size_t i;
unsigned shift;
assert (sn > 0);
assert (bn < mn);
/* FIXME: Could use mpn_addmul_2. */
/* Eliminate sn limbs at a time */
......@@ -72,6 +72,12 @@ ecc_mod (const struct ecc_modulo *m, mp_limb_t *rp)
}
else
{
/* The loop below always runs at least once. But the analyzer
doesn't realize that, and complains about hi being used later
on without a well defined value. */
#ifdef __clang_analyzer__
hi = 0;
#endif
while (rn >= 2 * mn - bn)
{
rn -= sn;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment