From b3d46ae07fc04609cd7335ab5d06b01f269e7719 Mon Sep 17 00:00:00 2001 From: Gabe Jones Date: Tue, 15 Jun 2021 12:09:14 -0500 Subject: Cast ALLOC return value to satisfy C++ --- lib/lz4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lz4.c b/lib/lz4.c index 62a6f6c..405e977 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -1359,7 +1359,7 @@ int LZ4_compress_fast(const char* source, char* dest, int inputSize, int maxOutp { int result; #if (LZ4_HEAPMODE) - LZ4_stream_t* ctxPtr = ALLOC(sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ + LZ4_stream_t* ctxPtr = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ if (ctxPtr == NULL) return 0; #else LZ4_stream_t ctx; -- cgit v0.12