From 98730d28ae9d41e04c93c46e175b857e30273d35 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sun, 9 Dec 2018 16:23:56 +0100 Subject: [PATCH] How about now? --- Logic/Support/General.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Logic/Support/General.cs b/Logic/Support/General.cs index 718fa55a..40a7b297 100644 --- a/Logic/Support/General.cs +++ b/Logic/Support/General.cs @@ -22,9 +22,10 @@ namespace Swarmops.Logic.Support return; // disable "unreachable code" for the rest of this function, as the disabling is deliberate + // disable "variable declared but never used" because of the workaround last here // disable "variable is assigned a value that is never used" because of the workaround last here - #pragma warning disable 0168 + #pragma warning disable 0162,0168,0219 // X.509 is SO SO SO broken. The reason we do this, btw, is that mono doesn't come with root certs. At all. // This disables certificate checking completely and accepts ALL certificates. @@ -37,11 +38,11 @@ namespace Swarmops.Logic.Support // Further, instantiate an AesCryptoServiceProvider to make sure the linker doesn't optimize it away -- apparently // another known bug. The warning disabled here is "b is assigned a value that is never used". - #pragma warning disable 0219 + //#pragma warning disable 0219 System.Security.Cryptography.AesCryptoServiceProvider b = new System.Security.Cryptography.AesCryptoServiceProvider(); - #pragma warning restore 0219 + //#pragma warning restore 0219 - #pragma warning restore 0168 + #pragma warning restore 0162,0168,0219 } public static string GenerateSecureRandomKey(int byteCount)