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

events: add missing return type #20

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Conversation

LucasFA
Copy link
Contributor

@LucasFA LucasFA commented Jan 6, 2025

events.c:124:3: error: control reaches end of non-void function
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wreturn-type

As part of my update to the nixpkgs package I found this blocking the build.

I have tested this patch as part of the packaging process, and it builds in Nix. I, however, didn't test this conditional compilation branch. I don't imagine it's necessary.

The missing return type causes it to be defaulted to `int`,
which subsequently results in a compilation error if
`-Werror=return-type` or similar is set.

Fixes: 9da7bdb ("events: add placeholder function instead of #if")
@pobrn
Copy link
Owner

pobrn commented Jan 7, 2025

I have edited the commit message, please check it, and confirm that it is acceptable for you; then I can merge it.

@pobrn pobrn changed the title Remove -Wall compiler warning events: add missing return type Jan 7, 2025
@LucasFA
Copy link
Contributor Author

LucasFA commented Jan 7, 2025

Yes, you definitely have my go-ahead. I still need to remind myself to be mindful of git commit messages. Thanks.

@pobrn pobrn merged commit ebab4af into pobrn:master Jan 7, 2025
@LucasFA LucasFA deleted the remove-warning branch January 7, 2025 21:02
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