-
Notifications
You must be signed in to change notification settings - Fork 270
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
Fix various type conversion and deprecation warnings reported by Visual studio #2310
base: develop
Are you sure you want to change the base?
Conversation
69cd850
to
e389d29
Compare
{ | ||
return class_index; | ||
} | ||
u1 get_name_and_type_index() const | ||
u2 get_name_and_type_index() const | ||
{ |
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.
Uhh, these might be serious.
src/util/pointer_offset_size.cpp
Outdated
return -1; // we cannot distinguish the elements | ||
|
||
return sub*i; | ||
return sub * *size; | ||
} |
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.
I really like (*size) here, otherwise looks a bit like a power in Verilog.
src/util/pointer_offset_size.cpp
Outdated
return -1; // we cannot distinguish the elements | ||
|
||
return sub*i; | ||
return sub * *size; | ||
} |
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.
Same here
2714dac
to
c306c80
Compare
I have started factoring out parts into digestable PRs. I will keep using this one as my testbed to gather input from AppVeyor. No need for reviews, though. |
fb8ccf7
to
2cadc86
Compare
d07e1c3
to
98f8962
Compare
808818b
to
c52a4d7
Compare
[...]
Mostly the latter, but there are other PRs that still have higher priority to be cleaned up and merged before I can spend time on this one. |
Given that you are planning to raise separate PRs, rather than ever merging this one and that you can refer to the branch without keeping the PR open, are you ok with this PR being closed out for the moment? Just trying to keep the number of currently open PRs down. |
Going ahead with closing this PR as being very stale. Feel free to reopen this PR if you believe that closing this was a mistake - it will need a rebase on top of It will also probably need a rerun of everything on VS2019, given that this is what we are supporting on our CI platforms as well. |
03e6856
to
2f3ed10
Compare
These are never used (and their implementation was awkwardly summing up Booleans, yielding conversion warnings).
We can safely read signed values and don't need to defer the type conversion to the call site.
Visual Studio warns about signed/unsigned conversion and limited range of types.
Visual Studio warns about signed/unsigned conversion and limited range of types.
Visual Studio warns about signed/unsigned conversion and limited range of types.
Visual Studio warns about signed/unsigned conversion and limited range of types.
…d long long Visual Studio warns about signed/unsigned conversion and limited range of types.
This avoids conversion warnings with Visual Studio.
cmdlinet::parse has a different signature and we don't override it here. As an alternative option, we could rename functions.
Constructing the arguments in place triggers a warning with Visual Studio. Just construct them in a fixed order upfront and move each of them.
…em errors Treat all Visual Studio warnings except those that we cannot do anything about as errors.
ff85b54
to
0ca98d2
Compare
Reviews appreciated, but this is still incomplete as I am trying to get updated results from AppVeyor.