[System] Clean up some warnings
authorMarek Safar <marek.safar@gmail.com>
Tue, 25 Oct 2016 12:28:35 +0000 (14:28 +0200)
committerMarek Safar <marek.safar@gmail.com>
Tue, 25 Oct 2016 12:28:35 +0000 (14:28 +0200)
46 files changed:
external/boringssl
mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificate.cs
mcs/class/Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs
mcs/class/System/Makefile
mcs/class/System/Mono.Btls/MonoBtlsContext.cs
mcs/class/System/Mono.Btls/MonoBtlsX509StoreManager.cs
mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs
mcs/class/System/Mono.Net.Security/LegacySslStream.cs
mcs/class/System/Mono.Net.Security/MonoTlsStream.cs
mcs/class/System/ReferenceSources/CAPI.cs
mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs
mcs/class/System/System.CodeDom.Compiler/TempFileCollection.cs
mcs/class/System/System.Configuration/AppSettingsReader.cs
mcs/class/System/System.Configuration/ConfigHelper.cs
mcs/class/System/System.Configuration/ConfigXmlDocument.cs
mcs/class/System/System.Configuration/ConfigurationSettings.cs
mcs/class/System/System.Configuration/NameValueFileSectionHandler.cs
mcs/class/System/System.Configuration/SingleTagSectionHandler.cs
mcs/class/System/System.Diagnostics/EventLog.cs
mcs/class/System/System.Diagnostics/PerformanceCounter.cs
mcs/class/System/System.Diagnostics/Win32EventLog.cs
mcs/class/System/System.IO/FileSystemWatcher.cs
mcs/class/System/System.IO/FileSystemWatcher_mobile.cs
mcs/class/System/System.Net.Configuration/ConnectionManagementHandler.cs
mcs/class/System/System.Net.Configuration/WebRequestModuleHandler.cs
mcs/class/System/System.Net.NetworkInformation/IPGlobalProperties.cs
mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
mcs/class/System/System.Net.NetworkInformation/Ping.cs
mcs/class/System/System.Net.Security/SslStream.cs
mcs/class/System/System.Net.Sockets/Socket.cs
mcs/class/System/System.Net/HttpListenerRequest.cs
mcs/class/System/System.Net/ResponseStream.cs
mcs/class/System/System.Net/ServicePointManager.cs
mcs/class/System/System.Security.AccessControl/SemaphoreSecurity.cs
mcs/class/referencesource/System/compmod/system/componentmodel/TypeDescriptor.cs
mcs/class/referencesource/System/compmod/system/diagnostics/TraceInternal.cs
mcs/class/referencesource/System/net/System/Net/IPAddress.cs
mcs/class/referencesource/System/net/System/Net/Internal.cs
mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs
mcs/class/referencesource/System/net/System/Net/cookiecontainer.cs
mcs/class/referencesource/System/net/System/Net/filewebrequest.cs
mcs/class/referencesource/System/net/System/Net/mail/MimeBasePart.cs
mcs/class/referencesource/System/regex/system/text/regularexpressions/Regex.cs
mcs/class/referencesource/System/regex/system/text/regularexpressions/RegexParser.cs
mcs/class/referencesource/System/services/monitoring/system/diagnosticts/Process.cs
mcs/class/referencesource/System/sys/system/threading/semaphore.cs

index 9ad688f0ae679b32e9c0a9b21bb63a4488c28b6b..432738a3c938b4f751307301c6aa07f2027a8864 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 9ad688f0ae679b32e9c0a9b21bb63a4488c28b6b
+Subproject commit 432738a3c938b4f751307301c6aa07f2027a8864
index f92ad900e84de0dc65e7169d767c6164d76139da..89f9aaed0748d2760ef74c49be8c6763426889de 100644 (file)
@@ -72,7 +72,7 @@ namespace Mono.Security.Protocol.Tls.Handshake.Client
 
                private void GetClientCertificate ()
                {
-#warning "Client certificate selection is unfinished"
+// TODO: Client certificate selection is unfinished
                        ClientContext context = (ClientContext)this.Context;
 
                        // note: the server may ask for mutual authentication 
index b3831248d425de52dae3104c78ee4362e4ca1334..f741f95a7daf8097d8900daa2f32cd2c480bdb7a 100644 (file)
@@ -73,7 +73,7 @@ namespace Mono.Security.Protocol.Tls.Handshake.Client
                        // Check server prf against client prf
                        if (!Compare (clientHash, serverHash))
                        {
-#warning Review that selected alert is correct
+// TODO: Review that selected alert is correct
                                throw new TlsException(AlertDescription.InsuficientSecurity, "Invalid ServerFinished message received.");
                        }
                }
index 29eace8a1ff7c66b451fd4ab2197116fb5d79df9..e78fabeda46889c5484667d34a13c874da8c6332 100644 (file)
@@ -40,7 +40,7 @@ REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_PROCESS_START
 TEST_MCS_FLAGS += -d:MONO_FEATURE_PROCESS_START
 endif
 
-LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%)
+LIB_MCS_FLAGS = -d:CONFIGURATION_2_0 $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%)
 
 ifdef DYNAMIC_BTLS
 LIB_MCS_FLAGS += -d:DYNAMIC_BTLS
@@ -67,7 +67,7 @@ TXT_RESOURCE_STRINGS = ../referencesource/System/System.txt
 # MOBILE_PROFILE needs SECURITY_DEP
 #
 ifdef MOBILE_PROFILE
-LIB_MCS_FLAGS += -d:INSIDE_SYSTEM -d:SECURITY_DEP
+LIB_MCS_FLAGS += -d:INSIDE_SYSTEM -d:SECURITY_DEP -nowarn:618,1635
 else
 EXTERN_ALIAS_FLAGS = -d:MONO_SECURITY_ALIAS
 endif
index c06688dc86eee8fdd083e5f42ce1c9c06bce3472..0d2a57a445abf9c6b6878f3957818b95aae1eba9 100644 (file)
@@ -154,12 +154,9 @@ namespace Mono.Btls
                        }
                }
 
-               Exception GetException (MonoBtlsSslError status)
+               static Exception GetException (MonoBtlsSslError status)
                {
                        var error = MonoBtlsError.GetError ();
-                       if (error == null)
-                               return new MonoBtlsException (status);
-
                        var text = MonoBtlsError.GetErrorString (error);
                        return new MonoBtlsException ("{0} {1}", status, text);
                }
index 13c92a29ef0560a9db89b0ae81a2b2af5e2e2e66..66251a6b25dfcfeb42435326af90af582479bac8 100644 (file)
@@ -45,12 +45,14 @@ namespace Mono.Btls
        static class MonoBtlsX509StoreManager
        {
                static bool initialized;
+#if !ANDROID
                static string machineTrustedRootPath;
                static string machineIntermediateCAPath;
                static string machineUntrustedPath;
                static string userTrustedRootPath;
                static string userIntermediateCAPath;
                static string userUntrustedPath;
+#endif
 
                static void Initialize ()
                {
index 929e88e2295149ca35dcc8ba8227daf95d2be184..324192d6af182a898272432a394351099def6971 100644 (file)
@@ -75,6 +75,8 @@ namespace Mono.Net.Security
                readonly MonoTlsStream tlsStream;
                readonly HttpWebRequest request;
 
+#pragma warning disable 618
+
                internal static ICertificateValidator GetInternalValidator (MonoTlsProvider provider, MonoTlsSettings settings)
                {
                        if (settings == null)
@@ -182,6 +184,8 @@ namespace Mono.Net.Security
                                certValidationCallback = ServicePointManager.ServerCertValidationCallback;
                }
 
+#pragma warning restore 618
+
                static X509Certificate DefaultSelectionCallback (string targetHost, X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string[] acceptableIssuers)
                {
                        X509Certificate clientCertificate;
index 7ec9a86813977d98ddcf63b3d85b52cfdf69deb2..1ca30e6c96daf0e2b1a8c457dab8464d83a2141e 100644 (file)
@@ -316,12 +316,14 @@ namespace Mono.Net.Security.Private
 */
                X509Certificate OnCertificateSelection (X509CertificateCollection clientCerts, X509Certificate serverCert, string targetHost, X509CertificateCollection serverRequestedCerts)
                {
+#pragma warning disable 618
                        string [] acceptableIssuers = new string [serverRequestedCerts != null ? serverRequestedCerts.Count : 0];
                        for (int i = 0; i < acceptableIssuers.Length; i++)
                                acceptableIssuers [i] = serverRequestedCerts [i].GetIssuerName ();
                        X509Certificate clientCertificate;
                        certificateValidator.SelectClientCertificate (targetHost, clientCerts, serverCert, acceptableIssuers, out clientCertificate);
                        return clientCertificate;
+#pragma warning restore 618
                }
 
                public virtual IAsyncResult BeginAuthenticateAsClient (string targetHost, AsyncCallback asyncCallback, object asyncState)
index 4625f2f53c20faf9bd5e30386aed0cbee5d5733f..6e0e2a9b1f0740cfe7ebbcb7b0aaa98b56191efd 100644 (file)
@@ -101,7 +101,7 @@ namespace Mono.Net.Security
                                        ServicePointManager.CheckCertificateRevocationList);
 
                                status = WebExceptionStatus.Success;
-                       } catch (Exception ex) {
+                       } catch (Exception) {
                                status = WebExceptionStatus.SecureChannelFailure;
                                throw;
                        } finally {
index 28e1c47e7d5801e8d0e81f3d2ad4db6c755c625d..9a8d89fab44999c3f6cbb4198abefb16585afccc 100644 (file)
@@ -27,8 +27,6 @@ namespace System.Security.Cryptography {
                                return "md2RSA";
                        case "1.2.840.113549.1.1.3":
                                return "md4RSA";
-                               return "md4RSA";
-                               return "md4RSA";
                        case "1.3.14.3.2.27":
                                return "dsaSHA1";
                        case "2.16.840.1.101.2.1.1.19":
index b24eda319cfeab888dc038a778aa6d7d2ec47c07..192f1c070739da293c929c92976b268f2e2f7a8c 100644 (file)
@@ -37,6 +37,8 @@ using System.IO;
 using System.Runtime.InteropServices;
 using System.Security.Permissions;
 
+#pragma warning disable 618
+
 namespace System.CodeDom.Compiler {
 
        [ComVisible (true)]
@@ -314,3 +316,5 @@ namespace System.CodeDom.Compiler {
                }               
        }
 }
+
+#pragma warning restore 618
\ No newline at end of file
index 80c30eece70d9d13e40ed5d50ffb86c729d42938..2f679cb6895010260c4996643d1da974189921ed 100644 (file)
@@ -103,11 +103,13 @@ namespace System.CodeDom.Compiler {
                                                }
                                        }
 
+#if FEATURE_MONO_CAS
                                        // and you must have discovery access to the combined path
                                        // note: the cache behaviour is tested in the CAS tests
                                        if (SecurityManager.SecurityEnabled) {
                                                new FileIOPermission (FileIOPermissionAccess.PathDiscovery, basepath).Demand ();
                                        }
+#endif
                                }
 
                                return(basepath);
index 7a0bd6ef5dff7a556ba5159e668a4887b9b1acb6..304238e63d589bfa889a0ebf06f25e432ab49023 100644 (file)
@@ -31,6 +31,8 @@
 using System.Reflection;
 using System.Collections.Specialized;
 
+#pragma warning disable 618
+
 namespace System.Configuration
 {
        public class AppSettingsReader
index 89adbe2589101044f97e5213389bd42f7dd8bb65..fd9bb69de96581ab123a4b99819b0d4bbf4bffd1 100644 (file)
@@ -34,6 +34,8 @@ using System.Collections.Specialized;
 using System.Xml;
 #endif
 
+#pragma warning disable 618
+
 namespace System.Configuration
 {
        class ConfigHelper
index 1ab98591990dbc8668c681db8452119b74526f55..c6ec61f1af60067e9072385ad0d2f13720d2f9a7 100644 (file)
@@ -37,6 +37,8 @@ using System.Security.Permissions;
 #if (XML_DEP)
 using System.Xml;
 
+#pragma warning disable 618
+
 namespace System.Configuration
 {
        [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
index 9b2f8e9986b8768ff7ae95a95620bbb19cb9d7a1..8a038c81aa62ecee7ab1d79e8db136561da1886c 100644 (file)
@@ -43,6 +43,8 @@ using System.Xml;
 using System.Xml.XPath;
 #endif
 
+#pragma warning disable 618
+
 namespace System.Configuration
 {
        public sealed class ConfigurationSettings
index efa336e927c8ee4f3ba5a20f26045ba53fe8ba00..301c65d87b5cdce21a45a07671e2353392bfa6a2 100644 (file)
@@ -37,6 +37,8 @@ using System.Xml;
 using XmlNode = System.Object;
 #endif
 
+#pragma warning disable 618
+
 namespace System.Configuration
 {
        public class NameValueFileSectionHandler : IConfigurationSectionHandler
index 346b5b5f3a1fe5f91f77e8ac753035bb1e59903a..9c66654b3da57cc359f6a4def3d0fa09a075708b 100644 (file)
@@ -36,6 +36,8 @@ using System.Xml;
 using XmlNode = System.Object;
 #endif
 
+#pragma warning disable 618
+
 namespace System.Configuration
 {
        /// <summary>
index cecf7de61f45b6d20b1ff3c631e1e1c2d38a5403..e1940f910f25823b68a4bff1dc65ecb3e7da20d1 100644 (file)
@@ -32,7 +32,6 @@
 //
 
 using System;
-using System.Diagnostics;
 using System.Collections;
 using System.ComponentModel;
 using System.ComponentModel.Design;
@@ -40,6 +39,8 @@ using System.Globalization;
 using System.IO;
 using System.Runtime.InteropServices;
 
+#pragma warning disable 618
+
 namespace System.Diagnostics 
 {
        [DefaultEvent ("EntryWritten")]
index f76f0950f459bbf951ebbf0ebba82e30b0f097bf..4261b3bc491040c8aee0446fe9f8fa71be8313ae 100644 (file)
@@ -159,7 +159,7 @@ namespace System.Diagnostics {
                }
 
                // may throw ArgumentNullException
-               [DefaultValue (""), ReadOnly (true), RecommendedAsConfigurable (true)]
+               [DefaultValue (""), ReadOnly (true), SettingsBindable (true)]
                [TypeConverter ("System.Diagnostics.Design.CategoryValueConverter, " + Consts.AssemblySystem_Design)]
                [SRDescription ("The category name for this performance counter.")]
                public string CategoryName {
@@ -181,7 +181,7 @@ namespace System.Diagnostics {
                }
 
                // may throw ArgumentNullException
-               [DefaultValue (""), ReadOnly (true), RecommendedAsConfigurable (true)]
+               [DefaultValue (""), ReadOnly (true), SettingsBindable (true)]
                [TypeConverter ("System.Diagnostics.Design.CounterNameConverter, " + Consts.AssemblySystem_Design)]
                [SRDescription ("The name of this performance counter.")]
                public string CounterName 
@@ -212,7 +212,7 @@ namespace System.Diagnostics {
                        set { lifetime = value; }
                }
 
-               [DefaultValue (""), ReadOnly (true), RecommendedAsConfigurable (true)]
+               [DefaultValue (""), ReadOnly (true), SettingsBindable (true)]
                [TypeConverter ("System.Diagnostics.Design.InstanceNameConverter, " + Consts.AssemblySystem_Design)]
                [SRDescription ("The instance name for this performance counter.")]
                public string InstanceName {
@@ -227,7 +227,7 @@ namespace System.Diagnostics {
 
                // may throw ArgumentException if machine name format is wrong
                [MonoTODO("What's the machine name format?")]
-               [DefaultValue ("."), Browsable (false), RecommendedAsConfigurable (true)]
+               [DefaultValue ("."), Browsable (false), SettingsBindable (true)]
                [SRDescription ("The machine where this performance counter resides.")]
                public string MachineName {
                        get {return machineName;}
index 02e1e3d10009c8ba67b112e289c6f160184c1133..d3fd1d5770922196e794f133f9a1a420f5f1d495 100644 (file)
@@ -737,7 +737,7 @@ namespace System.Diagnostics
                        while (true) {
                                try {
                                        resetEvent.WaitOne ();
-                               } catch (ObjectDisposedException e) {
+                               } catch (ObjectDisposedException) {
                                        // Notifications have been disabled and event 
                                        // has been closed but not yet nulled. End thread.
                                        break;
index 43d3c2f362e1f681a13c46a53265585006de6e6a..53e31d61f7ea7d7891f431b4800e42ffe8b09d29 100644 (file)
@@ -224,7 +224,7 @@ namespace System.IO {
 
                [DefaultValue("*.*")]
                [IODescription("File name filter pattern")]
-               [RecommendedAsConfigurable(true)]
+               [SettingsBindable(true)]
                [TypeConverter ("System.Diagnostics.Design.StringValueConverter, " + Consts.AssemblySystem_Design)]
                public string Filter {
                        get { return filter; }
@@ -293,7 +293,7 @@ namespace System.IO {
 
                [DefaultValue("")]
                [IODescription("The directory to monitor")]
-               [RecommendedAsConfigurable(true)]
+               [SettingsBindable(true)]
                [TypeConverter ("System.Diagnostics.Design.StringValueConverter, " + Consts.AssemblySystem_Design)]
                [Editor ("System.Diagnostics.Design.FSWPathEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
                public string Path {
index 04bd35a142f7a54ca212fb25b2faa7cebe938cdd..e1031141a9fad2beb01ac72d286f28feade96d83 100644 (file)
@@ -28,6 +28,8 @@
 
 using System.ComponentModel;
 
+#pragma warning disable 67
+
 namespace System.IO
 {
     public class FileSystemWatcher : Component, IDisposable, ISupportInitialize
@@ -57,7 +59,6 @@ namespace System.IO
         protected void OnRenamed (RenamedEventArgs e) { throw new NotImplementedException (); }
         public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType) { throw new NotImplementedException (); }
         public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType, int timeout) { throw new NotImplementedException (); }
-        public virtual void Dispose () { throw new NotImplementedException (); }
         protected override void Dispose (bool disposing) { throw new NotImplementedException (); }
     }
 }
\ No newline at end of file
index 42a0d5afb7583832643a0cadd4e791a2d6f0c458..36a1db9d29b399399e103b3c3bd6909bcb4da2e3 100644 (file)
@@ -36,6 +36,8 @@ using System.Xml;
 using XmlNode = System.Object;
 #endif
 
+#pragma warning disable 618
+
 namespace System.Net.Configuration
 {
        class ConnectionManagementData
index 594803e2c2dc0314087b3dbec5c55e6ccd4f14c0..1bdf52da949c9952bb88fe1b193d263341de7a29 100644 (file)
@@ -64,9 +64,9 @@ namespace System.Net.Configuration
                                        continue;
                                }
 
-                               string prefix = HandlersUtil.ExtractAttributeValue ("prefix", child);
+                               //string prefix = HandlersUtil.ExtractAttributeValue ("prefix", child);
                                if (name == "add") {
-                                       string type = HandlersUtil.ExtractAttributeValue ("type", child, false);
+                                       //string type = HandlersUtil.ExtractAttributeValue ("type", child, false);
                                        if (child.Attributes != null && child.Attributes.Count != 0)
                                                HandlersUtil.ThrowException ("Unrecognized attribute", child);
 
index be2d13b71c02383937747b08837e1de486198005..6b5e60cdcff8abc84a7baa53eb32ef01b88254c7 100644 (file)
@@ -487,7 +487,7 @@ namespace System.Net.NetworkInformation {
 
                public override IcmpV4Statistics GetIcmpV4Statistics ()
                {
-                       if (!Socket.SupportsIPv4)
+                       if (!Socket.OSSupportsIPv4)
                                throw new NetworkInformationException ();
                        Win32_MIBICMPINFO stats;
                        GetIcmpStatistics (out stats, AF_INET);
@@ -505,7 +505,7 @@ namespace System.Net.NetworkInformation {
 
                public override IPGlobalStatistics GetIPv4GlobalStatistics ()
                {
-                       if (!Socket.SupportsIPv4)
+                       if (!Socket.OSSupportsIPv4)
                                throw new NetworkInformationException ();
                        Win32_MIB_IPSTATS stats;
                        GetIpStatisticsEx (out stats, AF_INET);
@@ -523,7 +523,7 @@ namespace System.Net.NetworkInformation {
 
                public override TcpStatistics GetTcpIPv4Statistics ()
                {
-                       if (!Socket.SupportsIPv4)
+                       if (!Socket.OSSupportsIPv4)
                                throw new NetworkInformationException ();
                        Win32_MIB_TCPSTATS stats;
                        GetTcpStatisticsEx (out stats, AF_INET);
@@ -541,7 +541,7 @@ namespace System.Net.NetworkInformation {
 
                public override UdpStatistics GetUdpIPv4Statistics ()
                {
-                       if (!Socket.SupportsIPv4)
+                       if (!Socket.OSSupportsIPv4)
                                throw new NetworkInformationException ();
                        Win32_MIB_UDPSTATS stats;
                        GetUdpStatisticsEx (out stats, AF_INET);
index 56d0e4d61f9453ecd233301ebdcf936cb30b354c..3f872e731c6a6f5fea677b5090f1e25112219f53 100644 (file)
@@ -510,7 +510,6 @@ namespace System.Net.NetworkInformation {
 #if MONOTOUCH || XAMMAC
                        return new MacOsNetworkInterfaceAPI ();
 #else
-                       Version windowsVer51 = new Version (5, 1);
                        bool runningOnUnix = (Environment.OSVersion.Platform == PlatformID.Unix);
 
                        if (runningOnUnix) {
@@ -521,6 +520,7 @@ namespace System.Net.NetworkInformation {
                        }
 
 #if !MOBILE
+                       Version windowsVer51 = new Version (5, 1);
                        if (Environment.OSVersion.Version >= windowsVer51)
                                return new Win32NetworkInterfaceAPI ();
 #endif
@@ -633,13 +633,13 @@ namespace System.Net.NetworkInformation {
 
 #if MONODROID
                [DllImport ("__Internal")]
-               protected static extern int _monodroid_get_android_api_level ();
+               static extern int _monodroid_get_android_api_level ();
 
                [DllImport ("__Internal")]
-               protected static extern bool _monodroid_get_network_interface_up_state (string ifname, ref bool is_up);
+               static extern bool _monodroid_get_network_interface_up_state (string ifname, ref bool is_up);
 
                [DllImport ("__Internal")]
-               protected static extern bool _monodroid_get_network_interface_supports_multicast (string ifname, ref bool supports_multicast);
+               static extern bool _monodroid_get_network_interface_supports_multicast (string ifname, ref bool supports_multicast);
 
                bool android_use_java_api;
 #endif
index 8232a9eaac445c5a035e6bff57ab6ef45357b3ff..c69388a58076e36d35a638b0dd911fcf785f9a46 100644 (file)
@@ -209,9 +209,12 @@ namespace System.Net.NetworkInformation {
 
                static IPAddress GetNonLoopbackIP ()
                {
+#pragma warning disable 618
                        foreach (IPAddress addr in Dns.GetHostByName (Dns.GetHostName ()).AddressList)
                                if (!IPAddress.IsLoopback (addr))
                                        return addr;
+#pragma warning restore 618
+
                        throw new InvalidOperationException ("Could not resolve non-loopback IP address for localhost");
                }
 
index bf483016db3025211c0293aa96997b51d9e4320f..701eaaad7616c9d654f109aab64485f554384be0 100644 (file)
@@ -94,7 +94,9 @@ namespace System.Net.Security
 
                static MonoTlsProvider GetProvider ()
                {
+#pragma warning disable 612
                        return MonoTlsProviderFactory.GetDefaultProvider ();
+#pragma warning restore 612
                }
 
                public SslStream (Stream innerStream)
index ceb1958c6c890650834747c3b4361fb6d40672d9..08c2630eaccea76530243ebdab360af8c5b468ce 100644 (file)
@@ -1754,7 +1754,7 @@ namespace System.Net.Sockets
                        if (endPoint == null)
                                throw new ArgumentNullException ("endPoint");
 
-                       SocketAsyncResult sockares = ValidateEndIAsyncResult (asyncResult, "EndReceiveMessageFrom", "asyncResult");
+                       /*SocketAsyncResult sockares =*/ ValidateEndIAsyncResult (asyncResult, "EndReceiveMessageFrom", "asyncResult");
 
                        throw new NotImplementedException ();
                }
index a9c5bb9ee32bb7e7a7208fb5ff68081f11a143de..a12aa233b71643e260d48e1ed79834390f9d6de0 100644 (file)
@@ -370,7 +370,7 @@ namespace System.Net {
                                                return false;
                                        if (InputStream.EndRead (ares) <= 0)
                                                return true;
-                               } catch (ObjectDisposedException e) {
+                               } catch (ObjectDisposedException) {
                                        input_stream = null;
                                        return true;
                                } catch {
index 6a47f40ae2a3cf823bfda8923e86cb2a7334e2f1..03993e989590fdf086917fa523d314b1dfa6d68d 100644 (file)
@@ -97,7 +97,7 @@ namespace System.Net {
                                                        InternalWrite (bytes, 0, bytes.Length);
                                                        trailer_sent = true;
                                                }
-                                       } catch (IOException ex) {
+                                       } catch (IOException) {
                                                // Ignore error due to connection reset by peer
                                        }
                                }
index d379526e80b9cb0510bd1619ad782d4d339d5fa3..56d682bd402541a3c79e35f0bcc17c1922525f86 100644 (file)
@@ -158,7 +158,10 @@ namespace System.Net
                                return;
                        }
 #endif
+
+#pragma warning disable 618
                        manager = (ConnectionManagementData) ConfigurationSettings.GetConfig (configKey);
+#pragma warning restore 618
                        if (manager != null) {
                                defaultConnectionLimit = (int) manager.GetMaxConnections ("*");                         
                        }
index ac6db80037dfe506d1b2da49ad07c8196424eb33..2d7dd557095b3061703d872fd14f33aeff1e6d2f 100644 (file)
@@ -133,7 +133,7 @@ namespace System.Security.AccessControl
                        SetAuditRule((AuditRule)rule);
                }
                
-               internal new void Persist (SafeHandle handle)
+               internal void Persist (SafeHandle handle)
                {
                        WriteLock();
                        try {
index cf77c9972b2967219bba6e0992252ca86961ca7c..17c7e0f4077176e2fa91f6be683afadc8abb0796 100644 (file)
@@ -2348,11 +2348,11 @@ namespace System.ComponentModel
             {
                 TypeDescriptionNode head = (TypeDescriptionNode)_providerTable[key];
                 TypeDescriptionNode target = head;
-                TypeDescriptionNode prev = null;
+//                TypeDescriptionNode prev = null;
 
                 while(target != null && target.Provider != provider)
                 {
-                    prev = target;
+//                    prev = target;
                     target = target.Next;
                 }
 
index c400a3e411cdb36b18b7ec5dae2ca8191195b43c..1a4cd98d9610c35ddffd981e873d86431f1cc08d 100644 (file)
@@ -18,8 +18,10 @@ namespace System.Diagnostics {
         [ThreadStatic]
         static int indentLevel;
         static volatile int indentSize;
+#if CONFIGURATION_DEP
         static volatile bool settingsInitialized;
         static volatile bool defaultInitialized;
+#endif
 
 
         // this is internal so TraceSource can use it.  We want to lock on the same object because both TraceInternal and 
@@ -303,7 +305,9 @@ namespace System.Diagnostics {
         // in the System.Diagnostics.Trace class
         static internal void Refresh() {
             lock (critSec) {
+#if CONFIGURATION_DEP
                 settingsInitialized = false;
+#endif
                 listeners = null;
             }
             InitializeSettings();
index e3273c4c9c95a17746b5cae33d505851391c123c..dce8967231569d9d14eec974bc8db728257042b2 100644 (file)
@@ -183,8 +183,8 @@ namespace System.Net {
                 // call !
                 //
                 SocketException e = null;
-                long   scope = 0;
 #if !MONO
+                long   scope = 0;
                 if(Socket.OSSupportsIPv6)
                 {
                     byte[] bytes = new byte[IPv6AddressBytes];
index 05732c28d3646eba263c003145863812cd75f45d..bcd27d93699729e0b16b473c2ae353aa9e4ed5af 100644 (file)
@@ -953,7 +953,7 @@ namespace System.Net {
         // There are threading tricks a malicious app can use to create an ArraySegment with mismatched 
         // array/offset/count.  Copy locally and make sure they're valid before using them.
         internal static void ValidateSegment(ArraySegment<byte> segment) {
-            if (segment == null || segment.Array == null) {
+            if (/*segment == null ||*/ segment.Array == null) {
                 throw new ArgumentNullException("segment");
             }
             // Length zero is explicitly allowed
index 16169a1b7a530a37fbfe7665dd326b55a15ae5de..ee56c48eabc29f3a64539b00758f7abba3abc914 100644 (file)
@@ -122,7 +122,9 @@ namespace System.Net.Sockets {
         internal static volatile bool s_SupportsIPv6;
         internal static volatile bool s_OSSupportsIPv6;
         internal static volatile bool s_Initialized;
+#if !MONO
         private static volatile WaitOrTimerCallback s_RegisteredWaitCallback;
+#endif
         private static volatile bool s_LoggingEnabled;
 #if !FEATURE_PAL // perfcounter
         internal static volatile bool s_PerfCountersEnabled;
index fec514b0dbc2bbdd1316a3f5521eb7ce3b01649a..a97f9ae48b1d21ff3d3c2b138bcb76b004c2d4bd 100644 (file)
@@ -379,7 +379,9 @@ namespace System.Net {
             DateTime tempUsed;
 
             CookieCollection lruCc = null;
+#if !MONO
             string   lruDomain =  null;
+#endif
             string   tempDomain = null;
 
             PathList pathList;
@@ -415,7 +417,9 @@ namespace System.Net {
                             // we also find the least used cookie collection in ENTIRE container
                             // we count the collection as LRU only if it holds 1+ elements
                             if (cc.Count > 0 && (tempUsed = cc.TimeStamp(CookieCollection.Stamp.Check)) < oldUsed) {
+#if !MONO
                                 lruDomain = tempDomain;
+#endif
                                 lruCc = cc;
                                 oldUsed = tempUsed;
                             }
index 8e2c50447f2275d3045433a231570f072dd588c1..db9d4cf6b280b082969542c428c3dbdffdc58587 100644 (file)
@@ -216,7 +216,9 @@ namespace System.Net {
         public override IAsyncResult BeginGetRequestStream(AsyncCallback callback, object state)
         {
             GlobalLog.Enter("FileWebRequest::BeginGetRequestStream");
+#if !MONO
             bool success = true;
+#endif
             try {
                 if (Aborted)
                     throw ExceptionHelper.RequestAbortedException;
@@ -244,7 +246,9 @@ namespace System.Net {
                 m_ReadAResult = new LazyAsyncResult(this, state, callback);
                 ThreadPool.QueueUserWorkItem(s_GetRequestStreamCallback, m_ReadAResult);
             } catch (Exception exception) {
+#if !MONO
                 success = false; 
+#endif
                 if(Logging.On)Logging.Exception(Logging.Web, this, "BeginGetRequestStream", exception);
                 throw;
             } finally {
@@ -263,7 +267,9 @@ namespace System.Net {
         public override IAsyncResult BeginGetResponse(AsyncCallback callback, object state)
         {
             GlobalLog.Enter("FileWebRequest::BeginGetResponse");
+#if !MONO
             bool success = true;
+#endif
 
             try {
                 if (Aborted)
@@ -280,7 +286,9 @@ namespace System.Net {
                 m_WriteAResult = new LazyAsyncResult(this,state,callback);
                 ThreadPool.QueueUserWorkItem(s_GetResponseCallback,m_WriteAResult);
             } catch (Exception exception) {
+#if !MONO
                 success = false;
+#endif
                 if(Logging.On)Logging.Exception(Logging.Web, this, "BeginGetResponse", exception);
                 throw;
             } finally {
@@ -304,7 +312,9 @@ namespace System.Net {
             GlobalLog.Enter("FileWebRequest::EndGetRequestStream");
 
             Stream stream;
+#if !MONO
             bool success = false;
+#endif
             try {
                 LazyAsyncResult  ar = asyncResult as LazyAsyncResult;
                 if (asyncResult == null || ar == null) {
@@ -319,7 +329,9 @@ namespace System.Net {
                 }
                 stream = (Stream) result;
                 m_writePending = false;
+#if !MONO
                 success = true;
+#endif
             } catch (Exception exception) {
                 if(Logging.On)Logging.Exception(Logging.Web, this, "EndGetRequestStream", exception);
                 throw;
@@ -340,7 +352,9 @@ namespace System.Net {
             GlobalLog.Enter("FileWebRequest::EndGetResponse");
 
             WebResponse response;
+#if !MONO
             bool success = false;
+#endif
             try {
                 LazyAsyncResult  ar = asyncResult as LazyAsyncResult;
                 if (asyncResult == null || ar == null) {
@@ -356,7 +370,9 @@ namespace System.Net {
                 }
                 response = (WebResponse) result;
                 m_readPending = false;
+#if !MONO
                 success = true;
+#endif
             } catch (Exception exception) {
                 if(Logging.On)Logging.Exception(Logging.Web, this, "EndGetResponse", exception);
                 throw;
index 8fa1b7eea41403f232d32a996504bfe9d9531882..5ae0b4b7f8e32be831ab846e40b66e43067b3611 100644 (file)
@@ -30,7 +30,7 @@ namespace System.Net.Mime
 
         //used when the length of the header name itself is known (i.e. Subject : )
         internal static string EncodeHeaderValue(string value, Encoding encoding, bool base64Encoding, int headerLength) {
-            StringBuilder newString = new StringBuilder();
+//            StringBuilder newString = new StringBuilder();
             
             //no need to encode if it's pure ascii
             if (IsAscii(value, false)) {
index 4675771138671184da9cab61a354f3441eebb24c..8d93ee8c2d0e56ccd2e5054bdf12f1ca0b8c67f8 100644 (file)
@@ -1408,12 +1408,16 @@ namespace System.Text.RegularExpressions {
         /// <devdoc>
         /// </devdoc>
         protected bool UseOptionC() {
-               /* Mono: Set to false until we investigate  https://bugzilla.xamarin.com/show_bug.cgi?id=25671 */
-           return false;
 #if FULL_AOT_RUNTIME
             return false;
 #else
+
+#if MONO
+            /* Mono: Set to false until we investigate  https://bugzilla.xamarin.com/show_bug.cgi?id=25671 */
+            return false;
+#else
             return(roptions & RegexOptions.Compiled) != 0;
+#endif
 #endif
         }
 #endif
index 8cf2d64a9db72d7fbd5253643d7d9e9cb7a25b28..d9c27a4ffec108c1cefd334bc83cec6e89e708ec 100644 (file)
@@ -567,11 +567,11 @@ namespace System.Text.RegularExpressions {
                     // This is code for Posix style properties - [:Ll:] or [:IsTibetan:].
                     // It currently doesn't do anything other than skip the whole thing!
                     if (CharsRight() > 0 && RightChar() == ':' && !inRange) {
-                        String name;
+//                        String name;
                         int savePos = Textpos();
 
                         MoveRight();
-                        name = ScanCapname();
+/*                        name = */ ScanCapname();
                         if (CharsRight() < 2 || MoveRightGetChar() != ':' || MoveRightGetChar() != ']')
                             Textto(savePos);
                         // else lookup name (nyi)
index 13016654b5ce11c726809607480a982610e976c0..1bae2cf63bf817810294f9c3df7bdad70719e510 100644 (file)
@@ -66,16 +66,20 @@ namespace System.Diagnostics {
         ProcessModuleCollection modules;
 #endif // !FEATURE_PAL        
 
+#if !MONO
         bool haveMainWindow;
         IntPtr mainWindowHandle;  // no need to use SafeHandle for window        
         string mainWindowTitle;
+#endif
         
         bool haveWorkingSetLimits;
         IntPtr minWorkingSet;
         IntPtr maxWorkingSet;
-        
+
+#if !MONO
         bool haveProcessorAffinity;
         IntPtr processorAffinity;
+#endif
 
         bool havePriorityClass;
         ProcessPriorityClass priorityClass;
@@ -1870,12 +1874,18 @@ namespace System.Diagnostics {
             threads = null;
             modules = null;
 #endif // !FEATURE_PAL            
+#if !MONO
             mainWindowTitle = null;
+#endif
             exited = false;
             signaled = false;
+#if !MONO
             haveMainWindow = false;
+#endif
             haveWorkingSetLimits = false;
+#if !MONO
             haveProcessorAffinity = false;
+#endif
             havePriorityClass = false;
             haveExitTime = false;
 #if !MONO
index eae169c364f07c1c70e52b8a7aac444dadda66b0..2ec06ebb237033e4279c08170534ccad8381eac1 100644 (file)
@@ -251,6 +251,9 @@ namespace System.Threading
 #endif
 
         // This exists in WaitHandle, but is oddly ifdefed for some reason...
+#if MONO
+        new
+#endif
         private enum OpenExistingResult
         {
             Success,
@@ -362,7 +365,7 @@ namespace System.Threading
             //Non-Zero return 
 
 #if MONO
-            if (!ReleaseSemaphore_internal(Handle, releaseCount, out previousCount))
+            if (!ReleaseSemaphore_internal(SafeWaitHandle.DangerousGetHandle(), releaseCount, out previousCount))
 #else
             if (!SafeNativeMethods.ReleaseSemaphore(SafeWaitHandle, releaseCount, out previousCount))
 #endif