From bc307ae975168efb34d5ab258d011672eb46eff7 Mon Sep 17 00:00:00 2001 From: Martin Paljak Date: Thu, 16 Jun 2011 15:49:04 +0300 Subject: [PATCH] =?UTF-8?q?compiler=20warning:=20muscle.c:588:12:=20warnin?= =?UTF-8?q?g:=20unused=20variable=20=E2=80=98buffer=5Fsize=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also remove asserts, production code is compiled with asserts turned off, thus the unused variable warning. --- src/libopensc/muscle.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/libopensc/muscle.c b/src/libopensc/muscle.c index dfb65c5c..f0341213 100644 --- a/src/libopensc/muscle.c +++ b/src/libopensc/muscle.c @@ -585,11 +585,9 @@ int msc_extract_rsa_public_key(sc_card_t *card, u8** exponent) { int r; - const int buffer_size = 1024; u8 buffer[1024]; /* Should be plenty... */ int fileLocation = 1; - assert(modLength && expLength && modulus && exponent); r = msc_extract_key(card, keyLocation); if(r < 0) SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_NORMAL, r); @@ -601,7 +599,6 @@ int msc_extract_rsa_public_key(sc_card_t *card, if(buffer[0] != MSC_RSA_PUBLIC) SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_NORMAL, SC_ERROR_UNKNOWN_DATA_RECEIVED); *modLength = (buffer[3] << 8) | buffer[4]; /* Read the modulus and the exponent length */ - assert(*modLength + 2 < buffer_size); r = msc_read_object(card, inputId, fileLocation, buffer, *modLength + 2); fileLocation += *modLength + 2; @@ -611,7 +608,6 @@ int msc_extract_rsa_public_key(sc_card_t *card, if(!*modulus) SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_NORMAL, SC_ERROR_OUT_OF_MEMORY); memcpy(*modulus, buffer, *modLength); *expLength = (buffer[*modLength] << 8) | buffer[*modLength + 1]; - assert(*expLength < buffer_size); r = msc_read_object(card, inputId, fileLocation, buffer, *expLength); if(r < 0) { free(*modulus); *modulus = NULL;