|
|
While there's no warnings ... in VS 2017, ... there's three warnings VS 2019
This is an interesting point. Do we really want to "fix" all these warnings, and even more for the next incantation of VS (presumably VS 2021, this year). I think this is a race we can't win...
That said, many of the warnings are due to extending to 64-bit systems and particularly Microsoft's way to keep sizeof(long) == 4 rather than 8 like the "Unix world" did. I can see how such warnings can be helpful in some cases, but all the code we're usually dealing with does typically not suffer from such effects like "conversion from 'size_t' to 'int', possible loss of data" . OTOH, if you "cast away" such warnings w/o checking that this is really intended you will never be warned again.
I'm not sure what to do though. I attempt to keep my daily (regular) builds clean of warnings (which is in my case mainly Linux) and I tend to suppress the warnings on VS builds.
Finally it can be "dangerous" to try to "fix" such warnings as seen above. S**t can happen, setting parens wrong, doing the wrong cast, etc., and if our macOS build wouldn't have issued a warning we might never have found this (although I think testing would likely have shown something going wrong - didn't bother to test though, but would be an interesting task...).
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
[ Direct Link to Message ] | |
|
| |