diff options
author | Jeffrey Walton <noloader@gmail.com> | 2016-01-24 18:40:22 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2016-01-24 18:40:22 -0500 |
commit | 9d6e3ae6efad4dbd3c95d279440ed25152c2b300 (patch) | |
tree | c4ef8ab5c8ddb020462554df21ce423ac7d33fce /crc.cpp | |
parent | 9454c6ba2bca2bff70a38d61fa77df8b9f75877f (diff) | |
download | cryptopp-git-9d6e3ae6efad4dbd3c95d279440ed25152c2b300.tar.gz |
Cleared -Wcast-align (Issue 122)
Diffstat (limited to 'crc.cpp')
-rw-r--r-- | crc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -124,6 +124,7 @@ CRC32::CRC32() void CRC32::Update(const byte *s, size_t n)
{
+ assert(IsAlignedOn(s,GetAlignmentOf<word32>()));
word32 crc = m_crc;
for(; !IsAligned<word32>(s) && n > 0; n--)
@@ -131,7 +132,7 @@ void CRC32::Update(const byte *s, size_t n) while (n >= 4)
{
- crc ^= *(const word32 *)s;
+ crc ^= *(const word32 *)(void*)s;
crc = m_tab[CRC32_INDEX(crc)] ^ CRC32_SHIFTED(crc);
crc = m_tab[CRC32_INDEX(crc)] ^ CRC32_SHIFTED(crc);
crc = m_tab[CRC32_INDEX(crc)] ^ CRC32_SHIFTED(crc);
|