From eaf90d9a9c4abb542d1cc9e236d237fb11eac177 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Wed, 13 Jul 2011 14:21:52 +0000 Subject: [PATCH] - Removed unused but initialized variables --- tests/suites/test_suite_pkcs1_v21.function | 3 +-- tests/suites/test_suite_rsa.function | 8 ++++---- tests/suites/test_suite_x509parse.function | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/suites/test_suite_pkcs1_v21.function b/tests/suites/test_suite_pkcs1_v21.function index a11f042c1..98dea209a 100644 --- a/tests/suites/test_suite_pkcs1_v21.function +++ b/tests/suites/test_suite_pkcs1_v21.function @@ -60,7 +60,6 @@ pkcs1_rsaes_oaep_decrypt:mod:radix_P:input_P:radix_Q:input_Q:radix_N:input_N:rad rsa_context ctx; mpi P1, Q1, H, G; size_t output_len; - size_t msg_len; mpi_init( &P1 ); mpi_init( &Q1 ); mpi_init( &H ); mpi_init( &G ); rsa_init( &ctx, RSA_PKCS_V21, {hash} ); @@ -86,7 +85,7 @@ pkcs1_rsaes_oaep_decrypt:mod:radix_P:input_P:radix_Q:input_Q:radix_N:input_N:rad TEST_ASSERT( rsa_check_privkey( &ctx ) == 0 ); - msg_len = unhexify( message_str, {message_hex_string} ); + unhexify( message_str, {message_hex_string} ); TEST_ASSERT( rsa_pkcs1_decrypt( &ctx, RSA_PRIVATE, &output_len, message_str, output, 1000 ) == {result} ); if( {result} == 0 ) diff --git a/tests/suites/test_suite_rsa.function b/tests/suites/test_suite_rsa.function index 9dfd66460..0d4ba0ba8 100644 --- a/tests/suites/test_suite_rsa.function +++ b/tests/suites/test_suite_rsa.function @@ -180,7 +180,7 @@ rsa_pkcs1_sign_raw:message_hex_string:hash_result_string:padding_mode:mod:radix_ unsigned char output_str[1000]; rsa_context ctx; mpi P1, Q1, H, G; - int msg_len, hash_len; + int hash_len; mpi_init( &P1 ); mpi_init( &Q1 ); mpi_init( &H ); mpi_init( &G ); rsa_init( &ctx, {padding_mode}, 0 ); @@ -207,7 +207,7 @@ rsa_pkcs1_sign_raw:message_hex_string:hash_result_string:padding_mode:mod:radix_ TEST_ASSERT( rsa_check_privkey( &ctx ) == 0 ); - msg_len = unhexify( message_str, {message_hex_string} ); + unhexify( message_str, {message_hex_string} ); hash_len = unhexify( hash_result, {hash_result_string} ); TEST_ASSERT( rsa_pkcs1_sign( &ctx, NULL, NULL, RSA_PRIVATE, SIG_RSA_RAW, hash_len, hash_result, output ) == 0 ); @@ -227,7 +227,7 @@ rsa_pkcs1_verify_raw:message_hex_string:hash_result_string:padding_mode:mod:radi unsigned char hash_result[1000]; unsigned char result_str[1000]; rsa_context ctx; - size_t msg_len, hash_len; + size_t hash_len; rsa_init( &ctx, {padding_mode}, 0 ); memset( message_str, 0x00, 1000 ); @@ -240,7 +240,7 @@ rsa_pkcs1_verify_raw:message_hex_string:hash_result_string:padding_mode:mod:radi TEST_ASSERT( rsa_check_pubkey( &ctx ) == 0 ); - msg_len = unhexify( message_str, {message_hex_string} ); + unhexify( message_str, {message_hex_string} ); hash_len = unhexify( hash_result, {hash_result_string} ); unhexify( result_str, {result_hex_str} ); diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function index c325286ad..18e1c41f3 100644 --- a/tests/suites/test_suite_x509parse.function +++ b/tests/suites/test_suite_x509parse.function @@ -222,7 +222,7 @@ x509parse_key:key_data:result_str:result rsa_context rsa; unsigned char buf[2000]; unsigned char output[2000]; - int data_len, res; + int data_len; memset( &rsa, 0, sizeof( rsa_context ) ); memset( buf, 0, 2000 ); @@ -230,7 +230,7 @@ x509parse_key:key_data:result_str:result data_len = unhexify( buf, {key_data} ); - res = x509parse_key( &rsa, buf, data_len, NULL, 0 ); + x509parse_key( &rsa, buf, data_len, NULL, 0 ); TEST_ASSERT( x509parse_key( &rsa, buf, data_len, NULL, 0 ) == ( {result} ) ); if( ( {result} ) == 0 )