summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-09-08 12:14:45 -0300
committerThiago Macieira <thiago.macieira@intel.com>2015-09-22 22:46:27 +0000
commitaf6467c5328492e34f7f346d6a5a32badd963431 (patch)
treecd84b38ab01a56b5053195084cd8e12a2eaf7485 /src/3rdparty
parent3d7586b760550b7d89594c8d7462fc30b868ecc6 (diff)
Fix some -Wcast-qual warnings
This is happening in code I don't usually test (32-bit, non-ICU, etc.) KeccakF-1600-opt32.c:481:22: error: cast from type 'const unsigned char*' to type 'UINT32* {aka unsigned int*}' casts away qualifiers [-Werror=cast-qual] KeccakF-1600-opt32.c:217:62: note: in definition of macro 'extractLanes' Change-Id: I42e7ef1a481840699a8dffff140209823301a07a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/sha3/KeccakF-1600-opt32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/3rdparty/sha3/KeccakF-1600-opt32.c b/src/3rdparty/sha3/KeccakF-1600-opt32.c
index 4e32dca9cb..7d8ae6e19c 100644
--- a/src/3rdparty/sha3/KeccakF-1600-opt32.c
+++ b/src/3rdparty/sha3/KeccakF-1600-opt32.c
@@ -191,10 +191,10 @@ static UINT64 fromInterleaving(UINT64 x)
return x;
}
-static void setInterleavedWordsInto8bytes(UINT8* dest, UINT32* evenAndOdd)
+static void setInterleavedWordsInto8bytes(UINT8* dest, const UINT32* evenAndOdd)
{
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
- ((UINT64*)dest)[0] = fromInterleaving(*(UINT64*)evenAndOdd);
+ ((UINT64*)dest)[0] = fromInterleaving(*(const UINT64*)evenAndOdd);
#else // (PLATFORM_BYTE_ORDER == IS_BIG_ENDIAN)
// This can be optimized
UINT64 evenAndOddWord = (UINT64)evenAndOdd[0] ^ ((UINT64)evenAndOdd[1] << 32);
@@ -214,7 +214,7 @@ static void setInterleavedWordsInto8bytes(UINT8* dest, UINT32* evenAndOdd)
{ \
unsigned i; \
for(i=0; i<(laneCount); i++) \
- setInterleavedWordsInto8bytes(data+i*8, (UINT32*)state+i*2); \
+ setInterleavedWordsInto8bytes(data+i*8, (const UINT32*)state+i*2); \
}
#endif // With or without interleaving tables