Skip to content

comply with -Wall #110

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

applemayexist
Copy link
Contributor

@applemayexist applemayexist commented Nov 23, 2024

Make Vanilla comply with -Wall. This has obvious benefits (it will catch trivial dumb bugs), and is a pretty standard baseline from what I've seen. No behaviour was really fixed (most of the issues were just using unsigned char with char1, or unused variables), except for printf(3) statements that had incorrect parameters and such.

This also adds __attribute__((format)) to the printf wrappers. See the first commit for more details.

Footnotes

  1. I have just used uint8_t to leave char to the domain of text, instead of bytes.

__attribute__((format(printf, ...))) tells compilers and linters that this
function takes printf style arguments, and allows them to check if there are
parameters missing, too many parameters, or parameters of incorrect type
see HEAD~2 for details
@itsmattkc
Copy link
Contributor

This would probably be useful but will need to be updated for the latest commit.

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