Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public static string GetPath(PSObject instance)

// Get path
return instance.Properties["PSPath"].Value.ToString();
#pragma warning enable 56506
#pragma warning restore 56506
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/System.Management.Automation/engine/COM/ComUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ internal static ParameterInformation[] GetParameterInformation(COM.FUNCDESC func
ElementDescriptionPointer = (IntPtr)(ElementDescriptionArrayPtr.ToInt64() + ElementDescriptionArrayByteOffset);
}

#pragma warning enable 56515
#pragma warning restore 56515

ElementDescription = Marshal.PtrToStructure<COM.ELEMDESC>(ElementDescriptionPointer);

Expand Down
8 changes: 4 additions & 4 deletions src/System.Management.Automation/security/Authenticode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ internal static Signature SignFile(SigningOption option,
IntPtr.Zero,
pSignInfo,
IntPtr.Zero);
#pragma warning enable 56523
#pragma warning restore 56523

if (si.pSignExtInfo != null)
{
Expand Down Expand Up @@ -513,7 +513,7 @@ private static DWORD GetWinTrustData(string fileName, string fileContent,
IntPtr.Zero,
WINTRUST_ACTION_GENERIC_VERIFY_V2,
wtdBuffer);
#pragma warning enable 56523
#pragma warning restore 56523

wtData = Marshal.PtrToStructure<NativeMethods.WINTRUST_DATA>(wtdBuffer);
}
Expand All @@ -538,7 +538,7 @@ private static X509Certificate2 GetCertFromChain(IntPtr pSigner)
#pragma warning disable 56523
IntPtr pCert =
NativeMethods.WTHelperGetProvCertFromChain(pSigner, 0);
#pragma warning enable 56523
#pragma warning restore 56523

if (pCert != IntPtr.Zero)
{
Expand Down Expand Up @@ -608,7 +608,7 @@ private static bool TryGetProviderSigner(IntPtr wvtStateData, out IntPtr pProvSi
#pragma warning disable 56523
IntPtr pProvData =
NativeMethods.WTHelperProvDataFromStateData(wvtStateData);
#pragma warning enable 56523
#pragma warning restore 56523

if (pProvData != IntPtr.Zero)
{
Expand Down
4 changes: 2 additions & 2 deletions src/System.Management.Automation/security/nativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ internal static DWORD DestroyWintrustDataStruct(WINTRUST_DATA wtd)
IntPtr.Zero,
WINTRUST_ACTION_GENERIC_VERIFY_V2,
wtdBuffer);
#pragma warning enable 56523
#pragma warning restore 56523

wtd = Marshal.PtrToStructure<WINTRUST_DATA>(wtdBuffer);
}
Expand Down Expand Up @@ -1202,7 +1202,7 @@ internal static void FreeWVTStateData(System.IntPtr phWVTStateData)
IntPtr.Zero,
WINTRUST_ACTION_GENERIC_VERIFY_V2,
wtdBuffer);
#pragma warning enable 56523
#pragma warning restore 56523
}
finally
{
Expand Down