Fix compiler warnings.
This commit is contained in:
parent
bc33a073d8
commit
27acb5d047
3 changed files with 7 additions and 7 deletions
|
@ -38,7 +38,7 @@ ecdsa_t *ecdsa_set_base64_public_key(const char *p) {
|
|||
int len = strlen(p);
|
||||
|
||||
if(len != 43) {
|
||||
logger(DEBUG_ALWAYS, LOG_ERR, "Invalid size %s for public key!", len);
|
||||
logger(DEBUG_ALWAYS, LOG_ERR, "Invalid size %d for public key!", len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -268,8 +268,8 @@ int sha512(const unsigned char *message, size_t message_len, unsigned char *out)
|
|||
{
|
||||
sha512_context ctx;
|
||||
int ret;
|
||||
if (ret = sha512_init(&ctx)) return ret;
|
||||
if (ret = sha512_update(&ctx, message, message_len)) return ret;
|
||||
if (ret = sha512_final(&ctx, out)) return ret;
|
||||
if ((ret = sha512_init(&ctx))) return ret;
|
||||
if ((ret = sha512_update(&ctx, message, message_len))) return ret;
|
||||
if ((ret = sha512_final(&ctx, out))) return ret;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ int main(int argc, char *argv[]) {
|
|||
ecdsa_write_pem_private_key(key, fp);
|
||||
fclose(fp);
|
||||
} else {
|
||||
fprintf(stderr, "Could not open '%s' for writing: %s\n", strerror(errno));
|
||||
fprintf(stderr, "Could not open '%s' for writing: %s\n", argv[1], strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ int main(int argc, char *argv[]) {
|
|||
ecdsa_write_pem_public_key(key, fp);
|
||||
fclose(fp);
|
||||
} else {
|
||||
fprintf(stderr, "Could not open '%s' for writing: %s\n", strerror(errno));
|
||||
fprintf(stderr, "Could not open '%s' for writing: %s\n", argv[2], strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue