diff options
author | Jack Lloyd <[email protected]> | 2016-10-09 07:47:39 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-10-09 07:47:39 -0400 |
commit | 8521658302b5170469339b93f54490a79473a8d0 (patch) | |
tree | 1a33c09966a6a60b4f3f0cf57e0042a745f203d3 /src/lib | |
parent | 27a6d112f00f7bb27aba2049068930735d737737 (diff) |
Fix Clang warnings
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/pubkey/curve25519/donna.cpp | 4 | ||||
-rw-r--r-- | src/lib/utils/cpuid.h | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/pubkey/curve25519/donna.cpp b/src/lib/pubkey/curve25519/donna.cpp index a0e4d249f..86b92b0bf 100644 --- a/src/lib/pubkey/curve25519/donna.cpp +++ b/src/lib/pubkey/curve25519/donna.cpp @@ -374,8 +374,8 @@ cmult(limb *resultx, limb *resultz, const u8 *n, const limb *q) { swap_conditional(nqx, nqpqx, bit); swap_conditional(nqz, nqpqz, bit); - fmonty_out_t result { nqx2, nqz2, nqpqx2, nqpqz2 }; - fmonty_in_t in { nqx, nqz, nqpqx, nqpqz, q }; + fmonty_out_t result { {nqx2, nqz2}, {nqpqx2, nqpqz2} }; + fmonty_in_t in { { nqx, nqz }, { nqpqx, nqpqz }, q }; fmonty(result, in); swap_conditional(nqx2, nqpqx2, bit); swap_conditional(nqz2, nqpqz2, bit); diff --git a/src/lib/utils/cpuid.h b/src/lib/utils/cpuid.h index 4e276fabe..53e59e9e5 100644 --- a/src/lib/utils/cpuid.h +++ b/src/lib/utils/cpuid.h @@ -170,7 +170,6 @@ class BOTAN_DLL CPUID */ static void clear_cpuid_bit(CPUID_bits bit) { - BOTAN_ASSERT(bit < 128, "CPUID bit within bounds"); const uint64_t mask = ~(static_cast<uint64_t>(1) << (bit % 64)); g_processor_flags[bit/64] &= mask; } @@ -180,7 +179,6 @@ class BOTAN_DLL CPUID if(!g_initialized) initialize(); const size_t bit = static_cast<size_t>(elem); - BOTAN_ASSERT(bit < 128, "CPUID bit within bounds"); return ((g_processor_flags[bit/64] >> (bit % 64)) & 1); } |