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

Strict C warnings #140

Merged
merged 3 commits into from
Dec 18, 2023
Merged

Strict C warnings #140

merged 3 commits into from
Dec 18, 2023

Conversation

MisterDA
Copy link
Contributor

Enable warnings when compiling C code

In particular, enable warnings for stricter C.
See https://lwn.net/Articles/913505/.

Fix strict-prototypes warnings

In all cases, the functions don't expect argument, so replacing with
void is fine. Otherwise, the functions would accept any number of
arguments.

MisterDA and others added 3 commits January 12, 2023 16:17
In particular, enable warnings for stricter C.
See https://lwn.net/Articles/913505/.
In all cases, the functions don't expect argument, so replacing with
void is fine. Otherwise, the functions would accept any number of
arguments.
@aantron
Copy link
Owner

aantron commented Dec 18, 2023

Thank you! I've merged the void function signatures. I haven't merged the warnings flags, because it seems to me like that would be a potential portability issue at the compiler command line interface. I tested what happens when gcc receives a warning flag that it does not recognize, and it fails. It seems that in the general case, we would have to have a discovery script to find out which warnings flags our compiler supports, but I'd like to avoid that. Please let me know if any of this is inaccurate. I'll propagate te fixed prototypes to shims.h.

@aantron aantron merged commit a244db6 into aantron:master Dec 18, 2023
4 of 8 checks passed
@MisterDA
Copy link
Contributor Author

You're right, this was an oversight from me. It's ok as-is with the C patches.

@MisterDA MisterDA deleted the strict-c branch December 18, 2023 13:35
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