Skip to content

Commit f801a10

Browse files
committed
Transafer warning supression from code into the project properties
1 parent 0cb5ff3 commit f801a10

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Base/Base.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
<Product>DotnetNative.Base</Product>
2222
<AssemblyName>DotnetNative.Base</AssemblyName>
2323
<RootNamespace>DotnetNative.Base</RootNamespace>
24+
</PropertyGroup>
25+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
26+
<NoWarn>1701;1702;CS8500</NoWarn>
27+
</PropertyGroup>
28+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
29+
<NoWarn>1701;1702;CS8500</NoWarn>
2430
</PropertyGroup>
2531
<ItemGroup>
2632
<Using Include="System.Runtime.CompilerServices" />

Base/pointer.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type
2-
public unsafe struct pointer
1+
public unsafe struct pointer
32
{
43
public pointer(nint address) => Address = address;
54

@@ -99,4 +98,3 @@ public unsafe struct pointer
9998
[MethodImpl(AggressiveInlining)] public static implicit operator delegate* unmanaged<void>(pointer pointer) => (delegate* unmanaged<void>)pointer;
10099
#endregion
101100
}
102-
#pragma warning restore CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type

0 commit comments

Comments
 (0)