From 04e929da00e4d5babcf2cc09c6e160c031c69ea4 Mon Sep 17 00:00:00 2001 From: aet Date: Wed, 13 Mar 2002 23:11:25 +0000 Subject: [PATCH] Fix minor compiler warnings git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@320 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/tools/pkcs15-cflex.c | 2 +- src/tools/pkcs15-init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/pkcs15-cflex.c b/src/tools/pkcs15-cflex.c index 5db32738..cda2afb1 100644 --- a/src/tools/pkcs15-cflex.c +++ b/src/tools/pkcs15-cflex.c @@ -404,7 +404,7 @@ static int cflex_store_rsa_key(struct sc_profile *profile, struct sc_card *card, sc_file_clear_acl_entries(tmpfile, SC_AC_OP_READ); sc_file_add_acl_entry(tmpfile, SC_AC_OP_READ, SC_AC_NONE, SC_AC_KEY_REF_NONE); tmpfile->path.len -= 2; - sc_append_path_id(&tmpfile->path, "\x10\x12", 2); + sc_append_path_id(&tmpfile->path, (const u8 *) "\x10\x12", 2); tmpfile->id = 0x1012; tmpfile->size = pubsize; printf("Updating RSA public key...\n"); diff --git a/src/tools/pkcs15-init.c b/src/tools/pkcs15-init.c index a599438f..caae706f 100644 --- a/src/tools/pkcs15-init.c +++ b/src/tools/pkcs15-init.c @@ -1432,7 +1432,7 @@ do_verify_pin(struct sc_profile *pro, unsigned int type, unsigned int reference) assert(pro->pin_maxlen < sizeof(pinbuf)); memset(pinbuf, pro->pin_pad_char, pro->pin_maxlen); /* FIXME: shouldn't assume that encoding is ascii-numeric */ - strncpy(pinbuf, pin, strlen(pin)); + strncpy((char *) pinbuf, pin, strlen(pin)); return sc_verify(card, SC_AC_CHV, reference, pinbuf, pro->pin_maxlen, NULL);