diff options
author | Marcel Raad <MarcelRaad@users.noreply.github.com> | 2019-01-02 18:05:26 +0100 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-01-02 12:05:26 -0500 |
commit | 1a4b851ac170b16c9d07c73d387386a6883d938c (patch) | |
tree | d4c73898bc0f767c868c32b756f71a060dd004ab /secblock.h | |
parent | da2444d243ddcc211a0107740faae7401c3de773 (diff) | |
download | cryptopp-git-1a4b851ac170b16c9d07c73d387386a6883d938c.tar.gz |
Fix clang warnings (GH #771)
Diffstat (limited to 'secblock.h')
-rw-r--r-- | secblock.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -421,7 +421,7 @@ public: CRYPTOPP_ASSERT(size <= S);
CRYPTOPP_ASSERT(m_allocated);
m_allocated = false;
- SecureWipeArray((pointer)ptr, size);
+ SecureWipeArray(reinterpret_cast<pointer>(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<T*>(static_cast<void*>((reinterpret_cast<byte*>(m_array)) + (0-reinterpret_cast<size_t>(m_array))%16));
// Verify the 16-byte alignment
CRYPTOPP_ASSERT(IsAlignedOn(p_array, 16));
// Verify allocated array with pad is large enough.
|