Skip to content

Mark a variable only used in an assert #7636

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

Merged
merged 2 commits into from
Jun 2, 2025
Merged

Mark a variable only used in an assert #7636

merged 2 commits into from
Jun 2, 2025

Conversation

dschuff
Copy link
Member

@dschuff dschuff commented Jun 2, 2025

This allows building without asserts, with -Wunused-but-set-variable

This allows building without asserts, with -Wunused-but-set-variable
@dschuff
Copy link
Member Author

dschuff commented Jun 2, 2025

@kripken this triggered when I ran the emscripten-releases LTO build without asserts locally. But I don't see why it's not triggering on the noasserts builder here? emscripten-releases does have a newer version of clang, but I didn't think this was a really new warning...

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Odd this only happens there, yeah... maybe older clang didn't cover declarations in ifs or something like that.

@dschuff dschuff enabled auto-merge (squash) June 2, 2025 20:58
@dschuff dschuff merged commit efd572c into main Jun 2, 2025
16 checks passed
@dschuff dschuff deleted the unused branch June 2, 2025 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants