Skip to contentSkip to conversation

libcacard/cac: Remove unused statement (value stored is never read)

PATCH Applied Stefan Weil 2 participants 2 messages Nov 17, 2013 – Dec 2, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libcacard/cac: Remove unused statement (value stored is never read)

Warning from ccc-analyzer:

libcacard/cac.c:192:13: warning: Value stored to 'ret' is never read

            ret = VCARD_DONE;
            ^     ~~~~~~~~~~

Here 'ret' is assigned a value inside of a switch statement and also after that switch statement.

---

This patch is not needed for 1.7 (although I think that it is safe).

 libcacard/cac.c |    1 -
 1 file changed, 1 deletion(-)
libcacard/cac.c +0 -1
index 7a06b5a..74ef3e3 100644
@@ -189,7 +189,6 @@ cac_applet_pki_process_apdu(VCard *card, VCardAPDU *apdu,
             pki_applet->sign_buffer = sign_buffer;
             pki_applet->sign_buffer_len = size;
             *response = vcard_make_response(VCARD7816_STATUS_SUCCESS);
-            ret = VCARD_DONE;
             break;
         case 0x00:
             /* we now have the whole buffer, do the operation, result will be
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 8 lines · Stefan Weil

Warning from ccc-analyzer:

libcacard/cac.c:192:13: warning: Value stored to 'ret' is never read

            ret = VCARD_DONE;
            ^     ~~~~~~~~~~

Here 'ret' is assigned a value inside of a switch statement and also after that switch statement.

Applied to trivial patches, thank you!

/mjt