Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2019-08-05 18:05:14 +0300
committerMarek Safar <marek.safar@gmail.com>2019-08-07 10:48:03 +0300
commitc5027781de0dbc5e64ce3a3733dd710024e1b3f5 (patch)
tree8150c60f17f753388bc1c96323e01920ef0f9f4b /netcore
parent824351f49c7a9ba12deea83c24e32f23f77048c7 (diff)
Remove some unused locals (dotnet/corefx#39956)
* Remove some unused locals Trying out various analyzers, including one to flag unused locals. There are more than this, but this is a first batch. Some of these are just clean-up. Others are saving unnecessary cost. At least one appears to be a real functional bug. * Address PR feedback Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'netcore')
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Resources/ResourceReader.cs4
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs2
2 files changed, 3 insertions, 3 deletions
diff --git a/netcore/System.Private.CoreLib/shared/System/Resources/ResourceReader.cs b/netcore/System.Private.CoreLib/shared/System/Resources/ResourceReader.cs
index 55b6d77f03b..c0b2f5d4a9d 100644
--- a/netcore/System.Private.CoreLib/shared/System/Resources/ResourceReader.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Resources/ResourceReader.cs
@@ -869,7 +869,7 @@ namespace System.Resources
// Skip over the array of nameHashes.
_ums.Seek(seekPos, SeekOrigin.Current);
// get the position pointer once more to check that the whole table is within the stream
- byte* junk = _ums.PositionPointer;
+ _ = _ums.PositionPointer;
}
}
@@ -901,7 +901,7 @@ namespace System.Resources
// Skip over the array of namePositions.
_ums.Seek(seekPos, SeekOrigin.Current);
// get the position pointer once more to check that the whole table is within the stream
- byte* junk = _ums.PositionPointer;
+ _ = _ums.PositionPointer;
}
}
diff --git a/netcore/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs b/netcore/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
index 20a375135cc..5939d09047b 100644
--- a/netcore/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
@@ -654,7 +654,7 @@ namespace System.Threading.Tasks
catch
{
Debug.Assert(t.IsFaulted, "Task should be faulted due to the scheduler faulting it and throwing the exception.");
- var ignored = t.Exception;
+ _ = t.Exception;
throw;
}
finally { t.Dispose(); }