From b75b88a8b89bb74a35a4b6bfbe45d5c9d4e0a735 Mon Sep 17 00:00:00 2001 From: aet Date: Thu, 10 Jan 2002 13:49:54 +0000 Subject: [PATCH] Fix compiler warnings git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@157 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/iso7816.c | 3 ++- src/libopensc/pkcs15-cert.c | 2 +- src/tests/hst-test.c | 2 +- src/tools/opensc-explorer.c | 8 ++++---- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/libopensc/iso7816.c b/src/libopensc/iso7816.c index b5a8eee9..44fe1d6b 100644 --- a/src/libopensc/iso7816.c +++ b/src/libopensc/iso7816.c @@ -386,7 +386,8 @@ static int construct_fci(const struct sc_file *file, u8 *out, size_t *outlen) static int iso7816_create_file(struct sc_card *card, const struct sc_file *file) { - int r, len; + int r; + size_t len; u8 sbuf[SC_MAX_APDU_BUFFER_SIZE]; struct sc_apdu apdu; diff --git a/src/libopensc/pkcs15-cert.c b/src/libopensc/pkcs15-cert.c index e1a58844..407baef2 100644 --- a/src/libopensc/pkcs15-cert.c +++ b/src/libopensc/pkcs15-cert.c @@ -374,7 +374,7 @@ int sc_pkcs15_create_cdf(struct sc_pkcs15_card *p15card, size_t bufsize = 0, tmpsize; int i = 0, r; const struct sc_pkcs15_cert_info *cert; - u8 str[10240]; + char str[10240]; for (i = 0; (cert = certs[i]) != NULL; i++) { r = encode_x509_cert_info(p15card->card->ctx, diff --git a/src/tests/hst-test.c b/src/tests/hst-test.c index f98428f8..20eae02a 100644 --- a/src/tests/hst-test.c +++ b/src/tests/hst-test.c @@ -75,7 +75,7 @@ int test2() struct sc_path path; struct sc_file file; u8 buf[32]; - u8 output[1024]; + char output[1024]; int i; sc_format_path("1234", &path); diff --git a/src/tools/opensc-explorer.c b/src/tools/opensc-explorer.c index 037febc5..d74eb3ca 100644 --- a/src/tools/opensc-explorer.c +++ b/src/tools/opensc-explorer.c @@ -37,7 +37,7 @@ const char *cmds[] = { }; const int nr_cmds = sizeof(cmds)/sizeof(cmds[0]); -int die(int ret) +void die(int ret) { if (card) { sc_unlock(card); @@ -222,9 +222,9 @@ int do_cat(const char *arg) printf("Usage: cat [file_id]\n"); return -1; } - strcpy(buf, "I"); - strcat(buf, arg); - sc_format_path(buf, &path); + strcpy((char *) buf, "I"); + strcat((char *) buf, arg); + sc_format_path((char *) buf, &path); if (path.len != 2) { printf("Usage: cat [file_id]\n"); return -1;