Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sinfl.h - Compilation error when compiling as C with MSVC #52

Open
cdmaczane opened this issue Feb 16, 2025 · 1 comment
Open

sinfl.h - Compilation error when compiling as C with MSVC #52

cdmaczane opened this issue Feb 16, 2025 · 1 comment

Comments

@cdmaczane
Copy link

Line 176 seems to be using a C++ cast (or whatever it is called) which fails to compile when compiling as C code.

The error is reported as:
sinfl.h(176,10): error C2143: syntax error: missing ';' before 'type'

Changing from return int(r); to return (int)r;, or even return r; fixes the error.

BTW, I was glad to find these deflate/inflate libraries that do exactly what I need without having to use libraries that dwarf the size of the rest of my application code. Permissive license is also very much appreciated, Thank you.

@cdmaczane
Copy link
Author

It looks like this error was introduced in the last pull request.

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

No branches or pull requests

1 participant