From 57cc7f4c55e1954020f196592e0b0480d4d9325c Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 9 Oct 2019 19:11:28 -0700 Subject: [PATCH] Fixed compiler warnings --- miniz.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/miniz.h b/miniz.h index dab7e9ba..979eb655 100644 --- a/miniz.h +++ b/miniz.h @@ -849,7 +849,15 @@ typedef mz_bool (*tdefl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser // tdefl_compress_mem_to_output() compresses a block to an output stream. The above helpers use this function internally. MINIZ_STATIC mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags); -enum { TDEFL_MAX_HUFF_TABLES = 3, TDEFL_MAX_HUFF_SYMBOLS_0 = 288, TDEFL_MAX_HUFF_SYMBOLS_1 = 32, TDEFL_MAX_HUFF_SYMBOLS_2 = 19, TDEFL_LZ_DICT_SIZE = 32768, TDEFL_LZ_DICT_SIZE_MASK = TDEFL_LZ_DICT_SIZE - 1, TDEFL_MIN_MATCH_LEN = 3, TDEFL_MAX_MATCH_LEN = 258 }; +//enum { TDEFL_MAX_HUFF_TABLES = 3, TDEFL_MAX_HUFF_SYMBOLS_0 = 288, TDEFL_MAX_HUFF_SYMBOLS_1 = 32, TDEFL_MAX_HUFF_SYMBOLS_2 = 19, TDEFL_LZ_DICT_SIZE = 32768, TDEFL_LZ_DICT_SIZE_MASK = TDEFL_LZ_DICT_SIZE - 1, TDEFL_MIN_MATCH_LEN = 3, TDEFL_MAX_MATCH_LEN = 258 }; +#define TDEFL_MAX_HUFF_TABLES 3 +#define TDEFL_MAX_HUFF_SYMBOLS_0 288 +#define TDEFL_MAX_HUFF_SYMBOLS_1 32 +#define TDEFL_MAX_HUFF_SYMBOLS_2 19 +#define TDEFL_LZ_DICT_SIZE 32768 +#define TDEFL_LZ_DICT_SIZE_MASK ( TDEFL_LZ_DICT_SIZE - 1 ) +#define TDEFL_MIN_MATCH_LEN 3 +#define TDEFL_MAX_MATCH_LEN 258 // TDEFL_OUT_BUF_SIZE MUST be large enough to hold a single entire compressed output block (using static/fixed Huffman codes). #if TDEFL_LESS_MEMORY