From 10e3eecc566440eaad65a74063527d194ec0133a Mon Sep 17 00:00:00 2001 From: Irwan Djajadi Date: Tue, 19 Apr 2016 15:01:35 -0500 Subject: fixed non-C99 compiler --- lib/lz4.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/lz4.c b/lib/lz4.c index 5f8359e..55b5089 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -684,12 +684,13 @@ int LZ4_compress_fast(const char* source, char* dest, int inputSize, int maxOutp LZ4_stream_t ctx; void* ctxPtr = &ctx; #endif + int result; #if (HEAPMODE) if (!ctxPtr) { return 0; } #endif - int result = LZ4_compress_fast_extState(ctxPtr, source, dest, inputSize, maxOutputSize, acceleration); + result = LZ4_compress_fast_extState(ctxPtr, source, dest, inputSize, maxOutputSize, acceleration); #if (HEAPMODE) FREEMEM(ctxPtr); @@ -829,7 +830,7 @@ _next_match: /* Match description too long : reduce it */ matchLength = (15-1) + (oMaxMatch-op) * 255; } - //printf("offset %5i, matchLength%5i \n", (int)(ip-match), matchLength + MINMATCH); + /*printf("offset %5i, matchLength%5i \n", (int)(ip-match), matchLength + MINMATCH);*/ ip += MINMATCH + matchLength; if (matchLength>=ML_MASK) @@ -921,12 +922,13 @@ int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targe LZ4_stream_t ctxBody; void* ctx = &ctxBody; #endif + int result; #if (HEAPMODE) if (!ctx) { return 0; } #endif - int result = LZ4_compress_destSize_extState(ctx, src, dst, srcSizePtr, targetDstSize); + result = LZ4_compress_destSize_extState(ctx, src, dst, srcSizePtr, targetDstSize); #if (HEAPMODE) FREEMEM(ctx); -- cgit v0.12