Skip to content

Commit

Permalink
FIX: warning: incompatible pointer types assigning
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Dec 15, 2022
1 parent be4656b commit bda36af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/u-lzw.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ int lzw_compress (void (*dst)(int,void*), void *dstctx, int (*src)(void*), void
total_codes = 1 << maxbits;

mem = Make_Binary((total_codes * sizeof(encoder_entry_t)) - 1); // using -1, because Make_Binary adds 1!
dictionary = BIN_HEAD(mem);
dictionary = (encoder_entry_t *)BIN_HEAD(mem);
max_available_entries = total_codes - FIRST_STRING - 1;
max_available_code = total_codes - 2;

Expand Down Expand Up @@ -400,7 +400,7 @@ int lzw_decompress (void (*dst)(int,void*), void *dstctx, int (*src)(void*), voi

mem = Make_Binary((total_codes * sizeof(decoder_entry_t)) + (total_codes - 256) + (total_codes / 8) - 1);

dictionary = BIN_HEAD(mem);
dictionary = (decoder_entry_t *)BIN_HEAD(mem);
reverse_buffer = BIN_SKIP(mem, (total_codes * sizeof(decoder_entry_t)));
referenced = BIN_SKIP(mem, (total_codes * sizeof(decoder_entry_t)) + (total_codes - 256)); // bitfield indicating code is referenced at least once

Expand Down

0 comments on commit bda36af

Please sign in to comment.