From 28b6b60870a4b5a69164eeb309e7690a93adc59f Mon Sep 17 00:00:00 2001 From: "ludovic.rousseau" Date: Sat, 5 Feb 2011 21:44:14 +0000 Subject: [PATCH] Remove dead code card-starcos.c:657:5: warning: Value stored to 'p' is never read *p++ = file->record_length & 0xff; ^~~ card-starcos.c:652:5: warning: Value stored to 'p' is never read *p++ = file->record_length & 0xff; ^~~ card-starcos.c:647:5: warning: Value stored to 'p' is never read *p++ = file->size & 0xff; ^~~ card-starcos.c:609:4: warning: Value stored to 'p' is never read *p++ = tmp; /* SM ISF */ ^~~ card-starcos.c:572:4: warning: Value stored to 'p' is never read *p++ = tmp; ^~~ card-starcos.c:1024:2: warning: Value stored to 'keyID' is never read keyID = env->key_ref[0]; ^ ~~~~~~~~~~~~~~~ git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5166 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/card-starcos.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/libopensc/card-starcos.c b/src/libopensc/card-starcos.c index aea096b3..c5478ea4 100644 --- a/src/libopensc/card-starcos.c +++ b/src/libopensc/card-starcos.c @@ -569,7 +569,7 @@ static int starcos_process_acl(sc_card_t *card, sc_file_t *file, tmp = 0x00; /* no sm */ *p++ = tmp; /* use the same sm mode for all ops */ *p++ = tmp; - *p++ = tmp; + *p = tmp; data->type = SC_STARCOS_MF_DATA; return SC_SUCCESS; @@ -606,7 +606,7 @@ static int starcos_process_acl(sc_card_t *card, sc_file_t *file, else tmp = 0x00; *p++ = tmp; /* SM CR */ - *p++ = tmp; /* SM ISF */ + *p = tmp; /* SM ISF */ data->data.df.size[0] = (file->size >> 8) & 0xff; data->data.df.size[1] = file->size & 0xff; @@ -644,17 +644,17 @@ static int starcos_process_acl(sc_card_t *card, sc_file_t *file, case SC_FILE_EF_TRANSPARENT: *p++ = 0x81; *p++ = (file->size >> 8) & 0xff; - *p++ = file->size & 0xff; + *p = file->size & 0xff; break; case SC_FILE_EF_LINEAR_FIXED: *p++ = 0x82; *p++ = file->record_count & 0xff; - *p++ = file->record_length & 0xff; + *p = file->record_length & 0xff; break; case SC_FILE_EF_CYCLIC: *p++ = 0x84; *p++ = file->record_count & 0xff; - *p++ = file->record_length & 0xff; + *p = file->record_length & 0xff; break; default: return SC_ERROR_INVALID_ARGUMENTS; @@ -1014,14 +1014,13 @@ static int starcos_set_security_env(sc_card_t *card, const sc_security_env_t *env, int se_num) { - u8 *p, *pp, keyID; + u8 *p, *pp; int r, operation = env->operation; sc_apdu_t apdu; u8 sbuf[SC_MAX_APDU_BUFFER_SIZE]; starcos_ex_data *ex_data = (starcos_ex_data *)card->drv_data; p = sbuf; - keyID = env->key_ref[0]; /* copy key reference, if present */ if (env->flags & SC_SEC_ENV_KEY_REF_PRESENT) {