From 51bb9a0064fa8ef70d75e130027895d4c97ed14a Mon Sep 17 00:00:00 2001 From: inikep Date: Wed, 2 Mar 2016 19:17:13 +0100 Subject: [PATCH] fix clang -Wcast-align warning --- lib/zstd_compress.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/zstd_compress.c b/lib/zstd_compress.c index 2eb1e6d2c..6a4cfe4cb 100644 --- a/lib/zstd_compress.c +++ b/lib/zstd_compress.c @@ -202,13 +202,13 @@ static size_t ZSTD_resetCCtx_advanced (ZSTD_CCtx* zc, zc->blockSize = blockSize; zc->seqStore.offsetStart = (U32*) (zc->seqStore.buffer); - zc->seqStore.offCodeStart = (BYTE*) (zc->seqStore.offsetStart + (blockSize>>2)); + zc->seqStore.offCodeStart = (BYTE*) (zc->seqStore.offsetStart) + blockSize; zc->seqStore.litStart = zc->seqStore.offCodeStart + (blockSize>>2); zc->seqStore.litLengthStart = zc->seqStore.litStart + blockSize; zc->seqStore.matchLengthStart = zc->seqStore.litLengthStart + (blockSize>>2); - zc->seqStore.dumpsStart = zc->seqStore.matchLengthStart + (blockSize>>2); - - zc->seqStore.litFreq = (U32*)(zc->seqStore.dumpsStart + (blockSize>>2)); + zc->seqStore.dumpsStart = zc->seqStore.matchLengthStart + (blockSize>>2); + BYTE* dumpsEnd = zc->seqStore.dumpsStart + (blockSize>>2); + zc->seqStore.litFreq = (U32*)(dumpsEnd); zc->seqStore.litLengthFreq = zc->seqStore.litFreq + (1<seqStore.matchLengthFreq = zc->seqStore.litLengthFreq + (1<seqStore.offCodeFreq = zc->seqStore.matchLengthFreq + (1<