From 9fd334a0ce8dffee602bfc1a8f6d9217e0314d5e Mon Sep 17 00:00:00 2001 From: Seonyoung Park <48307770+seonyounggg@users.noreply.github.com> Date: Tue, 18 Aug 2020 16:09:22 +0900 Subject: [PATCH] Remove unused local issue #30457 remove unused local variable tempHandle at line 62 --- .../System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs index 4e6e6259a7aee..32e9694375fd4 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs @@ -59,9 +59,6 @@ public static unsafe MemoryMappedView CreateView(SafeMemoryMappedFileHandle memM // VirtualQueryEx: https://msdn.microsoft.com/en-us/library/windows/desktop/aa366907(v=vs.85).aspx if (((viewInfo.State & Interop.Kernel32.MemOptions.MEM_RESERVE) != 0) || ((ulong)viewSize < (ulong)nativeSize)) { - IntPtr tempHandle = Interop.VirtualAlloc( - viewHandle, (UIntPtr)(nativeSize != MemoryMappedFile.DefaultSize ? nativeSize : viewSize), - Interop.Kernel32.MemOptions.MEM_COMMIT, MemoryMappedFile.GetPageAccess(access)); int lastError = Marshal.GetLastWin32Error(); if (viewHandle.IsInvalid) {