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

Fix simple warnings #74

Merged
merged 1 commit into from
Apr 19, 2024
Merged

Conversation

GravisZro
Copy link
Contributor

Most of these warnings are due to the use of NULL instead of 0 or NULL instead of '\0'. Some are macro redefinitions. None of them are pointer storage related. Those will be in another PR.

Most of these warnings are due to the use of NULL instead of 0 or NULL instead of '\0'.
Some are macro redefinitions. None of them are pointer storage related. Those will be
in another PR.
@Arcnor
Copy link
Collaborator

Arcnor commented Apr 18, 2024

Can you use nullptr instead of \0?

@GravisZro
Copy link
Contributor Author

GravisZro commented Apr 18, 2024

Neither NULL nor nullptr are characters. '\0' is a character, so no, I cannot use nullptr.

@Arcnor
Copy link
Collaborator

Arcnor commented Apr 18, 2024

Oh, this is assigning null terminators to strings, I see. Not sure why there are so many instances of that, though.

@winterheart
Copy link
Collaborator

Is there more secure way to do that with memset?

@GravisZro
Copy link
Contributor Author

@winterheart Honestly, all the string building/manipulation code is obsolete garbage that needs to be replaced. At this point, I'm merely clearing up warning messages so that I can make a sane build before making major changes.

@Lgt2x Lgt2x self-assigned this Apr 19, 2024
@Lgt2x
Copy link
Member

Lgt2x commented Apr 19, 2024

I still have some implicit conversion of NULL constant to 'char' in some places, but certainly fewer. Thanks!

@Lgt2x Lgt2x merged commit 21fb443 into DescentDevelopers:main Apr 19, 2024
8 checks passed
JeodC pushed a commit that referenced this pull request Apr 28, 2024
Fix build warnings (NULL instead of '\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

Successfully merging this pull request may close these issues.

4 participants