Skip to content

Commit df1b3b2

Browse files
committed
A few more warnings.
1 parent 5078fb4 commit df1b3b2

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

cppwinrt/component_writers.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ void* __stdcall %_get_activation_factory([[maybe_unused]] std::wstring_view cons
175175
int32_t __stdcall WINRT_CanUnloadNow() noexcept
176176
{
177177
#ifdef _WRL_MODULE_H_
178+
#ifdef _MSC_VER
179+
#pragma warning(disable: 4324) // structure was padded due to alignment specifier
180+
#endif
178181
if (!::Microsoft::WRL::Module<::Microsoft::WRL::InProc>::GetModule().Terminate())
179182
{
180183
return 1;

strings/base_composable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace winrt::impl
66
{
77
#ifdef _MSC_VER
88
#pragma warning(push)
9-
#pragma warning(disable: 4702)
9+
#pragma warning(disable: 4702) // Compiler bug causing spurious "unreachable code" warnings
1010
#endif
1111
template <typename I, typename... Args>
1212
static I CreateInstance(const Windows::Foundation::IInspectable& outer, Windows::Foundation::IInspectable& inner, Args&&... args)

strings/base_implements.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ WINRT_EXPORT namespace winrt
13921392
{
13931393
#ifdef _MSC_VER
13941394
#pragma warning(push)
1395-
#pragma warning(disable: 4702)
1395+
#pragma warning(disable: 4702) // Compiler bug causing spurious "unreachable code" warnings
13961396
#endif
13971397
template <typename D, typename... Args>
13981398
auto make(Args&&... args)

test/old_tests/Component/Component.idl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ namespace Component
243243
HRESULT Create([in] Windows.Foundation.Collections.IVectorView<HSTRING>* _in, [out, retval] FastInputVector** _out);
244244
};
245245

246-
midl_pragma warning(disable: 4066)
246+
midl_pragma warning(disable: 4066) // A member name has been qualified with an interface name because name collisions occurred across interface members on a runtime class.
247247

248248
[version(1.0), activatable(IFastInputVectorFactory, 1.0)]
249249
runtimeclass FastInputVector

test/test_component_base/HierarchyB.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include "pch.h"
22
#include "HierarchyB.h"
33

4+
#pragma warning(disable: 4702)
5+
46
namespace winrt::test_component_base::implementation
57
{
68
HierarchyB::HierarchyB(hstring const& name)

0 commit comments

Comments
 (0)