From 4d2b893fb388704b7a8e3670eac91926a358db54 Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Tue, 29 Nov 2022 14:59:53 -0700 Subject: [PATCH] Initialize variable causing failures with gcc-11 and gcc-12 --- wolfcrypt/src/sp_int.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c index 3b4fcee85..0b82ab546 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c @@ -17146,7 +17146,7 @@ int sp_todecimal(sp_int* a, char* str) int err = MP_OKAY; int i; int j; - sp_int_digit d; + sp_int_digit d = 0; /* Validate parameters. */ if ((a == NULL) || (str == NULL)) { @@ -17178,7 +17178,7 @@ int sp_todecimal(sp_int* a, char* str) /* Write out little endian. */ i = 0; do { - /* Divide by 10 and and get remainder of division. */ + /* Divide by 10 and get remainder of division. */ (void)sp_div_d(t, 10, t, &d); /* Write out remainder as a character. */ str[i++] = (char)('0' + d);