forked from wolfSSL/wolfssl
Merge pull request #5826 from kaleb-himes/gcc-11-12-fixes
Initialize variable causing failures with gcc-11 and gcc-12
This commit is contained in:
@ -17146,7 +17146,7 @@ int sp_todecimal(sp_int* a, char* str)
|
|||||||
int err = MP_OKAY;
|
int err = MP_OKAY;
|
||||||
int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
sp_int_digit d;
|
sp_int_digit d = 0;
|
||||||
|
|
||||||
/* Validate parameters. */
|
/* Validate parameters. */
|
||||||
if ((a == NULL) || (str == NULL)) {
|
if ((a == NULL) || (str == NULL)) {
|
||||||
@ -17178,7 +17178,7 @@ int sp_todecimal(sp_int* a, char* str)
|
|||||||
/* Write out little endian. */
|
/* Write out little endian. */
|
||||||
i = 0;
|
i = 0;
|
||||||
do {
|
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);
|
(void)sp_div_d(t, 10, t, &d);
|
||||||
/* Write out remainder as a character. */
|
/* Write out remainder as a character. */
|
||||||
str[i++] = (char)('0' + d);
|
str[i++] = (char)('0' + d);
|
||||||
|
Reference in New Issue
Block a user