From 935c8a1e67d2f32bc7395b9125a1d434946c8ab6 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Tue, 3 Feb 2015 10:18:32 -0800 Subject: [PATCH] Fix mscorlib warnings. PinnableBufferCache uses some of the declaritive CAS attributes which don't mean anything on CoreCLR. We had disabled this warning internally, but this copy of the file is specific to open source and we didn't disable it in this file. This simply ports the change to disable this warning to mscorlib's copy of the file. --- src/mscorlib/Common/PinnableBufferCache.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mscorlib/Common/PinnableBufferCache.cs b/src/mscorlib/Common/PinnableBufferCache.cs index c850663196ce..7368c2d92736 100644 --- a/src/mscorlib/Common/PinnableBufferCache.cs +++ b/src/mscorlib/Common/PinnableBufferCache.cs @@ -45,7 +45,9 @@ internal sealed class PinnableBufferCache /// This is only used in mscorlib. /// #if (ENABLE || MINBUFFERS) +#pragma warning disable 618 [EnvironmentPermission(SecurityAction.Assert, Unrestricted = true)] +#pragma warning restore 618 [System.Security.SecuritySafeCritical] #endif internal PinnableBufferCache(string cacheName, Func factory)