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_os_posix.c - fix warning caused by missing cast of return value of strdup #709

Merged
merged 4 commits into from
Jun 8, 2023

Conversation

ptc-tgamper
Copy link
Contributor

I have run into #705, too.
Here is a fix.

@nmoinvaz
Copy link
Member

nmoinvaz commented Jun 7, 2023

I think it would be better to change the return type to char *. Not sure why I had it at uint8_t *.

@ptc-tgamper
Copy link
Contributor Author

It seems all functions that deal with UTF-8 strings use uint8_t*. I must admit I like that because it explicitly tells me that all bits of the byte are relevant for the character.
I can have a look at generally changing the UTF-8 strings to use char*, but that means changing the code of the Win32 implementation, too.

mz_os.h Show resolved Hide resolved
mz_os.h Show resolved Hide resolved
@ptc-tgamper
Copy link
Contributor Author

CI failure is caused by https://git.tukaani.org/xz.git/ not responding

@nmoinvaz
Copy link
Member

nmoinvaz commented Jun 8, 2023

LGTM

@nmoinvaz nmoinvaz merged commit 83301fc into zlib-ng:develop Jun 8, 2023
@nmoinvaz nmoinvaz added the warning fix Compiler warning silencing label Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
warning fix Compiler warning silencing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants