summaryrefslogtreecommitdiff
path: root/secblock.h
diff options
context:
space:
mode:
authorMarcel Raad <MarcelRaad@users.noreply.github.com>2019-01-02 18:05:26 +0100
committerJeffrey Walton <noloader@gmail.com>2019-01-02 12:05:26 -0500
commit1a4b851ac170b16c9d07c73d387386a6883d938c (patch)
treed4c73898bc0f767c868c32b756f71a060dd004ab /secblock.h
parentda2444d243ddcc211a0107740faae7401c3de773 (diff)
downloadcryptopp-git-1a4b851ac170b16c9d07c73d387386a6883d938c.tar.gz
Fix clang warnings (GH #771)
Diffstat (limited to 'secblock.h')
-rw-r--r--secblock.h4
1 files changed, 2 insertions, 2 deletions
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<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.