Skip to content

Commit

Permalink
Fix build warnings (dotnet#31863)
Browse files Browse the repository at this point in the history
  • Loading branch information
nxtn authored Feb 8, 2020
1 parent 20add00 commit b276ba0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/coreclr/tests/external/external.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<PackageToInclude Include="xunit.performance.metrics"/>
<PackageToInclude Include="Microsoft.Diagnostics.Tracing.TraceEvent"/>
<PackageToInclude Include="Newtonsoft.Json"/>
<PackageToInclude Include="Newtonsoft.Json.Bson"/>
<PackageToInclude Include="Microsoft.CodeAnalysis.Analyzers"/>
<PackageToInclude Include="Microsoft.CodeAnalysis.Common"/>
<PackageToInclude Include="Microsoft.CodeAnalysis.Compilers"/>
Expand All @@ -77,6 +78,7 @@
<PackageReference Include="xunit.performance.metrics" Version="$(XunitPerformanceApiPackageVersion)" />
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="$(MicrosoftDiagnosticsTracingTraceEventPackageVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2" />
<PackageReference Include="xunit" Version="$(XUnitVersion)" />
<PackageReference Include="$(MicrosoftDotNetXUnitConsoleRunnerPackage)" Version="$(MicrosoftDotNetXUnitConsoleRunnerVersion)" GeneratePathProperty="True" />
<PackageReference Include="xunit.runner.utility" Version="$(XUnitVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,11 @@ private void DeserializeJsonNetBinaryBench()
private void DeserializeJsonNetBinaryBenchInner()
{
Newtonsoft.Json.JsonSerializer ds = new Newtonsoft.Json.JsonSerializer();
TestObject t;
Type ty = typeof(TestObject);
for (int i = 0; i < JsonNetIterations; i++)
{
BsonReader br = new BsonReader(new MemoryStream(JsonNetBinary));
t = (TestObject) ds.Deserialize(br, ty);
BsonDataReader br = new BsonDataReader(new MemoryStream(JsonNetBinary));
TestObject t = (TestObject)ds.Deserialize(br, ty);
Escape(t.Name);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private void SerializeJsonNetBinaryBenchInner(object o, MemoryStream ms)
for (int i = 0; i < Iterations; i++)
{
var s = new Newtonsoft.Json.JsonSerializer();
var w = new BsonWriter(ms);
var w = new BsonDataWriter(ms);
s.Serialize(w, o);
Escape(w);
w.Flush();
Expand Down

0 comments on commit b276ba0

Please sign in to comment.