From cb51711d5c55d000794a66d146fbc8ea062387f8 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 30 Mar 2020 16:42:26 -0600 Subject: [PATCH] Suppress compile warnings --- src/StreamJsonRpc.Tests/AsyncEnumerableTests.cs | 2 ++ src/StreamJsonRpc/MessagePackFormatter.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/StreamJsonRpc.Tests/AsyncEnumerableTests.cs b/src/StreamJsonRpc.Tests/AsyncEnumerableTests.cs index e33ebc1f..43b6143e 100644 --- a/src/StreamJsonRpc.Tests/AsyncEnumerableTests.cs +++ b/src/StreamJsonRpc.Tests/AsyncEnumerableTests.cs @@ -251,7 +251,9 @@ async Task Consume(int count) [PairwiseData] public async Task PassInIAsyncEnumerableAsArgument(bool useProxy) { +#pragma warning disable CS8425 // Async-iterator member has one or more parameters of type 'CancellationToken' but none of them is decorated with the 'EnumeratorCancellation' attribute, so the cancellation token parameter from the generated 'IAsyncEnumerable<>.GetAsyncEnumerator' will be unconsumed async IAsyncEnumerable Generator(CancellationToken cancellationToken) +#pragma warning restore CS8425 // Async-iterator member has one or more parameters of type 'CancellationToken' but none of them is decorated with the 'EnumeratorCancellation' attribute, so the cancellation token parameter from the generated 'IAsyncEnumerable<>.GetAsyncEnumerator' will be unconsumed { for (int i = 1; i <= Server.ValuesReturnedByEnumerables; i++) { diff --git a/src/StreamJsonRpc/MessagePackFormatter.cs b/src/StreamJsonRpc/MessagePackFormatter.cs index d201f41c..d49f3430 100644 --- a/src/StreamJsonRpc/MessagePackFormatter.cs +++ b/src/StreamJsonRpc/MessagePackFormatter.cs @@ -585,7 +585,9 @@ internal PreciseTypeFormatter(MessagePackFormatter formatter) } [return: MaybeNull] +#pragma warning disable CS8766 // Nullability of reference types in return type doesn't match implicitly implemented member because of nullability attributes. public TClass Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) +#pragma warning restore CS8766 // Nullability of reference types in return type doesn't match implicitly implemented member because of nullability attributes. { if (reader.TryReadNil()) {