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

Krzysztof domanski fix type compare warning #88

Conversation

KrzysztofDomanski
Copy link
Contributor

By casting the vector size to an int, there is a "error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]" produced.

The static cast is technically not needed at all, since all the usages of this private template function specialize it with an unsigned integer, but in order to be future proof just use the type of "indices" in the static cast.

KrzysztofDomanski and others added 5 commits April 20, 2021 16:22
Use curly braces in member initialisation. 
"major" and "minor" are macros defined by the gcc compiler. The macros are defined in sys/sysmacros.h which is getting pulled in by #include <string> 
Using curly braces stops the macro from being expanded.
…Version_h-gcc-fails-to-compile

Update Version.h
By using "int", this produces "error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]"
Static cast is technically not needed at all here since all usages of this function specialize it with an unsigned int, but in order to be future proof static cast it to the type of indices.
@bghgary bghgary merged commit d806b75 into microsoft:master Oct 28, 2021
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.

2 participants