fixed unused assignments

This commit is contained in:
Frank Morgner 2019-01-25 13:54:27 +01:00
parent fdb0e6d581
commit 85485eb9b0
8 changed files with 9 additions and 7 deletions

View File

@ -177,7 +177,6 @@ static int cac_read_binary(sc_card_t *card, unsigned int idx,
#endif
if (r)
goto done;
cert_ptr = val;
} else if (cert_len > 0) {
priv->cache_buf = malloc(cert_len);
if (priv->cache_buf == NULL) {

View File

@ -416,7 +416,7 @@ iasecc_init_gemalto(struct sc_card *card)
card->caps |= SC_CARD_CAP_USE_FCI_AC;
sc_format_path("3F00", &path);
rv = sc_select_file(card, &path, NULL);
sc_select_file(card, &path, NULL);
/* Result ignored*/
rv = iasecc_parse_ef_atr(card);

View File

@ -792,7 +792,6 @@ static void parse_sec_attr_44(sc_file_t *file, const u8 *buf, size_t len)
if (iACLen > len)
break;
iPinCount = -1; /* default no pin required */
iMethod = SC_AC_NONE; /* default no authentication required */
if (buf[iOffset] & 0X80) { /* AC in adaptive coding */

View File

@ -5705,6 +5705,8 @@ register_mechanisms(struct sc_pkcs11_card *p11card)
if (aes_max_key_size > 0) {
rc = sc_pkcs11_register_aes_mechanisms(p11card, aes_flags, aes_min_key_size, aes_max_key_size);
if (rc != CKR_OK)
return rc;
}

View File

@ -654,6 +654,7 @@ myeid_create_key(struct sc_profile *profile, struct sc_pkcs15_card *p15card,
/* TODO: add other flags, like CKA_TRUSTED and CKA_WRAP_WITH_TRUSTED */
r = sc_file_set_prop_attr(file, prop_info, 2);
LOG_TEST_RET(ctx, r, "Cannot create MyEID key file");
/* Now create the key file */
r = sc_pkcs15init_create_file(profile, p15card, file);

View File

@ -162,7 +162,6 @@ DES_cbc_cksum_3des_emv96(const unsigned char *in, DES_cblock *output,
tin0^=tout0; tin[0]=tin0;
tin1^=tout1; tin[1]=tin1;
DES_encrypt3((DES_LONG *)tin,schedule,schedule2,schedule);
tout0=tin[0];
tout1=tin[1];
if (out != NULL)
@ -170,7 +169,6 @@ DES_cbc_cksum_3des_emv96(const unsigned char *in, DES_cblock *output,
l2c(tout0,out);
l2c(tout1,out);
}
tout0=tin0=tin1=tin[0]=tin[1]=0;
/*
Transform the data in tout1 so that it will
match the return value that the MIT Kerberos
@ -220,7 +218,6 @@ DES_cbc_cksum_3des(const unsigned char *in, DES_cblock *output,
l2c(tout0,out);
l2c(tout1,out);
}
tout0=tin0=tin1=tin[0]=tin[1]=0;
/*
Transform the data in tout1 so that it will
match the return value that the MIT Kerberos

View File

@ -265,6 +265,10 @@ int main(int argc, char *argv[])
else if (!do_list_sdos) {
r = sc_pkcs15_bind(card, NULL, &p15card);
}
if (r != SC_SUCCESS) {
fprintf(stderr, "Failed to bind card: %s\n", sc_strerror(r));
goto end;
}
if (do_list_sdos) {
if ((err = list_sdos(opt_sdo_tag)))

View File

@ -2104,7 +2104,7 @@ int main(int argc, char *argv[])
int r, c, long_optind = 0, err = 0;
sc_context_param_t ctx_param;
int lcycle = SC_CARDCTRL_LIFECYCLE_ADMIN;
FILE *script = stdin;
FILE *script;
printf("OpenSC Explorer version %s\n", sc_get_version());