From 4732ffaf949ae2dbe9653456f3c5703a42049e19 Mon Sep 17 00:00:00 2001 From: Lucas Trzesniewski Date: Mon, 26 Jun 2023 20:35:21 +0200 Subject: [PATCH] Suppress warning emitted by the latest compiler version --- src/ZeroLog.Benchmarks/EnumTests/EnumBenchmarks.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ZeroLog.Benchmarks/EnumTests/EnumBenchmarks.cs b/src/ZeroLog.Benchmarks/EnumTests/EnumBenchmarks.cs index 0eb4a67..c7a9fcd 100644 --- a/src/ZeroLog.Benchmarks/EnumTests/EnumBenchmarks.cs +++ b/src/ZeroLog.Benchmarks/EnumTests/EnumBenchmarks.cs @@ -68,9 +68,11 @@ private struct Cache private static IntPtr TypedRefImpl() where T : struct { +#pragma warning disable CS8500 var value = default(T); var typedRef = __makeref(value); return ((IntPtr*)&typedRef)[1]; +#pragma warning restore CS8500 } [Benchmark]