Compiler warning fixups for various compilers
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@180 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
45a37df2f6
commit
6d533a1c3d
@ -60,9 +60,8 @@ void debug(struct sc_context *ctx, const char *format, ...);
|
||||
|
||||
void do_log(struct sc_context *ctx, int facility, const char *file,
|
||||
int line, const char *func, const char *format, ...);
|
||||
void do_log2(struct sc_context *ctx, int facility, const char *file,
|
||||
int line, const char *func, const char *format,
|
||||
va_list args);
|
||||
void do_log2(struct sc_context *ctx, int type, const char *file,
|
||||
int line, const char *func, const char *format, va_list args);
|
||||
|
||||
void sc_hex_dump(struct sc_context *ctx, const u8 *buf, size_t len,
|
||||
char *out, size_t outlen);
|
||||
|
@ -804,7 +804,7 @@ int sc_pkcs15_create(struct sc_pkcs15_card *p15card, struct sc_card *card)
|
||||
int r, i;
|
||||
u8 *tokinf_buf = NULL, *odf_buf = NULL;
|
||||
size_t tokinf_size, odf_size;
|
||||
u8 line[10240];
|
||||
char line[10240];
|
||||
|
||||
sc_format_path("3F0050155031", &p15card->file_odf.path);
|
||||
sc_format_path("3F0050155032", &p15card->file_tokeninfo.path);
|
||||
|
@ -60,9 +60,8 @@ void debug(struct sc_context *ctx, const char *format, ...);
|
||||
|
||||
void do_log(struct sc_context *ctx, int facility, const char *file,
|
||||
int line, const char *func, const char *format, ...);
|
||||
void do_log2(struct sc_context *ctx, int facility, const char *file,
|
||||
int line, const char *func, const char *format,
|
||||
va_list args);
|
||||
void do_log2(struct sc_context *ctx, int type, const char *file,
|
||||
int line, const char *func, const char *format, va_list args);
|
||||
|
||||
void sc_hex_dump(struct sc_context *ctx, const u8 *buf, size_t len,
|
||||
char *out, size_t outlen);
|
||||
|
@ -90,7 +90,7 @@ int verify_pin(int pin)
|
||||
return -2;
|
||||
}
|
||||
memset(pinbuf, 0, sizeof(pinbuf));
|
||||
strncpy(pinbuf, pass, sizeof(pinbuf));
|
||||
strncpy((char *) pinbuf, pass, sizeof(pinbuf));
|
||||
memset(pass, 0, strlen(pass));
|
||||
}
|
||||
if (pin == 1)
|
||||
@ -109,7 +109,7 @@ int verify_pin(int pin)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int select_app_df()
|
||||
int select_app_df(void)
|
||||
{
|
||||
struct sc_path path;
|
||||
struct sc_file file;
|
||||
@ -396,7 +396,7 @@ int read_private_key(RSA *rsa)
|
||||
return parse_private_key(p, keysize, rsa);
|
||||
}
|
||||
|
||||
int read_key()
|
||||
int read_key(void)
|
||||
{
|
||||
RSA *rsa = RSA_new();
|
||||
u8 buf[1024], *p = buf;
|
||||
@ -441,7 +441,7 @@ int read_key()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int list_keys()
|
||||
int list_keys(void)
|
||||
{
|
||||
int r, i, idx = 0;
|
||||
struct sc_path path;
|
||||
@ -483,7 +483,7 @@ int list_keys()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int generate_key()
|
||||
int generate_key(void)
|
||||
{
|
||||
struct sc_apdu apdu;
|
||||
u8 sbuf[4];
|
||||
@ -540,7 +540,7 @@ int generate_key()
|
||||
return 1;
|
||||
}
|
||||
|
||||
int create_key_files()
|
||||
int create_key_files(void)
|
||||
{
|
||||
struct sc_file file;
|
||||
int mod_lens[] = { 512, 768, 1024, 2048 };
|
||||
@ -804,7 +804,7 @@ int update_private_key(const u8 *key, size_t keysize)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int store_key()
|
||||
int store_key(void)
|
||||
{
|
||||
u8 prv[1024], pub[1024];
|
||||
size_t prvsize, pubsize;
|
||||
|
@ -409,7 +409,7 @@ int do_create(const char *arg, const char *arg2)
|
||||
{
|
||||
struct sc_path path;
|
||||
struct sc_file file;
|
||||
int size;
|
||||
unsigned int size;
|
||||
int i;
|
||||
|
||||
if (arg_to_path(arg, &path) != 0)
|
||||
@ -436,7 +436,7 @@ int do_mkdir(const char *arg, const char *arg2)
|
||||
{
|
||||
struct sc_path path;
|
||||
struct sc_file file;
|
||||
size_t size;
|
||||
unsigned int size;
|
||||
int i;
|
||||
|
||||
if (arg_to_path(arg, &path) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user