From d17de78fb32ce54db67efd793473f7631e8dc41c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 20 Sep 2016 21:07:41 +0200 Subject: [PATCH] Try to solve coverity issue ID 112920 --- deps/7zip/7zCrc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deps/7zip/7zCrc.c b/deps/7zip/7zCrc.c index 6e2f47c90b..0e95f17a34 100644 --- a/deps/7zip/7zCrc.c +++ b/deps/7zip/7zCrc.c @@ -63,12 +63,14 @@ void MY_FAST_CALL CrcGenerateTable(void) #else for (; i < 256 * CRC_NUM_TABLES; i++) { - uint32_t r = g_CrcTable[i - 256]; + uint32_t r = g_CrcTable[i - 256]; g_CrcTable[i] = g_CrcTable[r & 0xFF] ^ (r >> 8); } - g_CrcUpdate = CrcUpdateT4; + #ifdef MY_CPU_X86_OR_AMD64 g_CrcUpdate = CrcUpdateT8; +#else + g_CrcUpdate = CrcUpdateT4; #endif #endif }