From 67d0a41ed27afaf549dcc87b6b371e1b1cc521e1 Mon Sep 17 00:00:00 2001 From: "ludovic.rousseau" Date: Sat, 5 Feb 2011 21:18:34 +0000 Subject: [PATCH] Remove dead code muscle.c:417:2: warning: Value stored to 'ptr' is never read ptr += newPinLength; ^ ~~~~~~~~~~~~ muscle.c:918:2: warning: Value stored to 'inPtr' is never read inPtr += toSend; ^ ~~~~~~ muscle.c:917:2: warning: Value stored to 'left' is never read left -= toSend; ^ ~~~~~~ muscle.c:1012:26: warning: Value stored to 'p' is never read ushort2bebytes(p, use); p+=2; ^ ~ git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5160 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/muscle.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libopensc/muscle.c b/src/libopensc/muscle.c index bbb6d06b..dfb65c5c 100644 --- a/src/libopensc/muscle.c +++ b/src/libopensc/muscle.c @@ -414,7 +414,6 @@ void msc_change_pin_apdu(sc_card_t *card, sc_apdu_t *apdu, u8* buffer, size_t bu *ptr = newPinLength; ptr++; memcpy(ptr, newPin, newPinLength); - ptr += newPinLength; apdu->lc = pinLength + newPinLength + 2; apdu->datalen = apdu->lc; apdu->data = buffer; @@ -914,8 +913,6 @@ int msc_compute_crypt(sc_card_t *card, &received); if(r < 0) SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_NORMAL, r); } - left -= toSend; - inPtr += toSend; outPtr += received; return outPtr - outputData; /* Amt received */ @@ -1009,7 +1006,7 @@ int msc_import_key(sc_card_t *card, p = apduBuffer; ushort2bebytes(p, readAcl); p+=2; ushort2bebytes(p, writeAcl); p+=2; - ushort2bebytes(p, use); p+=2; + ushort2bebytes(p, use); r = sc_transmit_apdu(card, &apdu); SC_TEST_RET(card->ctx, SC_LOG_DEBUG_NORMAL, r, "APDU transmit failed"); if(apdu.sw1 == 0x90 && apdu.sw2 == 0x00) {