Skip to content

Commit 580db0c

Browse files
committed
Minor tweaks to reduce warnings
1 parent 6bcdc0e commit 580db0c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

BinaryObjectScanner/BinaryObjectScanner.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
88
<LangVersion>latest</LangVersion>
99
<Nullable>enable</Nullable>
10+
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
1011
<!-- <TreatWarningsAsErrors>true</TreatWarningsAsErrors> --> <!-- Can't be enabled because of external code -->
1112
<Version>3.0.0</Version>
1213

BinaryObjectScanner/Scanner.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,8 @@ public Scanner(bool scanArchives, bool scanContents, bool scanGameEngines, bool
236236
// Open the file and begin scanning
237237
try
238238
{
239-
using (FileStream fs = File.Open(file, FileMode.Open, FileAccess.Read, FileShare.Read))
240-
{
241-
return GetInternalProtections(file, fs);
242-
}
239+
using FileStream fs = File.Open(file, FileMode.Open, FileAccess.Read, FileShare.Read);
240+
return GetInternalProtections(file, fs);
243241
}
244242
catch (Exception ex)
245243
{

Test/Test.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFrameworks>net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
55
<RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
66
<OutputType>Exe</OutputType>
7+
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
78
</PropertyGroup>
89

910
<ItemGroup>

0 commit comments

Comments
 (0)