Using supported syntax for restoring warnings - VS2019 complains about enable. (#9107)

This commit is contained in:
Staffan Gustafsson authored and Ilya committed 2019-03-11 14:42:41 +05:00
1 parent e3829cb60f
commit 6c049d0cb3
4 files changed
+8 -8

No files matched your search

@@ -188,7 +188,7 @@ namespace Microsoft.PowerShell.Commands
// Get path
return instance.Properties["PSPath"].Value.ToString();
#pragma warning enable 56506
#pragma warning restore 56506
}
}
@@ -315,7 +315,7 @@ namespace System.Management.Automation
ElementDescriptionPointer = (IntPtr)(ElementDescriptionArrayPtr.ToInt64() + ElementDescriptionArrayByteOffset);
}
#pragma warning enable 56515
#pragma warning restore 56515
ElementDescription = Marshal.PtrToStructure<COM.ELEMDESC>(ElementDescriptionPointer);
@@ -190,7 +190,7 @@ namespace System.Management.Automation
IntPtr.Zero,
pSignInfo,
IntPtr.Zero);
#pragma warning enable 56523
#pragma warning restore 56523
if (si.pSignExtInfo != null)
{
@@ -513,7 +513,7 @@ namespace System.Management.Automation
IntPtr.Zero,
WINTRUST_ACTION_GENERIC_VERIFY_V2,
wtdBuffer);
#pragma warning enable 56523
#pragma warning restore 56523
wtData = Marshal.PtrToStructure<NativeMethods.WINTRUST_DATA>(wtdBuffer);
}
@@ -538,7 +538,7 @@ namespace System.Management.Automation
#pragma warning disable 56523
IntPtr pCert =
NativeMethods.WTHelperGetProvCertFromChain(pSigner, 0);
#pragma warning enable 56523
#pragma warning restore 56523
if (pCert != IntPtr.Zero)
{
@@ -608,7 +608,7 @@ namespace System.Management.Automation
#pragma warning disable 56523
IntPtr pProvData =
NativeMethods.WTHelperProvDataFromStateData(wvtStateData);
#pragma warning enable 56523
#pragma warning restore 56523
if (pProvData != IntPtr.Zero)
{
@@ -1067,7 +1067,7 @@ namespace System.Management.Automation.Security
IntPtr.Zero,
WINTRUST_ACTION_GENERIC_VERIFY_V2,
wtdBuffer);
#pragma warning enable 56523
#pragma warning restore 56523
wtd = Marshal.PtrToStructure<WINTRUST_DATA>(wtdBuffer);
}
@@ -1202,7 +1202,7 @@ namespace System.Management.Automation.Security
IntPtr.Zero,
WINTRUST_ACTION_GENERIC_VERIFY_V2,
wtdBuffer);
#pragma warning enable 56523
#pragma warning restore 56523
}
finally
{