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

Clean up more warnings and Component Governance #1475

Merged
merged 4 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cppwinrt/component_writers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<HSTRING>(classId), reinterpret_cast<::IActivationFactory**>(factory));
#else
return winrt::hresult_class_not_available(name).to_abi();
Expand Down
2 changes: 1 addition & 1 deletion natvis/object_visualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ 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<int>(str.size()), result.data(), size);
[[maybe_unused]] auto size_result = MultiByteToWideChar(CP_UTF8, 0, str.data(), static_cast<int>(str.size()), result.data(), size);
XLANG_ASSERT(size == size_result);
return result;
}
Expand Down
3 changes: 3 additions & 0 deletions test/old_tests/Component/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <wrl.h>
#pragma warning(pop)
1 change: 1 addition & 0 deletions vsix/Dev16/vsix.Dev16.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.Text.Json" Version="6.0.10" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(VSIXRootDir)Resources\VSPackage.resx">
Expand Down
3 changes: 3 additions & 0 deletions vsix/Dev17/vsix.Dev17.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@
</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Text.Json" Version="6.0.10" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="..\Extension.targets" />
Expand Down