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

MSVC: Disable warning 5105 to fix error in winbase.h #9663

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

oskirby
Copy link
Collaborator

@oskirby oskirby commented Jun 15, 2024

Description

When compiling with MSVC (VisualStudio 2019), the compilation fails with on a warning in winbase.h due to macro expansion rules:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9461,5): warning C5105: macro expansion producing 'defined' has undefined behavior

Reference

i.e Jira or Github issue URL

Checklist

  • My code follows the style guidelines for this project
  • I have not added any packages that contain high risk or unknown licenses (GPL, LGPL, MPL, etc. consult with DevOps if in question)
  • I have performed a self review of my own code
  • I have commented my code PARTICULARLY in hard to understand areas
  • I have added thorough tests where needed
@oskirby
Copy link
Collaborator Author

oskirby commented Jun 24, 2024

Technically this has been fixed in a later release of the Windows 10SDK (for Windows server only), but this happens to be the default that comes with VS2019, so I am more inclined to provide a workaround in our codebase.

@oskirby oskirby marked this pull request as ready for review June 24, 2024 22:33
@oskirby oskirby requested a review from strseb June 24, 2024 22:33
@oskirby oskirby merged commit bf5557a into main Jun 25, 2024
110 checks passed
@oskirby oskirby deleted the nit-msvc-disable-warning-5105 branch June 25, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants