Skip to content

Commit

Permalink
make_huffman_decode_table: avoid void pointer arithmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
maharmstone committed Jan 5, 2021
1 parent 21aa788 commit 9447d8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set(CMAKE_ASM_MASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL ""
if(MSVC)
target_compile_options(ntfs2btrfs PRIVATE /W4)
else()
target_compile_options(ntfs2btrfs PRIVATE -Wall -Wextra -Wno-address-of-packed-member -Wconversion -Wno-unknown-pragmas)
target_compile_options(ntfs2btrfs PRIVATE -Wall -Wextra -Wno-address-of-packed-member -Wconversion -Wno-unknown-pragmas -Werror=pointer-arith)
endif()

install(TARGETS ntfs2btrfs DESTINATION bin)
2 changes: 1 addition & 1 deletion src/ebiggers/decompress_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ make_huffman_decode_table(u16 decode_table[], unsigned num_syms,
u16 * const offsets = &working_space[1 * (max_codeword_len + 1)];
u16 * const sorted_syms = &working_space[2 * (max_codeword_len + 1)];
s32 remainder = 1;
void *entry_ptr = decode_table;
uint8_t *entry_ptr = decode_table;
unsigned codeword_len = 1;
unsigned sym_idx;
unsigned codeword;
Expand Down

0 comments on commit 9447d8a

Please sign in to comment.