Fix new .NET SDK warnings

このコミットが含まれているのは:
Sergio Pedri committed 2024-11-12 17:53:45 -08:00
1 親 f96d0150b5
コミット 7461a8eea7
5ファイル変更
+18 -4

検索条件に一致するファイルはありません

+1 -1
ファイルの表示
@@ -261,7 +261,7 @@ internal static unsafe partial class D3DCompiler
// We cannot use Regex (this method was originally using Regex.Replace(message, @"^[A-Z]:\\[^:]+: (\w+ \w+:)", ...)), because that
// causes significant binary size increase, as it's the only thing rooting all the Regex stack across the whole library. So this
// code reimplements equivalent logic in a simple way. Because this is a throw helper, allocating a little bit of garbage is fine.
string[] lines = message.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
string[] lines = message.Split(['\n', '\r'], StringSplitOptions.RemoveEmptyEntries);
// Go over each (non empty) line and look for the leading file path to trim away
foreach (ref string line in lines.AsSpan())
+3 -3
ファイルの表示
@@ -4,7 +4,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
#pragma warning disable CS0809, IDE0009, IDE1006, IDE0048
#pragma warning disable CS0809, IDE0009, IDE1006, IDE0048, CA1065
namespace System;
@@ -274,7 +274,7 @@ internal struct HashCode
/// <typeparam name="T5">The type of the fifth value to combine into the hash code.</typeparam>
/// <typeparam name="T6">The type of the sixth value to combine into the hash code.</typeparam>
/// <typeparam name="T7">The type of the seventh value to combine into the hash code.</typeparam>
/// <typeparam name="T8">The type of the eigth value to combine into the hash code.</typeparam>
/// <typeparam name="T8">The type of the eighth value to combine into the hash code.</typeparam>
/// <param name="value1">The first value to combine into the hash code.</param>
/// <param name="value2">The second value to combine into the hash code.</param>
/// <param name="value3">The third value to combine into the hash code.</param>
@@ -282,7 +282,7 @@ internal struct HashCode
/// <param name="value5">The fifth value to combine into the hash code.</param>
/// <param name="value6">The sixth value to combine into the hash code.</param>
/// <param name="value7">The seventh value to combine into the hash code.</param>
/// <param name="value8">The eigth value to combine into the hash code.</param>
/// <param name="value8">The eighth value to combine into the hash code.</param>
/// <returns>The hash code that represents the values.</returns>
public static int Combine<T1, T2, T3, T4, T5, T6, T7, T8>(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8)
{
@@ -2,6 +2,14 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<DefineConstants>$(DefineConstants);D2D1_TESTS</DefineConstants>
<!--
Temporarily suppress warnings about packages with security vulnerabilities coming from
transitive dependencies of the 'Microsoft.CodeAnalysis.CSharp' testing packages. This
can be removed once new stable releases of those packages are shipped. We don't want
to add a new more recent top-level dependency to guard against binary breaking changes.
-->
<NoWarn>$(NoWarn);NU1903</NoWarn>
</PropertyGroup>
<ItemGroup>
@@ -6,6 +6,9 @@
<Platforms>x64;ARM64</Platforms>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<DefineConstants>$(DefineConstants);D2D1_WINUI_TESTS</DefineConstants>
<!-- Temporary workaround, see notes in 'ComputeSharp.D2D1.Tests.SourceGenerators' -->
<NoWarn>$(NoWarn);NU1902;NU1903</NoWarn>
</PropertyGroup>
<ItemGroup>
@@ -1,6 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<!-- Temporary workaround, see notes in 'ComputeSharp.D2D1.Tests.SourceGenerators' -->
<NoWarn>$(NoWarn);NU1903</NoWarn>
</PropertyGroup>
<ItemGroup>