Fix compiler warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@161 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
452b9d4193
commit
fec2138523
|
@ -183,7 +183,7 @@ int sc_pkcs15_create_tokeninfo(struct sc_pkcs15_card *card)
|
|||
int r;
|
||||
u8 *buf;
|
||||
size_t buflen;
|
||||
u8 line[10240];
|
||||
char line[10240];
|
||||
|
||||
r = encode_tokeninfo(card, &buf, &buflen);
|
||||
if (r) {
|
||||
|
@ -308,7 +308,7 @@ int sc_pkcs15_create_dir(struct sc_pkcs15_card *p15card)
|
|||
u8 *buf;
|
||||
size_t bufsize;
|
||||
int r;
|
||||
u8 line[10240];
|
||||
char line[10240];
|
||||
|
||||
SC_FUNC_CALLED(card->ctx, 1);
|
||||
sc_format_path("3F00", &path);
|
||||
|
@ -440,7 +440,7 @@ int sc_pkcs15_create_odf(struct sc_pkcs15_card *p15card)
|
|||
{
|
||||
u8 *buf;
|
||||
size_t buflen;
|
||||
u8 line[10240];
|
||||
char line[10240];
|
||||
int r;
|
||||
|
||||
r = encode_odf(p15card, &buf, &buflen);
|
||||
|
|
|
@ -380,11 +380,12 @@ int do_create(const char *arg, const char *arg2)
|
|||
{
|
||||
struct sc_path path;
|
||||
struct sc_file file;
|
||||
size_t size;
|
||||
int size;
|
||||
int i, r;
|
||||
|
||||
if (arg_to_path(arg, &path) != 0)
|
||||
goto usage;
|
||||
/* %z isn't supported everywhere */
|
||||
if (sscanf(arg2, "%d", &size) != 1)
|
||||
goto usage;
|
||||
memset(&file, 0, sizeof(file));
|
||||
|
@ -393,7 +394,7 @@ int do_create(const char *arg, const char *arg2)
|
|||
file.ef_structure = SC_FILE_EF_TRANSPARENT;
|
||||
for (i = 0; i < SC_MAX_AC_OPS; i++)
|
||||
file.acl[i] = SC_AC_NONE;
|
||||
file.size = size;
|
||||
file.size = (size_t) size;
|
||||
file.status = SC_FILE_STATUS_ACTIVATED;
|
||||
|
||||
r = sc_create_file(card, &file);
|
||||
|
@ -506,8 +507,8 @@ int do_get(const char *arg, const char *arg2)
|
|||
if (strlen(arg2))
|
||||
filename = arg2;
|
||||
else {
|
||||
sprintf(buf, "%02X%02X", path.value[0], path.value[1]);
|
||||
filename = buf;
|
||||
sprintf((char *) buf, "%02X%02X", path.value[0], path.value[1]);
|
||||
filename = (char *) buf;
|
||||
}
|
||||
outf = fopen(filename, "w");
|
||||
if (outf == NULL) {
|
||||
|
@ -569,8 +570,8 @@ int do_put(const char *arg, const char *arg2)
|
|||
if (strlen(arg2))
|
||||
filename = arg2;
|
||||
else {
|
||||
sprintf(buf, "%02X%02X", path.value[0], path.value[1]);
|
||||
filename = buf;
|
||||
sprintf((char *) buf, "%02X%02X", path.value[0], path.value[1]);
|
||||
filename = (char *) buf;
|
||||
}
|
||||
outf = fopen(filename, "r");
|
||||
if (outf == NULL) {
|
||||
|
|
Loading…
Reference in New Issue