From 350a47f8b38c0541a87ca71913667eebc365ba5c Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 1 Jul 2018 08:09:54 -0400 Subject: [PATCH] Clear unused variable warnings --- lea-simd.cpp | 19 +++++++++++++++++-- simeck-simd.cpp | 6 ++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/lea-simd.cpp b/lea-simd.cpp index 9394dff3..af882ba8 100644 --- a/lea-simd.cpp +++ b/lea-simd.cpp @@ -599,11 +599,21 @@ inline __m128i LoadKey(const word32 rkey[]) return _mm_castps_si128(_mm_load_ps1(&rk)); } +/// \brief Unpack XMM words +/// \tparam IDX the element from each XMM word +/// \param a the first XMM word +/// \param b the second XMM word +/// \param c the third XMM word +/// \param d the fourth XMM word +/// \details UnpackXMM selects the IDX element from a, b, c, d and returns a concatenation +/// equivalent to a[IDX] || b[IDX] || c[IDX] || d[IDX]. template inline __m128i UnpackXMM(const __m128i& a, const __m128i& b, const __m128i& c, const __m128i& d) { // Should not be instantiated - CRYPTOPP_ASSERT(0);; + CRYPTOPP_UNUSED(a); CRYPTOPP_UNUSED(b); + CRYPTOPP_UNUSED(c); CRYPTOPP_UNUSED(d); + CRYPTOPP_ASSERT(0); return _mm_setzero_si128(); } @@ -643,11 +653,16 @@ inline __m128i UnpackXMM<3>(const __m128i& a, const __m128i& b, const __m128i& c return _mm_unpackhi_epi64(r1, r2); } +/// \brief Unpack a XMM word +/// \tparam IDX the element from each XMM word +/// \param v the first XMM word +/// \details UnpackXMM selects the IDX element from v and returns a concatenation +/// equivalent to v[IDX] || v[IDX] || v[IDX] || v[IDX]. template inline __m128i UnpackXMM(const __m128i& v) { // Should not be instantiated - CRYPTOPP_ASSERT(0);; + CRYPTOPP_UNUSED(v); CRYPTOPP_ASSERT(0); return _mm_setzero_si128(); } diff --git a/simeck-simd.cpp b/simeck-simd.cpp index 57c1d0d5..7f10315a 100644 --- a/simeck-simd.cpp +++ b/simeck-simd.cpp @@ -86,7 +86,9 @@ template inline __m128i UnpackXMM(const __m128i& a, const __m128i& b, const __m128i& c, const __m128i& d) { // Should not be instantiated - CRYPTOPP_ASSERT(0);; + CRYPTOPP_UNUSED(a); CRYPTOPP_UNUSED(b); + CRYPTOPP_UNUSED(c); CRYPTOPP_UNUSED(d); + CRYPTOPP_ASSERT(0); return _mm_setzero_si128(); } @@ -135,7 +137,7 @@ template inline __m128i UnpackXMM(const __m128i& v) { // Should not be instantiated - CRYPTOPP_ASSERT(0);; + CRYPTOPP_UNUSED(v); CRYPTOPP_ASSERT(0); return _mm_setzero_si128(); }