]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fix clang -Wcast-align warning (part 2) 138/head
authorinikep <inikep@gmail.com>
Wed, 2 Mar 2016 19:37:49 +0000 (20:37 +0100)
committerinikep <inikep@gmail.com>
Wed, 2 Mar 2016 19:37:49 +0000 (20:37 +0100)
lib/zstd_compress.c

index 6a4cfe4cb80f2afa24c8f407d8e70bf062b90c4d..50fa2fdc26537879d9beb36bcb3c43173d1060bb 100644 (file)
@@ -207,8 +207,8 @@ static size_t ZSTD_resetCCtx_advanced (ZSTD_CCtx* zc,
     zc->seqStore.litLengthStart =  zc->seqStore.litStart + blockSize;
     zc->seqStore.matchLengthStart = zc->seqStore.litLengthStart + (blockSize>>2);
     zc->seqStore.dumpsStart = zc->seqStore.matchLengthStart + (blockSize>>2);
-    BYTE* dumpsEnd = zc->seqStore.dumpsStart + (blockSize>>2);
-    zc->seqStore.litFreq = (U32*)(dumpsEnd);
+
+    zc->seqStore.litFreq = (U32*)((void*)(zc->seqStore.dumpsStart + (blockSize>>2)));
     zc->seqStore.litLengthFreq = zc->seqStore.litFreq + (1<<Litbits);
     zc->seqStore.matchLengthFreq = zc->seqStore.litLengthFreq + (1<<LLbits);
     zc->seqStore.offCodeFreq = zc->seqStore.matchLengthFreq + (1<<MLbits);