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

cleanup: Add and fix Wunreachable-code-return, Wunused-macros, and Wformat-nonliteral #317

Merged
merged 3 commits into from
Feb 8, 2024

Conversation

robinlinden
Copy link
Member

@robinlinden robinlinden commented Feb 8, 2024

This change is Reviewable

@robinlinden robinlinden changed the title Add and fix -Wunreachable-code-return, Wunused-macros, and Wformat-nonliteral Add and fix Wunreachable-code-return, Wunused-macros, and Wformat-nonliteral Feb 8, 2024
@robinlinden robinlinden changed the title Add and fix Wunreachable-code-return, Wunused-macros, and Wformat-nonliteral cleanup: Add and fix Wunreachable-code-return, Wunused-macros, and Wformat-nonliteral Feb 8, 2024
@robinlinden
Copy link
Member Author

@JFreegman -Wunreachable-code-return is apparently Clang only (and exists in Clang 3.5 and newer), I guess I'll just drop the flag and leave the fixes? Set up a Clang CI job w/ -Wunreachable-code-return passed in via the USER_CFLAGS in a different PR?

Copy link
Member

@JFreegman JFreegman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 5 files at r1, 12 of 12 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@JFreegman
Copy link
Member

@JFreegman -Wunreachable-code-return is apparently Clang only (and exists in Clang 3.5 and newer), I guess I'll just drop the flag and leave the fixes? Set up a Clang CI job w/ -Wunreachable-code-return passed in via the USER_CFLAGS in a different PR?

It looks like gcc removed the flag because it was inconsistent due to compiler optimizations. So yeah I guess using CI is the best option here, it's still a useful flag to have.

This flag doesn't exist in gcc, so we can't unconditionally add it to
the Makefile.
@robinlinden robinlinden added this to the 0.14.2 milestone Feb 8, 2024
@JFreegman JFreegman merged commit 568bf99 into TokTok:master Feb 8, 2024
@robinlinden robinlinden deleted the more-warnings branch February 8, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants