diff --git a/.editorconfig b/.editorconfig index 8063d21863..b551b3a105 100644 --- a/.editorconfig +++ b/.editorconfig @@ -801,6 +801,9 @@ dotnet_diagnostic.CA2016.severity = warning # The 'count' argument to Buffer.BlockCopy should specify the number of bytes to copy. dotnet_diagnostic.CA2018.severity = warning +# ThreadStatic fields should not use inline initialization. +dotnet_diagnostic.CA2019.severity = warning + ### Security Rules ### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/security-warnings diff --git a/OpenRA.Mods.Common/AudioLoaders/OggLoader.cs b/OpenRA.Mods.Common/AudioLoaders/OggLoader.cs index 33b3d00089..ec60bfbaee 100644 --- a/OpenRA.Mods.Common/AudioLoaders/OggLoader.cs +++ b/OpenRA.Mods.Common/AudioLoaders/OggLoader.cs @@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.AudioLoaders // This buffer can be static because it can only be used by 1 instance per thread. [ThreadStatic] - static float[] conversionBuffer = null; + static float[] conversionBuffer; public OggStream(OggFormat format) {