Skip to content

Fix Visual Studio 2019 warnings#53

Open
elfenix wants to merge 1 commit into
imb:masterfrom
elfenix:features/vs_warnings
Open

Fix Visual Studio 2019 warnings#53
elfenix wants to merge 1 commit into
imb:masterfrom
elfenix:features/vs_warnings

Conversation

@elfenix
Copy link
Copy Markdown

@elfenix elfenix commented Nov 14, 2020

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.

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.
@elfenix
Copy link
Copy Markdown
Author

elfenix commented Nov 14, 2020

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.

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.

1 participant