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 unused variable treatment #139

Merged
merged 3 commits into from
Nov 5, 2021
Merged

Fix unused variable treatment #139

merged 3 commits into from
Nov 5, 2021

Conversation

zeux
Copy link
Collaborator

@zeux zeux commented Nov 5, 2021

Right now our CMake infra specifies -Wno-unused only for GCC builds, but Makefile specifies it for all builds.
The intent has been to use it just for GCC, so we now do that by detecting the compiler version - this should
equalize the behavior across different types of builds.

Separately, latest version of clang appears to expose an unused variable that clang-10 was okay with, so fix that.

Fixes #136

This is a bit difficult to detect, so for now we conservatively say that
macOS always uses clang, and clang-based compilers always are called
"clang".
Copy link
Collaborator

@vegorov-rbx vegorov-rbx left a comment

Choose a reason for hiding this comment

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

Hmm... seems familiar

@zeux zeux merged commit a80fc93 into master Nov 5, 2021
@zeux zeux deleted the unused branch November 5, 2021 19:39
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.

Unused variable prevents compilation
2 participants