Skip to content

Conversation

@ebiggers
Copy link
Owner

As reported at #416, deflate_compress.c is passing a pointer to unsigned int to a function that takes a pointer to u32. This is not compatible with unsigned int and u32 being different sizes, and was also reported to cause a compiler warning with arm-none-eabi-gcc (despite the types being the same size there).

Let's just consistently use u32 for match lengths and offsets instead of unsigned int. This is suboptimal when sizeof(unsigned int) == 2, but that case seems to be fairly dead and libdeflate has never worked there anyway.

As reported at #416,
deflate_compress.c is passing a pointer to unsigned int to a function
that takes a pointer to u32.  This is not compatible with unsigned int
and u32 being different sizes, and was also reported to cause a compiler
warning with arm-none-eabi-gcc (despite the types being the same size
there).

Let's just consistently use u32 for match lengths and offsets instead of
unsigned int.  This is suboptimal when sizeof(unsigned int) == 2, but
that case seems to be fairly dead and libdeflate has never worked there
anyway.
@ebiggers
Copy link
Owner Author

Merged manually.

@ebiggers ebiggers closed this Feb 24, 2025
@ebiggers ebiggers deleted the unsigned-int branch February 24, 2025 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants