diff --git a/include/WinStd/COM.h b/include/WinStd/COM.h index 132eab9a..f7cb5da3 100644 --- a/include/WinStd/COM.h +++ b/include/WinStd/COM.h @@ -1718,10 +1718,8 @@ namespace winstd // Fill in BITMAPFILEHEADER. memset(header, 0, sizeof(*header)); -#pragma warning(push) -#pragma warning(disable: 6276) // "BM" is not an UTF16 char. +#pragma warning(suppress: 6276) // "BM" is not an UTF16 char. header->bfType = *reinterpret_cast("BM"); -#pragma warning(pop) header->bfSize = static_cast(sizeof(*header) + sizeof(bmh) + pallete_size + bmh.biSizeImage); header->bfOffBits = static_cast(sizeof(*header) + sizeof(bmh) + pallete_size); @@ -1749,7 +1747,7 @@ namespace winstd /// \param[in] locale Locale for the invoke call /// template - void IDispatchInvoke(_In_ T* cp, _In_ DISPID id, _In_opt_ DISPPARAMS* param, _In_ LCID locale = LOCALE_USER_DEFAULT) + void IDispatchInvoke(_In_ T* cp, _In_ DISPID id, _In_ DISPPARAMS* param, _In_ LCID locale = LOCALE_USER_DEFAULT) { assert(cp); com_obj e; diff --git a/include/WinStd/Common.h b/include/WinStd/Common.h index 08202d57..528d63b6 100644 --- a/include/WinStd/Common.h +++ b/include/WinStd/Common.h @@ -1207,7 +1207,7 @@ namespace winstd /// /// \param[inout] h A rvalue reference of another object /// - #pragma warning(disable: 26432) // Move constructor is also present, but not detected by code analysis somehow. + #pragma warning(suppress: 26432) // Move constructor is also present, but not detected by code analysis somehow. dplhandle& operator=(_Inout_ dplhandle &&h) noexcept { handle::operator=(std::move(h)); diff --git a/include/WinStd/EAP.h b/include/WinStd/EAP.h index 52a85ba7..da2992f6 100644 --- a/include/WinStd/EAP.h +++ b/include/WinStd/EAP.h @@ -74,7 +74,7 @@ namespace winstd /// /// \sa [Extensible Authentication Protocol (EAP) Registry (Chapter: Method Types)](https://www.iana.org/assignments/eap-numbers/eap-numbers.xhtml#eap-numbers-4) /// - #pragma warning(suppress: 4480) + #pragma warning(suppress: 4480) // Prefering enums over #define for constants enum class eap_type_t : unsigned char { undefined = 0, ///< Undefined EAP type identity = 1, ///< Identity @@ -319,8 +319,6 @@ namespace winstd nKeySize + // Key nPaddingLength; // Padding - #pragma warning(push) - #pragma warning(disable: 6386) LPBYTE p = new BYTE[dwLengthNew]; p[0] = 0x00; // Vendor-Id (0x137 = 311 = Microsoft) p[1] = 0x00; // --| @@ -331,7 +329,6 @@ namespace winstd p[6] = 0x00; // Salt p[7] = 0x00; // --^ p[8] = nKeySize; // Key-Length - #pragma warning(pop) memcpy(p + 9, pbKey, nKeySize); // Key memset(p + 9 + nKeySize, 0, nPaddingLength); // Padding diff --git a/include/WinStd/ETW.h b/include/WinStd/ETW.h index 5a697ab2..b15d89a2 100644 --- a/include/WinStd/ETW.h +++ b/include/WinStd/ETW.h @@ -600,10 +600,7 @@ namespace winstd } va_end(arg); -#pragma warning(push) -#pragma warning(disable: 28020) return EventWrite(m_h, EventDescriptor, param_count, params.data()); -#pragma warning(pop) } /// @@ -644,10 +641,7 @@ namespace winstd params.push_back(p); } -#pragma warning(push) -#pragma warning(disable: 28020) return EventWrite(m_h, EventDescriptor, param_count, params.data()); -#pragma warning(pop) } /// diff --git a/include/WinStd/Win.h b/include/WinStd/Win.h index 87fe9673..3d4f0147 100644 --- a/include/WinStd/Win.h +++ b/include/WinStd/Win.h @@ -1913,16 +1913,11 @@ namespace winstd /// ~process_information() { - #pragma warning(push) - #pragma warning(disable: 6001) // Using uninitialized memory '*this'. << ??? - if (hProcess != INVALID_HANDLE_VALUE) CloseHandle(hProcess); if (hThread != INVALID_HANDLE_VALUE) CloseHandle(hThread); - - #pragma warning(pop) } };