From 1a4b851ac170b16c9d07c73d387386a6883d938c Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Wed, 2 Jan 2019 18:05:26 +0100 Subject: Fix clang warnings (GH #771) --- secblock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'secblock.h') diff --git a/secblock.h b/secblock.h index ba70b487..37c9c3fb 100644 --- a/secblock.h +++ b/secblock.h @@ -421,7 +421,7 @@ public: CRYPTOPP_ASSERT(size <= S); CRYPTOPP_ASSERT(m_allocated); m_allocated = false; - SecureWipeArray((pointer)ptr, size); + SecureWipeArray(reinterpret_cast(ptr), size); } else m_fallbackAllocator.deallocate(ptr, size); @@ -503,7 +503,7 @@ private: // The library is OK but users may hit it. So we need to guard // for a large T, and that is what PAD achieves. T* GetAlignedArray() { - T* p_array = (T*)(void*)(((byte*)m_array) + (0-(size_t)m_array)%16); + T* p_array = reinterpret_cast(static_cast((reinterpret_cast(m_array)) + (0-reinterpret_cast(m_array))%16)); // Verify the 16-byte alignment CRYPTOPP_ASSERT(IsAlignedOn(p_array, 16)); // Verify allocated array with pad is large enough. -- cgit v1.2.1