From 68a45e0aaff5409e75d2eee01d179dcbd29e59fd Mon Sep 17 00:00:00 2001 From: Gabor Mezei Date: Wed, 23 Nov 2022 13:12:51 +0100 Subject: [PATCH] Fix potential not initialized warning Signed-off-by: Gabor Mezei --- tests/suites/test_suite_bignum_mod_raw.function | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/suites/test_suite_bignum_mod_raw.function b/tests/suites/test_suite_bignum_mod_raw.function index 22a73e0323..aaf26ca794 100644 --- a/tests/suites/test_suite_bignum_mod_raw.function +++ b/tests/suites/test_suite_bignum_mod_raw.function @@ -291,6 +291,9 @@ void mpi_mod_raw_sub( char * input_A, size_t limbs_N; size_t limbs_res; + mbedtls_mpi_mod_modulus m; + mbedtls_mpi_mod_modulus_init( &m ); + TEST_EQUAL( mbedtls_test_read_mpi_core( &A, &limbs_A, input_A ), 0 ); TEST_EQUAL( mbedtls_test_read_mpi_core( &B, &limbs_B, input_B ), 0 ); TEST_EQUAL( mbedtls_test_read_mpi_core( &N, &limbs_N, input_N ), 0 ); @@ -305,9 +308,6 @@ void mpi_mod_raw_sub( char * input_A, ASSERT_ALLOC( X, limbs ); - mbedtls_mpi_mod_modulus m; - mbedtls_mpi_mod_modulus_init( &m ); - TEST_EQUAL( mbedtls_mpi_mod_modulus_setup( &m, N, limbs, MBEDTLS_MPI_MOD_EXT_REP_BE,