diff options
author | teor <teor2345@gmail.com> | 2014-10-26 14:43:55 +1100 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2014-10-30 22:34:46 +1100 |
commit | 13298d90a90dc62d21d38f910171c9b57a8f0273 (patch) | |
tree | df91745009bef0a26901438d361036f039e9b00f /src/common/crypto_pwbox.c | |
parent | acc392856d255059949bb22d2daf56c61f3fd76d (diff) | |
download | tor-13298d90a90dc62d21d38f910171c9b57a8f0273.tar.gz tor-13298d90a90dc62d21d38f910171c9b57a8f0273.zip |
Silence spurious clang warnings
Silence clang warnings under --enable-expensive-hardening, including:
+ implicit truncation of 64 bit values to 32 bit;
+ const char assignment to self;
+ tautological compare; and
+ additional parentheses around equality tests. (gcc uses these to
silence assignment, so clang warns when they're present in an
equality test. But we need to use extra parentheses in macros to
isolate them from other code).
Diffstat (limited to 'src/common/crypto_pwbox.c')
-rw-r--r-- | src/common/crypto_pwbox.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/crypto_pwbox.c b/src/common/crypto_pwbox.c index 91659db2bc..b866c7ef39 100644 --- a/src/common/crypto_pwbox.c +++ b/src/common/crypto_pwbox.c @@ -62,7 +62,7 @@ crypto_pwbox(uint8_t **out, size_t *outlen_out, pwbox_encoded_setlen_data(enc, encrypted_len); encrypted_portion = pwbox_encoded_getarray_data(enc); - set_uint32(encrypted_portion, htonl(input_len)); + set_uint32(encrypted_portion, htonl((uint32_t)input_len)); memcpy(encrypted_portion+4, input, input_len); /* Now that all the data is in position, derive some keys, encrypt, and |