diff options
author | Jack Lloyd <[email protected]> | 2017-10-06 21:07:25 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-10-06 21:07:25 -0400 |
commit | aff93b716eda9d10be9f02e4b436b672510ab179 (patch) | |
tree | 12f992aac7cc20519cb3f643f793f1bb133d8ab0 /src/lib/block/camellia/camellia.cpp | |
parent | 1c539719f170df9c8acc6977da3c331c7e78cbf2 (diff) |
Address various GCC warnings
Things like -Wconversion and -Wuseless-cast that are noisy and
not on by default.
Diffstat (limited to 'src/lib/block/camellia/camellia.cpp')
-rw-r--r-- | src/lib/block/camellia/camellia.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/block/camellia/camellia.cpp b/src/lib/block/camellia/camellia.cpp index c737a0928..ea84fa313 100644 --- a/src/lib/block/camellia/camellia.cpp +++ b/src/lib/block/camellia/camellia.cpp @@ -613,11 +613,11 @@ inline uint64_t F(uint64_t v, uint64_t K) inline uint64_t FL(uint64_t v, uint64_t K) { - uint32_t x1 = (v >> 32); - uint32_t x2 = (v & 0xFFFFFFFF); + uint32_t x1 = static_cast<uint32_t>(v >> 32); + uint32_t x2 = static_cast<uint32_t>(v & 0xFFFFFFFF); - const uint32_t k1 = (K >> 32); - const uint32_t k2 = (K & 0xFFFFFFFF); + const uint32_t k1 = static_cast<uint32_t>(K >> 32); + const uint32_t k2 = static_cast<uint32_t>(K & 0xFFFFFFFF); x2 ^= rotate_left(x1 & k1, 1); x1 ^= (x2 | k2); @@ -627,11 +627,11 @@ inline uint64_t FL(uint64_t v, uint64_t K) inline uint64_t FLINV(uint64_t v, uint64_t K) { - uint32_t x1 = (v >> 32); - uint32_t x2 = (v & 0xFFFFFFFF); + uint32_t x1 = static_cast<uint32_t>(v >> 32); + uint32_t x2 = static_cast<uint32_t>(v & 0xFFFFFFFF); - const uint32_t k1 = (K >> 32); - const uint32_t k2 = (K & 0xFFFFFFFF); + const uint32_t k1 = static_cast<uint32_t>(K >> 32); + const uint32_t k2 = static_cast<uint32_t>(K & 0xFFFFFFFF); x1 ^= (x2 | k2); x2 ^= rotate_left(x1 & k1, 1); |