From b16c2a2aefaf7d235513d6f2c3813efa8e8ac407 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 1 Jul 2022 23:49:58 -0500 Subject: [PATCH] fix clang-analyzer-deadcode.DeadStores in sp_div(). --- wolfcrypt/src/sp_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c index bedd230a6..bf161265a 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c @@ -7113,9 +7113,9 @@ int sp_div(sp_int* a, sp_int* d, sp_int* r, sp_int* rem) if ((!done) && (err == MP_OKAY)) { sd = td[0]; trial = td[1]; - i = 2; #if (defined(WOLFSSL_SMALL_STACK) || defined(SP_ALLOC)) && \ !defined(WOLFSSL_SP_NO_MALLOC) + i = 2; sa = ((rem != NULL) && (rem != d)) ? rem : td[i++]; tr = ((r != NULL) && (r != d)) ? r : td[i]; #else