From 2e37939f9ae46a2b8d9ed8818ca46819ccbc61d8 Mon Sep 17 00:00:00 2001 From: Ryan Shepherd Date: Wed, 19 Feb 2025 15:42:24 -0800 Subject: [PATCH 1/4] Fix a couple more build warnings --- cppwinrt/component_writers.h | 1 + natvis/object_visualizer.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cppwinrt/component_writers.h b/cppwinrt/component_writers.h index c52f49a13..6865d49ef 100644 --- a/cppwinrt/component_writers.h +++ b/cppwinrt/component_writers.h @@ -198,6 +198,7 @@ int32_t __stdcall WINRT_GetActivationFactory(void* classId, void** factory) noex } #ifdef _WRL_MODULE_H_ +#pragma warning(suppress: 4324) // structure was padded due to alignment specifier return ::Microsoft::WRL::Module<::Microsoft::WRL::InProc>::GetModule().GetActivationFactory(static_cast(classId), reinterpret_cast<::IActivationFactory**>(factory)); #else return winrt::hresult_class_not_available(name).to_abi(); diff --git a/natvis/object_visualizer.cpp b/natvis/object_visualizer.cpp index 2e0eb3971..e131c853f 100644 --- a/natvis/object_visualizer.cpp +++ b/natvis/object_visualizer.cpp @@ -613,7 +613,6 @@ std::wstring string_to_wstring(std::string_view const& str) std::wstring result(size, L'?'); auto size_result = MultiByteToWideChar(CP_UTF8, 0, str.data(), static_cast(str.size()), result.data(), size); - XLANG_ASSERT(size == size_result); return result; } From dc9b2fc3771b1ae1fccde78e87e4a266fd87ccc1 Mon Sep 17 00:00:00 2001 From: Ryan Shepherd Date: Wed, 19 Feb 2025 18:49:22 -0800 Subject: [PATCH 2/4] Upgrade System.Text.Json to 6.0.10 --- vsix/Dev16/vsix.Dev16.csproj | 1 + vsix/Dev17/vsix.Dev17.csproj | 3 +++ 2 files changed, 4 insertions(+) diff --git a/vsix/Dev16/vsix.Dev16.csproj b/vsix/Dev16/vsix.Dev16.csproj index 1e89b390b..dfb870ee1 100644 --- a/vsix/Dev16/vsix.Dev16.csproj +++ b/vsix/Dev16/vsix.Dev16.csproj @@ -93,6 +93,7 @@ all + diff --git a/vsix/Dev17/vsix.Dev17.csproj b/vsix/Dev17/vsix.Dev17.csproj index 3ef30ce63..be0cf3d17 100644 --- a/vsix/Dev17/vsix.Dev17.csproj +++ b/vsix/Dev17/vsix.Dev17.csproj @@ -168,6 +168,9 @@ + + + From 8ec390f932864c06956b13148c7e955977b93e79 Mon Sep 17 00:00:00 2001 From: Ryan Shepherd Date: Thu, 20 Feb 2025 05:03:29 +0000 Subject: [PATCH 3/4] Better fix for unused size_result --- natvis/object_visualizer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/natvis/object_visualizer.cpp b/natvis/object_visualizer.cpp index e131c853f..d953a1c03 100644 --- a/natvis/object_visualizer.cpp +++ b/natvis/object_visualizer.cpp @@ -612,7 +612,8 @@ std::wstring string_to_wstring(std::string_view const& str) } std::wstring result(size, L'?'); - auto size_result = MultiByteToWideChar(CP_UTF8, 0, str.data(), static_cast(str.size()), result.data(), size); + [[maybe_unused]] auto size_result = MultiByteToWideChar(CP_UTF8, 0, str.data(), static_cast(str.size()), result.data(), size); + XLANG_ASSERT(size == size_result); return result; } From f461af103fc30099e6950fc88c08dab101f17ae0 Mon Sep 17 00:00:00 2001 From: Ryan Shepherd Date: Thu, 20 Feb 2025 06:00:19 +0000 Subject: [PATCH 4/4] Disable warning 4324 for all of wrl.h --- test/old_tests/Component/pch.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/old_tests/Component/pch.h b/test/old_tests/Component/pch.h index 5d84eecb6..b73230946 100644 --- a/test/old_tests/Component/pch.h +++ b/test/old_tests/Component/pch.h @@ -8,4 +8,7 @@ #include "winrt/Composable.h" // This is used to validate WRL interop support. +#pragma warning(push) +#pragma warning(disable: 4324) // structure was padded due to alignment specifier #include +#pragma warning(pop) \ No newline at end of file