Skip to content

Prevent unused but set variable warning #764

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 1 commit into from
Jun 6, 2022

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Jun 6, 2022

_dispatch_preemption_yield(++spins) has an expansion to
(void)++spins, but this isn't considered a use of spins in Clang.
Add a (void)spins to prevent an unused variable warning.

Resolves rdar://93596069.

`_dispatch_preemption_yield(++spins)` has an expansion to
`(void)++spins`, but this isn't considered a use of `spins` in Clang.
Add a `(void)spins` to prevent an unused variable warning.

Resolves rdar://93596069.
@bnbarham bnbarham requested review from compnerd, hyp and rokhinip June 6, 2022 17:48
@bnbarham
Copy link
Contributor Author

bnbarham commented Jun 6, 2022

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Nit: Would be nice to have a newline before the comment.

@bnbarham
Copy link
Contributor Author

bnbarham commented Jun 6, 2022

Nit: Would be nice to have a newline before the comment.

I personally prefer without, but I can change if you feel super strongly about it.

@bnbarham bnbarham merged commit ecc678d into swiftlang:main Jun 6, 2022
@bnbarham bnbarham deleted the ignore-no-spins branch June 6, 2022 20:33
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.

3 participants