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

x86 msvc v19.27 static code analysis warning C28020 after updating nameof.hpp to v0.10.0 #31

Closed
ScottHutchinson opened this issue Jan 13, 2021 · 5 comments
Assignees

Comments

@ScottHutchinson
Copy link

Will try to find the code that triggers this when I have time.
...\nameof.hpp (579, 0)
...\nameof.hpp(579,0): Warning C28020: The expression '0<=Param(1)&&Param(1)<=1-1' is not true at this call.

@Neargye
Copy link
Owner

Neargye commented Jan 14, 2021

Thanks for issues, will be try find problem

@Neargye Neargye self-assigned this Jan 14, 2021
@Neargye
Copy link
Owner

Neargye commented Jan 14, 2021

I get nameof\include\nameof.hpp(560): warning C28020: The expression '0<=_Param_(1)&&_Param_(1)<=3-1' is not true at this call.

@Neargye
Copy link
Owner

Neargye commented Jan 14, 2021

      const auto val = value<E, Min, IsFlags>(i);
      values[v++] = val;

this fix warning, looks like a false positive.

@ScottHutchinson
Copy link
Author

Thanks. I'll try that fix and let you know.

@ScottHutchinson
Copy link
Author

Yes, that fixed it.

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

No branches or pull requests

2 participants