Warnings cleanup
authorMarek Safar <marek.safar@gmail.com>
Thu, 15 Nov 2007 14:14:49 +0000 (14:14 -0000)
committerMarek Safar <marek.safar@gmail.com>
Thu, 15 Nov 2007 14:14:49 +0000 (14:14 -0000)
svn path=/trunk/mcs/; revision=89678

16 files changed:
mcs/class/System/Microsoft.VisualBasic/VBCodeCompiler.cs
mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs
mcs/class/System/System.ComponentModel.Design/DesignerTransactionCloseEventArgs.cs
mcs/class/System/System.ComponentModel/BackgroundWorker.cs
mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
mcs/class/System/System.Configuration/LocalFileSettingsProvider.cs
mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
mcs/class/System/System.Diagnostics/Switch.cs
mcs/class/System/System.Diagnostics/XmlWriterTraceListener.cs
mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
mcs/class/System/System.Net.Security/SslStream.cs
mcs/class/System/System.Net/FtpDataStream.cs
mcs/class/System/System.Net/FtpWebRequest.cs
mcs/class/System/System.Net/HttpConnection.cs
mcs/class/System/System.Net/HttpWebRequest.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs

index 866adfa0db11fab4563131d8056b74ccbd01b893..e3a1ebdc5c5ea9178976ac9c9bb1b304331479df 100644 (file)
@@ -48,7 +48,10 @@ namespace Microsoft.VisualBasic
        internal class VBCodeCompiler : VBCodeGenerator, ICodeCompiler
        {
                static string windowsMonoPath;
+#if NET_2_0
                static string windowsvbncPath;
+#endif
+
                static VBCodeCompiler ()
                {
                        if (Path.DirectorySeparatorChar == '\\') {
@@ -68,9 +71,6 @@ namespace Microsoft.VisualBasic
 #if NET_2_0
                                windowsvbncPath =
                                        Path.Combine (p, "2.0\\vbnc.exe");
-#else
-                               windowsvbncPath =
-                                       Path.Combine (p, "1.0\\vbnc.exe");
 #endif
                        }
                }
@@ -129,6 +129,7 @@ namespace Microsoft.VisualBasic
                        }
                }
 
+#if NET_2_0
                static string BuildArgs (CompilerParameters options, string[] fileNames)
                {
                        StringBuilder args = new StringBuilder ();
@@ -219,6 +220,7 @@ namespace Microsoft.VisualBasic
                {
                        return temp_files.AddExtension (extension, keepFile);
                }
+#endif
 
                private static string GetTempFileNameWithExtension (TempFileCollection temp_files, string extension)
                {
index 352b01cbae5c44af742dcbdf2c25c53afcea90fe..7ff01b07d8b160ccca624fddf59b49d14dc2aa5b 100644 (file)
@@ -66,14 +66,6 @@ namespace System.CodeDom.Compiler {
                        }
                }
 
-               //
-               // This is used to prevent confusing Moma about methods not implemented.
-               //
-               Exception GetNotImplemented ()
-               {
-                       return new NotImplementedException ();
-               }
-               
                //
                // Methods
                //
@@ -311,6 +303,13 @@ namespace System.CodeDom.Compiler {
                }
 #endif
                
+               //
+               // This is used to prevent confusing Moma about methods not implemented.
+               //
+               Exception GetNotImplemented ()
+               {
+                       return new NotImplementedException ();
+               }               
 #endif
        }
 }
index bfd755aa6ac2940f80b3bbacdbf9ed4d503cda09..50234f49a792991b1ab1f1047b686a5b9262440f 100644 (file)
@@ -36,22 +36,24 @@ namespace System.ComponentModel.Design
        public class DesignerTransactionCloseEventArgs : EventArgs
        {
                private bool commit;
+#if NET_2_0            
                private bool last_transaction;
+#endif
 
 #if NET_2_0
-               public
-#endif
-               DesignerTransactionCloseEventArgs (bool commit, bool lastTransaction)
+               public DesignerTransactionCloseEventArgs (bool commit, bool lastTransaction)
                {
                        this.commit = commit;
-                       last_transaction = lastTransaction;
+                       this.last_transaction = lastTransaction;
                }
+#endif
                
 #if NET_2_0
                [Obsolete ("Use another constructor that indicates lastTransaction")]
 #endif
-               public DesignerTransactionCloseEventArgs (bool commit) : this (commit, false)
+               public DesignerTransactionCloseEventArgs (bool commit)
                {
+                       this.commit = commit;
                }
 
 #if NET_2_0            
index 501ed004389c605457a81c3efabc85c225c68b73..ed9190cc5e8c6db9d60f326c4f6c3be241f13c12 100644 (file)
@@ -43,9 +43,6 @@ namespace System.ComponentModel
                AsyncOperation async;
                bool cancel_pending, report_progress = false, support_cancel = false;
 
-               Dictionary<object,AsyncOperation> operations =
-                       new Dictionary<object,AsyncOperation> ();
-
                public event DoWorkEventHandler DoWork;
                public event ProgressChangedEventHandler ProgressChanged;
                public event RunWorkerCompletedEventHandler RunWorkerCompleted;
index 2e2cd61e35cdb809a48de6c346e66c033e490153..fa93c412de811406bbc1e88361d385d57ad9d146 100644 (file)
@@ -578,8 +578,6 @@ namespace System.Configuration
                                if (userSection == null)
                                        continue;
 
-                               XmlDocument doc = new XmlDocument ();
-
                                foreach (SettingsPropertyValue value in collection) {
                                        if (checkUserLevel && value.Property.Attributes.Contains (typeof (SettingsManageabilityAttribute)) != isRoaming)
                                                continue;
@@ -591,7 +589,6 @@ namespace System.Configuration
                                        }
                                        if (element.Value.ValueXml == null)
                                                element.Value.ValueXml = new XmlDocument ().CreateDocumentFragment ();
-                                       doc = element.Value.ValueXml.OwnerDocument;
                                        switch (value.Property.SerializeAs) {
                                        case SettingsSerializeAs.Xml:
                                                element.Value.ValueXml.InnerXml = value.SerializedValue as string;
index c01e880901acca05646256e8004762a2c0849986..51b792f375a86a23c78f445eb641cf43335bdaa6 100644 (file)
@@ -107,6 +107,7 @@ namespace System.Configuration
                        set { impl.ApplicationName = value; }
                }
 
+/*
                bool IsUserSetting (SettingsProperty prop)
                {
 #if CONFIGURATION_DEP
@@ -122,6 +123,7 @@ namespace System.Configuration
                        return false;
 #endif
                }
+*/             
        }
 
 }
index ca913efcdf22c51b5ff6b170a10b7d01614e73c6..988d44ee9d2ae2bc81ecc73bc76e06d1fa2d05b9 100644 (file)
@@ -287,7 +287,7 @@ namespace System.Diagnostics
                                        d ["indentsize"] = n;
                                        TraceImpl.IndentSize = n;
                                }
-                               catch (ConfigurationException e) {
+                               catch (ConfigurationException) {
                                        throw;
                                }
                                catch (Exception e) {
index 83eb57ebd9584305370aaba8bb83ea989f83c8ca..3f9e61c1aa20f1aebac5c47b99f0fb5fe90b1f91 100644 (file)
@@ -45,8 +45,8 @@ namespace System.Diagnostics
                private string name;
                private string description;
                private int switchSetting;
-               private string value;
 #if NET_2_0
+               private string value;
                private string defaultSwitchValue;
 #endif
                // MS Behavior is that (quoting from MSDN for OnSwitchSettingChanged()):
index 5a122c34e1369a80abe3e2ac437d93a2fa75cdd2..8af4adda925777da6d91975de33d2c9fff138d12 100644 (file)
@@ -79,7 +79,7 @@ namespace System.Diagnostics
                        this.name = name;
                }
 
-               public virtual void Close ()
+               public override void Close ()
                {
                        w.Close ();
                }
index a8f1e7b7a903d7e5a8b205f12352fbeaf0c1b0b3..f09174673e373e551e39b3b00758394e5d7547d5 100644 (file)
@@ -202,7 +202,7 @@ namespace System.Net.NetworkInformation {
 
                public static NetworkInterface [] ImplGetAllNetworkInterfaces ()
                {
-                       Win32_IP_ADAPTER_INFO [] ai = GetAdaptersInfo ();
+//                     Win32_IP_ADAPTER_INFO [] ai = GetAdaptersInfo ();
                        Win32_IP_ADAPTER_ADDRESSES [] aa = GetAdaptersAddresses ();
                        NetworkInterface [] ret = new NetworkInterface [aa.Length];
                        for (int i = 0; i < ret.Length; i++)
index 3ac456563decd294d80ce41e7888d854a8d02f23..b47171a524f44e38416ab0bd4e39e5185a638df7 100644 (file)
@@ -299,14 +299,14 @@ namespace System.Net.Security
                #endregion // Properties
 
                #region Methods
-
+/*
                AsymmetricAlgorithm GetPrivateKey (X509Certificate cert, string targetHost)
                {
                        // FIXME: what can I do for non-X509Certificate2 ?
                        X509Certificate2 cert2 = cert as X509Certificate2;
                        return cert2 != null ? cert2.PrivateKey : null;
                }
-
+*/
                X509Certificate OnCertificateSelection (X509CertificateCollection clientCerts, X509Certificate serverCert, string targetHost, X509CertificateCollection serverRequestedCerts)
                {
                        string [] acceptableIssuers = new string [serverRequestedCerts != null ? serverRequestedCerts.Count : 0];
index 0638e28ca0b89c46c8658d5e8c9eb9de5bdfa8da..bc33e24c0d8c92b96f768c4372ce4080e27ef371 100644 (file)
@@ -25,7 +25,6 @@ namespace System.Net
                bool disposed;
                bool isRead;
                int totalRead;
-               int contentLength;
 
                ManualResetEvent closewh;
 
@@ -39,7 +38,6 @@ namespace System.Net
                                throw new ArgumentException ("socket");
 
                        this.request = request;
-                       this.contentLength = socket.Available;
                        this.networkStream = new NetworkStream (socket, true);
                        this.isRead = isRead;
 
@@ -129,7 +127,6 @@ namespace System.Net
 
                        totalRead += nbytes;
                        if (nbytes == 0) {
-                               contentLength = totalRead;
                                networkStream.Close ();
                                request.SetTransferCompleted ();
                        }
index 93f76fb64ccc0d7761baf8fac0fe33c7ae7da4bd..4500377a56f18d13581d775c9abb21e30775c4f6 100644 (file)
@@ -171,7 +171,7 @@ namespace System.Net
                }
 
                [MonoTODO]
-               public static RequestCachePolicy DefaultCachePolicy
+               public static new RequestCachePolicy DefaultCachePolicy
                {
                        get {
                                throw GetMustImplement ();
index 610de80c9a6a2a6d3b4e1df8093b74b4a850ffbd..f42a05da78dccad36604114e1ba09c741dac45cc 100644 (file)
@@ -54,7 +54,6 @@ namespace System.Net {
                int chunked_uses;
                bool context_bound;
                bool secure;
-               X509Certificate2 cert;
                AsymmetricAlgorithm key;
 
                public HttpConnection (Socket sock, EndPointListener epl, bool secure, X509Certificate2 cert, AsymmetricAlgorithm key)
@@ -62,7 +61,6 @@ namespace System.Net {
                        this.sock = sock;
                        this.epl = epl;
                        this.secure = secure;
-                       this.cert = cert;
                        this.key = key;
                        if (secure == false) {
                                stream = new NetworkStream (sock, false);
index 305703e292c7295434571d606df4637b115fc878..43ca984ac671bc95d943d1768861f9cc40fa8533 100644 (file)
@@ -292,7 +292,7 @@ namespace System.Net
 
 #if NET_2_0
                [MonoTODO]
-               public static RequestCachePolicy DefaultCachePolicy
+               public static new RequestCachePolicy DefaultCachePolicy
                {
                        get {
                                throw GetMustImplement ();
index e7358f099f54bfee88c89f73baaadb9d06d1eb0b..faae9347838852e4e081812387f1df5a592242aa 100644 (file)
@@ -495,15 +495,15 @@ namespace System.Security.Cryptography.X509Certificates {
                        }
 
                        // TODO 6.1.3.d - check if certificate policies extension is present
-                       if (false) {
+                       //if (false) {
                                // TODO - for X509ChainStatusFlags.InvalidPolicyConstraints
                                //      using X509ChainPolicy.ApplicationPolicy and X509ChainPolicy.CertificatePolicy
 
                                // TODO - check for X509ChainStatusFlags.NoIssuanceChainPolicy
 
-                       } else {
+                       //} else {
                                // TODO 6.1.3.e - set valid_policy_tree to NULL
-                       }
+                       //}
 
                        // TODO 6.1.3.f - verify explict_policy > 0 if valid_policy_tree != NULL
                }
@@ -801,12 +801,6 @@ namespace System.Security.Cryptography.X509Certificates {
                        return X509ChainStatusFlags.NoError;\r
                }
 
-               private MX.X509Crl OnlineCheck (X509Certificate2 certificate)
-               {
-                       // CRL doesn't exists or couldn't be downloaded
-                       return null;
-               }
-
                private MX.X509Crl FindCrl (X509Certificate2 caCertificate)
                {
                        string subject = caCertificate.SubjectName.Decode (X500DistinguishedNameFlags.None);