-
Notifications
You must be signed in to change notification settings - Fork 438
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
[BUILD] Fix multiple assignment operators for SpinLockMutex #2501
[BUILD] Fix multiple assignment operators for SpinLockMutex #2501
Conversation
@SaiHarshaK thanks for the contribution. Please take a look and sign the EasyCLA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick PR.
I would rather remove the volatile declaration instead,
and keep the regular one.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2501 +/- ##
=======================================
Coverage 87.09% 87.09%
=======================================
Files 200 200
Lines 6103 6103
=======================================
Hits 5315 5315
Misses 788 788
|
@marcalff I wasn't sure if there was any specific use case around why volatile was added in the first place, so assumed that might be the safer one to add. |
Both declarations are marking the assignment operator as deleted instead of defining it. I am still not quite sure the reason of the triggered warning. |
1df6dd1
to
217a945
Compare
Had to repush for clearing EasyCLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the fix.
I didn't repro the warning with MSVC 19.38.33134, and also both overloads look correct to me, so could it be an issue for the specific MSVC @SaiHarshaK is using? |
Perhaps so, I don't have a way to currently update and check the same, since the infra on which build runs is out of my control. |
Fixes #2500
Changes
Please provide a brief description of the changes here.
The multiple assignment operators for SpinLockMutex throws warnings in consumer build for these headers. This would require them to explicitly add #Pragma to ignore C4522.
This PR removes the redundant assignment to let the build pass without these warnings. Tested locally as I was able to repro this issue before this change.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes