Remove dead code

p15card-helper.c:263:22: warning: Although the value stored to 'r' is used in
      the enclosing expression, the value is never actually read from 'r'
  ...!= (r = sc_pkcs15emu_add_x509_cert(p15card, &cert_obj, &cert_info))) {
         ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p15card-helper.c:237:22: warning: Although the value stored to 'r' is used in
      the enclosing expression, the value is never actually read from 'r'
  ...if(SC_SUCCESS != (r = sc_select_file(card, &cert_info.path, NULL))) {
                       ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p15card-helper.c:224:3: warning: Value stored to 'r' is never read
                r = SC_SUCCESS;
                ^   ~~~~~~~~~~


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5182 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
ludovic.rousseau 2011-02-05 22:17:57 +00:00
parent fc40ad754c
commit fe31597e4d
1 changed files with 2 additions and 4 deletions

View File

@ -221,8 +221,6 @@ int sc_pkcs15emu_initialize_certificates(sc_pkcs15_card_t *p15card, p15data_item
memset(&cert_info, 0, sizeof(cert_info));
memset(&cert_obj, 0, sizeof(cert_obj));
r = SC_SUCCESS;
sc_pkcs15_format_id(certs[i].id, &cert_info.id);
cert_info.authority = certs[i].authority;
sc_format_path(certs[i].path, &cert_info.path);
@ -234,7 +232,7 @@ int sc_pkcs15emu_initialize_certificates(sc_pkcs15_card_t *p15card, p15data_item
u8* cert_buffer = NULL;
size_t cert_length = 0;
int should_free = 0;
if(SC_SUCCESS != (r = sc_select_file(card, &cert_info.path, NULL))) {
if(SC_SUCCESS != sc_select_file(card, &cert_info.path, NULL)) {
if(onFailResume)
continue;
else
@ -260,7 +258,7 @@ int sc_pkcs15emu_initialize_certificates(sc_pkcs15_card_t *p15card, p15data_item
break;
}
} else { /* Automatically add */
if(SC_SUCCESS != (r = sc_pkcs15emu_add_x509_cert(p15card, &cert_obj, &cert_info))) {
if(SC_SUCCESS != sc_pkcs15emu_add_x509_cert(p15card, &cert_obj, &cert_info)) {
if(onFailResume)
continue;
else