mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
CHG: removed warnings %zu size_t
This commit is contained in:
parent
20e9931b63
commit
f01bc31486
4 changed files with 8 additions and 8 deletions
|
@ -215,7 +215,7 @@ static unsigned char *crypto_pk_polarssl_encrypt(const struct crypto_pk *_cp, co
|
|||
|
||||
res = rsa_public(&cp->ctx, buf, result);
|
||||
if(res) {
|
||||
printf("RSA encrypt failed. Error: %x data len: %d key len: %d\n", res * -1, len, keylen);
|
||||
printf("RSA encrypt failed. Error: %x data len: %zu key len: %zu\n", res * -1, len, keylen);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -241,7 +241,7 @@ static unsigned char *crypto_pk_polarssl_decrypt(const struct crypto_pk *_cp, co
|
|||
|
||||
res = rsa_private(&cp->ctx, buf, result); // CHECK???
|
||||
if(res) {
|
||||
printf("RSA decrypt failed. Error: %x data len: %d key len: %d\n", res * -1, len, keylen);
|
||||
printf("RSA decrypt failed. Error: %x data len: %zu key len: %zu\n", res * -1, len, keylen);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ static unsigned char *emv_pki_decode_message(const struct emv_pk *enc_pk,
|
|||
}
|
||||
|
||||
if (cert_tlv->len != enc_pk->mlen) {
|
||||
printf("ERROR: Certificate length (%d) not equal key length (%d)\n", cert_tlv->len, enc_pk->mlen);
|
||||
printf("ERROR: Certificate length (%d) not equal key length (%zu)\n", cert_tlv->len, enc_pk->mlen);
|
||||
return NULL;
|
||||
}
|
||||
kcp = crypto_pk_open(enc_pk->pk_algo,
|
||||
|
@ -451,7 +451,7 @@ struct tlvdb *emv_pki_perform_cda_ex(const struct emv_pk *enc_pk, const struct t
|
|||
un_tlv,
|
||||
NULL);
|
||||
if (!data || data_len < 3) {
|
||||
printf("ERROR: can't decode message. len %d\n", data_len);
|
||||
printf("ERROR: can't decode message. len %zu\n", data_len);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ static int test_pk(bool verbose)
|
|||
|
||||
tmp = crypto_pk_get_parameter(pubk, 0, &tmp_len);
|
||||
if (tmp_len != sizeof(pk_N) || memcmp(tmp, pk_N, tmp_len)) {
|
||||
fprintf(stderr, "ERROR: crypto_pk_get_parameter(0) Modulus. param len %d len %zu\n", tmp_len, sizeof(pk_N));
|
||||
fprintf(stderr, "ERROR: crypto_pk_get_parameter(0) Modulus. param len %zu len %zu\n", tmp_len, sizeof(pk_N));
|
||||
free(tmp);
|
||||
goto close_pub;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ static int test_pk(bool verbose)
|
|||
|
||||
tmp = crypto_pk_get_parameter(privk, 0, &tmp_len);
|
||||
if (tmp_len != sizeof(pk_N) || memcmp(tmp, pk_N, tmp_len)) {
|
||||
fprintf(stderr, "ERROR: crypto_pk_get_parameter(0) Modulus. param len %d len %zu\n", tmp_len, sizeof(pk_N));
|
||||
fprintf(stderr, "ERROR: crypto_pk_get_parameter(0) Modulus. param len %zu len %zu\n", tmp_len, sizeof(pk_N));
|
||||
free(tmp);
|
||||
goto close;
|
||||
}
|
||||
|
|
|
@ -586,7 +586,7 @@ int param_getstr(const char *line, int paramnum, char * str, size_t buffersize)
|
|||
|
||||
// Prevent out of bounds errors
|
||||
if (en - bg + 1 >= buffersize) {
|
||||
printf("out of bounds error: want %d bytes have %u bytes\n", en - bg + 1 + 1, buffersize);
|
||||
printf("out of bounds error: want %d bytes have %zu bytes\n", en - bg + 1 + 1, buffersize);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -622,7 +622,7 @@ int hextobinarray(char *target, char *source)
|
|||
else if (x >= 'A' && x <= 'F')
|
||||
x -= 'A' - 10;
|
||||
else {
|
||||
printf("Discovered unknown character %c %d at idx %d of %s\n", x, x, source - start, start);
|
||||
printf("Discovered unknown character %c %d at idx % " PRId32 " of %s\n", x, x, source - start, start);
|
||||
return 0;
|
||||
}
|
||||
// output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue