Skip to content

Commit f3bad33

Browse files
authored
fix S3971 warning (#2203)
1 parent 1eb48d7 commit f3bad33

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/Polly/Polly.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<MutationScore>70</MutationScore>
99
<IncludePollyUsings>true</IncludePollyUsings>
1010
<NoWarn>$(NoWarn);CA1010;CA1031;CA1051;CA1062;CA1063;CA1064;CA1710;CA1716;CA1724;CA1805;CA1815;CA1816;CA2211</NoWarn>
11-
<NoWarn>$(NoWarn);S2223;S3215;S3246;S3971;S4039;S4457</NoWarn>
11+
<NoWarn>$(NoWarn);S2223;S3215;S3246;S4039;S4457</NoWarn>
1212
<!--Public API Analyzers: We do not need to fix these as it would break compatibility with released Polly versions-->
1313
<NoWarn>$(NoWarn);RS0037;</NoWarn>
1414
</PropertyGroup>

src/Polly/Utilities/TimedLock.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ private static TimedLock Lock(object o, TimeSpan timeout)
3232
if (!Monitor.TryEnter(o, timeout))
3333
{
3434
#if DEBUG
35+
#pragma warning disable S3971 // Do not call 'GC.SuppressFinalize'
3536
GC.SuppressFinalize(tl._leakDetector);
37+
#pragma warning restore S3971
3638
#endif
3739
throw new LockTimeoutException();
3840
}

0 commit comments

Comments
 (0)