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

mz_version() defined without prototype, causing warning, when MINIZ_NO_ZLIB_APIS defined #290

Open
snej opened this issue Nov 15, 2023 · 0 comments

Comments

@snej
Copy link

snej commented Nov 15, 2023

If MINIZ_NO_ZLIB_APIS is defined, the prototype for mz_version is skipped but the definition isn’t, leading to the following warning or error in Clang when -Wmissing-prototypes is enabled:

miniz/miniz.c:182:13: error: no previous prototype for function 'mz_version' [-Werror,-Wmissing-prototypes]
const char *mz_version(void)
            ^

Looks like this can be fixed by moving the following line #ifndef MINIZ_NO_ZLIB_APIS up above this definition.

[I am building the current master, i.e. commit 18795fa, on macOS with Xcode 15.0.]

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