diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2021-05-15 07:40:14 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2021-05-15 07:40:14 -0700 |
commit | 66e87114a89f8d97c49ee5710c4d128ea4b358d1 (patch) | |
tree | 9a4dffbc66037ce0ef7827b6f35aa5262d5a97dd | |
parent | d953302012756ed0b9c7cdd81916bc1f28c3b7b7 (diff) | |
download | pigz-66e87114a89f8d97c49ee5710c4d128ea4b358d1.tar.gz |
Fix pre-C99 type usage.
-rw-r--r-- | pigz.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -367,9 +367,11 @@ # include <inttypes.h> // intmax_t, uintmax_t typedef uintmax_t length_t; typedef uint32_t crc_t; + typedef uint_least16_t index_t; #else typedef unsigned long length_t; typedef unsigned long crc_t; + typedef unsigned index_t; #endif #ifdef PIGZ_DEBUG @@ -3642,7 +3644,7 @@ local void unlzw(void) { // memory for unlzw() -- the first 256 entries of prefix[] and suffix[] are // never used, so could have offset the index but it's faster to waste a // little memory - uint_least16_t prefix[65536]; // index to LZW prefix string + index_t prefix[65536]; // index to LZW prefix string unsigned char suffix[65536]; // one-character LZW suffix unsigned char match[65280 + 2]; // buffer for reversed match @@ -3788,7 +3790,7 @@ local void unlzw(void) { // link new table entry if (end < mask) { end++; - prefix[end] = (uint_least16_t)prev; + prefix[end] = (index_t)prev; suffix[end] = (unsigned char)final; } |