Fix Visual Studio 2019 warnings#53
Open
elfenix wants to merge 1 commit into
Open
Conversation
This changes fixes sevearl warnings triggered by Visual Studio 2019. These are largerly due to 64bit size_t and extended static analysis provided by newer revisions of intellisense. Instead of using %lu, use %zu for size_t variables. Add a couple casts where required. Finally, fix an issue where intellisense gets tripped up by not considering that two null compared pointers would be equivalent.
Author
|
This is a ping PR, if anyone is still watching this repository I'd be willing to clean this up. I'm using fct.h in one of my projects, and thought this might be useful. This isn't really cleaned up for "production" distribution, but if there's ANY interest in this at all, I'd be willing to fix issues. This does introduce a minimum req of Visual Studio at 2013 - for %zu - if earlier revisions are required - could potentially resolve using casts or macros. Also, default VS2019 config won't compile and run unit tests as warnings will trigger compile errors. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes fixes sevearl warnings triggered by Visual Studio
2019. These are largerly due to 64bit size_t and extended static
analysis provided by newer revisions of intellisense. Instead
of using %lu, use %zu for size_t variables. Add a couple casts
where required. Finally, fix an issue where intellisense gets
tripped up by not considering that two null compared pointers would
be equivalent.