aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-11-04 15:24:30 -0400
committerNick Mathewson <nickm@torproject.org>2016-11-04 15:24:30 -0400
commitf45a581486197fb71c166f130b9b4cb0ad42ceff (patch)
tree2c18d119380db33404d94abf696145421a066df3 /src/or
parentc1bbc8405b8f1624d008688627303911b93e7fb0 (diff)
downloadtor-f45a581486197fb71c166f130b9b4cb0ad42ceff.tar.gz
tor-f45a581486197fb71c166f130b9b4cb0ad42ceff.zip
Fix some 32-bit warnings and clang warnings
Diffstat (limited to 'src/or')
-rw-r--r--src/or/hs_descriptor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/hs_descriptor.c b/src/or/hs_descriptor.c
index 92e523e37d..7c5d204ef3 100644
--- a/src/or/hs_descriptor.c
+++ b/src/or/hs_descriptor.c
@@ -1057,7 +1057,7 @@ encrypted_data_length_is_valid(size_t len)
if (len < HS_DESC_ENCRYPTED_MIN_LEN) {
log_warn(LD_REND, "Length of descriptor's encrypted data is too small. "
"Got %lu but minimum value is %d",
- len, HS_DESC_ENCRYPTED_MIN_LEN);
+ (unsigned long)len, HS_DESC_ENCRYPTED_MIN_LEN);
goto err;
}
@@ -1069,7 +1069,7 @@ encrypted_data_length_is_valid(size_t len)
if (len % HS_DESC_PLAINTEXT_PADDING_MULTIPLE) {
log_warn(LD_REND, "Length of descriptor's encrypted data is invalid. "
"Got %lu which is not a multiple of %d.",
- len, HS_DESC_PLAINTEXT_PADDING_MULTIPLE);
+ (unsigned long) len, HS_DESC_PLAINTEXT_PADDING_MULTIPLE);
goto err;
}
@@ -1121,7 +1121,7 @@ desc_decrypt_data_v3(const hs_descriptor_t *desc, char **decrypted_out)
if (desc_mac_size != DIGEST256_LEN) {
log_warn(LD_REND, "Service descriptor MAC length of encrypted data "
"is invalid (%lu, expected %u)",
- desc_mac_size, DIGEST256_LEN);
+ (unsigned long) desc_mac_size, DIGEST256_LEN);
goto err;
}
}
@@ -1419,7 +1419,7 @@ desc_sig_is_valid(const char *b64_sig, const ed25519_keypair_t *signing_kp,
if (strlen(b64_sig) != ED25519_SIG_BASE64_LEN) {
log_warn(LD_REND, "Service descriptor has an invalid signature length."
"Exptected %d but got %lu",
- ED25519_SIG_BASE64_LEN, strlen(b64_sig));
+ ED25519_SIG_BASE64_LEN, (unsigned long) strlen(b64_sig));
goto err;
}
@@ -1733,7 +1733,7 @@ hs_desc_decode_plaintext(const char *encoded,
encoded_len = strlen(encoded);
if (encoded_len >= HS_DESC_MAX_LEN) {
log_warn(LD_REND, "Service descriptor is too big (%lu bytes)",
- encoded_len);
+ (unsigned long) encoded_len);
goto err;
}