From: Niels Möller Date: Sat, 26 Aug 2017 20:54:59 +0000 (+0200) Subject: Add missing assert. X-Git-Tag: nettle_3.4rc1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bf64256ecf10af974c1970d87ffad19cbce7b51;p=thirdparty%2Fnettle.git Add missing assert. --- diff --git a/ChangeLog b/ChangeLog index de6fc6dc..3a027a61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-08-26 Niels Möller + + * ecc-mod-inv.c (ecc_mod_inv): Add missing assert. Fixes a + "dead increment" warning from the clang static analyzer. + 2017-07-18 Niels Möller * ecc-add-eh.c (ecc_add_eh): Fix in-place operation by reordering diff --git a/ecc-mod-inv.c b/ecc-mod-inv.c index f65c9da4..8cfd2e3b 100644 --- a/ecc-mod-inv.c +++ b/ecc-mod-inv.c @@ -145,6 +145,7 @@ ecc_mod_inv (const struct ecc_modulo *m, cnd_swap (swap, up, vp, n); cy = cnd_sub_n (odd, up, vp, n); cy -= cnd_add_n (cy, up, m->m, n); + assert (cy == 0); cy = mpn_rshift (ap, ap, n, 1); assert (cy == 0);