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

Fix warning: ignoring '#pragma warning ' #11

Merged
merged 2 commits into from
Dec 4, 2020
Merged

Fix warning: ignoring '#pragma warning ' #11

merged 2 commits into from
Dec 4, 2020

Conversation

tindy2013
Copy link
Contributor

The #pragma warning macro only works with MSVC compiler on Windows. On other compilers like MinGW GCC, some warnings will pop up. Adding a MSVC-specific macro to the condition will fix this.

@PerMalmberg
Copy link
Owner

So _WIN32 is defined in MinGW, but not _MSC_VER? Wouldn't it be enough to check only on _MSC_VER?

@tindy2013
Copy link
Contributor Author

_MSC_VER stands for MSVC compiler's version number, and it's one of the Microsoft-specific predefined macros, so it should be enough by checking this macro.

@PerMalmberg
Copy link
Owner

_MSC_VER stands for MSVC compiler's version number, and it's one of the Microsoft-specific predefined macros, so it should be enough by checking this macro.

Ok, will you please update the PR to do that?

@tindy2013
Copy link
Contributor Author

@PerMalmberg updated

@PerMalmberg
Copy link
Owner

Thanks, @tindy2013

@PerMalmberg PerMalmberg merged commit b004675 into PerMalmberg:master Dec 4, 2020
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