diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-02-07 17:56:58 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-02-07 18:54:33 -0600 |
| commit | bee6a20d1c7d807b5023d932ae179db1bc9a0f80 (patch) | |
| tree | 855c28ed77f81d8212d1a9ecf67253c97190935a /src/dutil | |
| parent | 69567aaa95f41812a49afa7454b69a3d79c5010d (diff) | |
| download | wix-bee6a20d1c7d807b5023d932ae179db1bc9a0f80.tar.gz wix-bee6a20d1c7d807b5023d932ae179db1bc9a0f80.tar.bz2 wix-bee6a20d1c7d807b5023d932ae179db1bc9a0f80.zip | |
Ignore enum CA warnings and scope the osutil deprecation suppression.
Also, fix project reference so the .vcx project system understands it.
Diffstat (limited to 'src/dutil')
| -rw-r--r-- | src/dutil/dutil.vcxproj | 5 | ||||
| -rw-r--r-- | src/dutil/osutil.cpp | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/dutil/dutil.vcxproj b/src/dutil/dutil.vcxproj index 2cf99d13..b84fd80f 100644 --- a/src/dutil/dutil.vcxproj +++ b/src/dutil/dutil.vcxproj | |||
| @@ -83,10 +83,7 @@ | |||
| 83 | <ClCompile Include="memutil.cpp" /> | 83 | <ClCompile Include="memutil.cpp" /> |
| 84 | <ClCompile Include="metautil.cpp" /> | 84 | <ClCompile Include="metautil.cpp" /> |
| 85 | <ClCompile Include="monutil.cpp" /> | 85 | <ClCompile Include="monutil.cpp" /> |
| 86 | <ClCompile Include="osutil.cpp"> | 86 | <ClCompile Include="osutil.cpp" /> |
| 87 | <!-- turn off deprecation warning --> | ||
| 88 | <DisableSpecificWarnings>4996</DisableSpecificWarnings> | ||
| 89 | </ClCompile> | ||
| 90 | <ClCompile Include="path2utl.cpp" /> | 87 | <ClCompile Include="path2utl.cpp" /> |
| 91 | <ClCompile Include="pathutil.cpp" /> | 88 | <ClCompile Include="pathutil.cpp" /> |
| 92 | <ClCompile Include="perfutil.cpp" /> | 89 | <ClCompile Include="perfutil.cpp" /> |
diff --git a/src/dutil/osutil.cpp b/src/dutil/osutil.cpp index 38b32eb3..8834cd30 100644 --- a/src/dutil/osutil.cpp +++ b/src/dutil/osutil.cpp | |||
| @@ -22,7 +22,14 @@ extern "C" void DAPI OsGetVersion( | |||
| 22 | if (OS_VERSION_UNKNOWN == vOsVersion) | 22 | if (OS_VERSION_UNKNOWN == vOsVersion) |
| 23 | { | 23 | { |
| 24 | ovi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW); | 24 | ovi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW); |
| 25 | |||
| 26 | #pragma warning (push) | ||
| 27 | #pragma warning(suppress: 4996) // deprecated | ||
| 28 | #pragma warning (push) | ||
| 29 | #pragma warning(suppress: 28159)// deprecated, use other function instead | ||
| 25 | ::GetVersionExW(reinterpret_cast<OSVERSIONINFOW*>(&ovi)); // only fails if version info size is set incorrectly. | 30 | ::GetVersionExW(reinterpret_cast<OSVERSIONINFOW*>(&ovi)); // only fails if version info size is set incorrectly. |
| 31 | #pragma warning (pop) | ||
| 32 | #pragma warning (pop) | ||
| 26 | 33 | ||
| 27 | vdwOsServicePack = static_cast<DWORD>(ovi.wServicePackMajor) << 16 | ovi.wServicePackMinor; | 34 | vdwOsServicePack = static_cast<DWORD>(ovi.wServicePackMajor) << 16 | ovi.wServicePackMinor; |
| 28 | if (4 == ovi.dwMajorVersion) | 35 | if (4 == ovi.dwMajorVersion) |
