Warnings cleanup
authorMarek Safar <marek.safar@gmail.com>
Wed, 27 Aug 2008 18:28:16 +0000 (18:28 -0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 27 Aug 2008 18:28:16 +0000 (18:28 -0000)
svn path=/trunk/mcs/; revision=111730

21 files changed:
mcs/class/corlib/System.Globalization/CultureInfo.cs
mcs/class/corlib/System.Globalization/NumberFormatInfo.cs
mcs/class/corlib/System.Globalization/RegionInfo.cs
mcs/class/corlib/System.Reflection.Emit/MonoArrayMethod.cs
mcs/class/corlib/System.Reflection/MethodBody.cs
mcs/class/corlib/System.Reflection/Module.cs
mcs/class/corlib/System.Reflection/MonoMethod.cs
mcs/class/corlib/System.Reflection/MonoProperty.cs
mcs/class/corlib/System.Resources/MissingSatelliteAssemblyException.cs
mcs/class/corlib/System.Resources/Win32Resources.cs
mcs/class/corlib/System.Runtime.CompilerServices/RuntimeWrappedException.cs
mcs/class/corlib/System.Runtime.Remoting.Messaging/AsyncResult.cs
mcs/class/corlib/System.Runtime.Remoting.Messaging/MonoMethodMessage.cs
mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs
mcs/class/corlib/System.Security/HostProtectionException.cs
mcs/class/corlib/System.Security/SecurityFrame.cs
mcs/class/corlib/System.Threading/Thread.cs
mcs/class/corlib/System/AppDomainManager.cs
mcs/class/corlib/System/Delegate.cs
mcs/class/corlib/System/Exception.cs
mcs/class/corlib/System/TermInfoReader.cs

index 95ec7e7309249fd90710ad173e8cafdb224e5731..724eacc32eba636d6aca5313e804c8b1007f86ce 100644 (file)
@@ -53,7 +53,7 @@ namespace System.Globalization
                const int GregorianTypeMask = 0x00FFFFFF;
                const int CalendarTypeBits = 24;
 
-#pragma warning disable 169
+#pragma warning disable 169, 649
                bool m_isReadOnly;
                int  cultureID;
                [NonSerialized]
@@ -99,7 +99,7 @@ namespace System.Globalization
 
                int m_dataItem;         // MS.NET serializes this.
                Calendar calendar;      // MS.NET serializes this.
-#pragma warning restore 169
+#pragma warning restore 169, 649
 
                // Deserialized instances will set this to false
                [NonSerialized]
index e7d6354666d19b2f3b6d1c40fa44e6bf5f21a02f..a02475a1fe58846e67637fcad5f3b77e7a95075a 100644 (file)
@@ -54,6 +54,10 @@ namespace System.Globalization {
 #endif
        [Serializable]
        public sealed class NumberFormatInfo : ICloneable, IFormatProvider {
+
+/* Keep in sync with object-internals.h */
+               
+#pragma warning disable 649
                private bool isReadOnly;
                // used for temporary storage. Used in InitPatterns ()
                string decimalFormats;
@@ -94,6 +98,7 @@ namespace System.Globalization {
                private string perMilleSymbol;
                private string positiveInfinitySymbol;
                private string positiveSign;
+#pragma warning restore 649
                
 #pragma warning disable 169
                string ansiCurrencySymbol;      // TODO, MS.NET serializes this.
index eaaa605fcb312fa6b06dc2989aff6a097f5ffc20..c849a2511a0824a3902189c88c4b79cc5a6351f0 100644 (file)
@@ -58,8 +58,9 @@ namespace System.Globalization
 
 #if NET_2_0
                int lcid; // it is used only for Equals() (not even used in GetHashCode()).
-               string currencyEnglishName;             
-#endif         
+#endif
+
+#pragma warning disable 649
                int regionId;
                string iso2Name;
                string iso3Name;
@@ -67,6 +68,8 @@ namespace System.Globalization
                string englishName;
                string currencySymbol;
                string isoCurrencySymbol;
+               string currencyEnglishName;
+#pragma warning restore 649
 
                public RegionInfo (int culture)
                {
index 2a487430dcb7680190a1dcf7b32d187c4cf31a9e..a64112f7c4236c6a3e5ba2c7002d2d63de86939d 100644 (file)
@@ -38,6 +38,7 @@ using System.Runtime.InteropServices;
 
 namespace System.Reflection {
        internal class MonoArrayMethod: MethodInfo {
+#pragma warning disable 649
                internal RuntimeMethodHandle mhandle;
                internal Type parent;
                internal Type ret;
@@ -45,6 +46,7 @@ namespace System.Reflection {
                internal string name;
                internal int table_idx;
                internal CallingConventions call_conv;
+#pragma warning restore 649            
 
                internal MonoArrayMethod (Type arrayClass, string methodName, CallingConventions callingConvention, Type returnType, Type[] parameterTypes) {
                        name = methodName;
index e3553fa16027748059cf7b2db72ce452ba09ef91..7f571c758ee71f98d42bca1950151323b490cf73 100644 (file)
@@ -39,6 +39,7 @@ namespace System.Reflection {
        [ComVisible (true)]
 #endif
        public sealed class MethodBody {
+#pragma warning disable 649
                #region Sync with reflection.h
                ExceptionHandlingClause[] clauses;
                LocalVariableInfo[] locals;
@@ -47,6 +48,7 @@ namespace System.Reflection {
                int sig_token;
                int max_stack;
                #endregion
+#pragma warning restore 649
 
                internal MethodBody () {
                }
index 646d9ab30b1f70456adff3c22e552ec936a042dc..935a0a08d3d9c2a99db623d64cfe79f308476d86 100644 (file)
@@ -53,6 +53,7 @@ namespace System.Reflection {
                public static readonly TypeFilter FilterTypeName;
                public static readonly TypeFilter FilterTypeNameIgnoreCase;
        
+#pragma warning disable 649    
                private IntPtr _impl; /* a pointer to a MonoImage */
                internal Assembly assembly;
                internal string fqname;
@@ -60,6 +61,7 @@ namespace System.Reflection {
                internal string scopename;
                internal bool is_resource;
                internal int token;
+#pragma warning restore 649            
        
                const BindingFlags defaultBindingFlags = 
                        BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance;
index 35f56915c26e2a57b3efdb29d15adab641725c5e..d60869d9a258f382d10d649d341bc3aefcf7b105 100644 (file)
@@ -65,9 +65,11 @@ namespace System.Reflection {
        [Serializable()]
        internal class MonoMethod : MethodInfo, ISerializable
        {
+#pragma warning disable 649
                internal IntPtr mhandle;
                string name;
                Type reftype;
+#pragma warning restore 649
 
                internal MonoMethod () {
                }
@@ -378,9 +380,11 @@ namespace System.Reflection {
        
        internal class MonoCMethod : ConstructorInfo, ISerializable
        {
+#pragma warning disable 649            
                internal IntPtr mhandle;
                string name;
                Type reftype;
+#pragma warning restore 649            
                
                public override MethodImplAttributes GetMethodImplementationFlags() {
                        MonoMethodInfo info;
index 0b1f4582acc667e8ad698da36ffa92128ae05f09..a8f972e0f38dab6022348087b64a12996fe7280b 100644 (file)
@@ -66,10 +66,12 @@ namespace System.Reflection {
 
        [Serializable]
        internal class MonoProperty : PropertyInfo, ISerializable {
+#pragma warning disable 649
                internal IntPtr klass;
                internal IntPtr prop;
                MonoPropertyInfo info;
                PInfo cached;
+#pragma warning restore 649
                
                public override PropertyAttributes Attributes {
                        get {
index 3f5704655d28cdbc9a14620aed280b9b3f98b0ab..f674198fc7fb1abac645cc161d35975c507d8a05 100644 (file)
@@ -56,10 +56,11 @@ namespace System.Resources
                public MissingSatelliteAssemblyException (string message, string cultureName)
                        :base (message)
                {
+                       this.culture = cultureName;
                }
                
                protected MissingSatelliteAssemblyException (SerializationInfo info, StreamingContext context)
-                                   :base (info, context)
+                       :base (info, context)
                {
                }
                
index 0e7dad2a890a4c9343f6d0790ef924c5adcaef50..68e024a4bf2a0c401e4b149f12963e2972f1339e 100644 (file)
@@ -708,6 +708,7 @@ internal class Win32ResFileReader {
 //
 internal class ICONDIRENTRY {
 
+#pragma warning disable 649
        public byte bWidth;
        public byte bHeight;
        public byte bColorCount;
@@ -716,7 +717,7 @@ internal class ICONDIRENTRY {
        public Int16 wBitCount;
        public Int32 dwBytesInRes;
        public Int32 dwImageOffset;
-
+#pragma warning restore 649
        public byte[] image;
 
        public override string ToString () {
index 9e08e3d839194dbcb8376a6f89417ae8d5a02b8b..aab64307eeb0a06d0396fdf99e73f0f37a75bdc8 100644 (file)
@@ -36,9 +36,11 @@ namespace System.Runtime.CompilerServices {
        [Serializable]
        public sealed class RuntimeWrappedException : Exception
        {
+#pragma warning disable 649
 #region Synch with object-internals.h
                private object wrapped_exception;
 #endregion
+#pragma warning restore 649
 
                // Called by the runtime
                private RuntimeWrappedException () 
index 342f0b6ab10c1e01007469237c7e267d355dfa13..4ebb2409b19e303e125827fe916f825a5021abf6 100644 (file)
@@ -41,7 +41,7 @@ namespace System.Runtime.Remoting.Messaging {
 #endif
 public class AsyncResult : IAsyncResult, IMessageSink {
 
-#pragma warning disable 169, 414
+#pragma warning disable 169, 414, 649
        object async_state;
        WaitHandle handle;
        object async_delegate;
@@ -53,7 +53,7 @@ public class AsyncResult : IAsyncResult, IMessageSink {
        object async_callback;
        ExecutionContext current;
        ExecutionContext original;
-#pragma warning restore 169, 414
+#pragma warning restore 169, 414, 649
 
        // not part of MonoAsyncResult...
        MonoMethodMessage call_message;
index 32bee231a1ba4c72818cce50d9614a0b8063fb8b..54c10c937f0a8f1c7f648bd0887a840f2a6647e8 100644 (file)
@@ -41,6 +41,7 @@ namespace System.Runtime.Remoting.Messaging {
        [Serializable]
        internal class MonoMethodMessage : IMethodCallMessage, IMethodReturnMessage, IInternalMessage {
 
+#pragma warning disable 649
                #region keep in sync with MonoMessage in object-internals.h
                MonoMethod method;
                object []  args;
@@ -52,6 +53,7 @@ namespace System.Runtime.Remoting.Messaging {
                AsyncResult asyncResult;
                CallType call_type;
                #endregion
+#pragma warning restore 649
 
                string uri;
 
index 0d5d4565a8eb07014a6bae1421b828dfe184c22f..a97ab10d397ada5b66c4a3e6b0fda56c3b362f2a 100644 (file)
@@ -47,13 +47,13 @@ using System.Runtime.InteropServices;
 
 namespace System.Runtime.Remoting.Proxies
 {
-#pragma warning disable 169
+#pragma warning disable 169, 649
        internal class TransparentProxy {
                public RealProxy _rp;
                IntPtr _class;
                bool _custom_type_info;
        }
-#pragma warning restore 169    
+#pragma warning restore 169, 649
        
 #if NET_2_0
        [ComVisible (true)]
@@ -72,8 +72,8 @@ namespace System.Runtime.Remoting.Proxies
                int _targetDomainId = -1;
                internal string _targetUri;
                internal Identity _objectIdentity;
-               Object _objTP;\r
-               object _stubData;\r
+               Object _objTP;
+               object _stubData;
         #endregion
 #pragma warning restore 169, 414
 
@@ -120,8 +120,8 @@ namespace System.Runtime.Remoting.Proxies
 
                public virtual void GetObjectData (SerializationInfo info, StreamingContext context)
                {
-                       Object obj = GetTransparentProxy();\r
-                       RemotingServices.GetObjectData (obj, info, context);            \r
+                       Object obj = GetTransparentProxy();
+                       RemotingServices.GetObjectData (obj, info, context);            
                }
                
                internal Identity ObjectIdentity
@@ -171,7 +171,7 @@ namespace System.Runtime.Remoting.Proxies
 
                        IMethodReturnMessage res_msg = null;
                        
-                       if (call_type == CallType.BeginInvoke) \r
+                       if (call_type == CallType.BeginInvoke) 
                                // todo: set CallMessage in runtime instead
                                mMsg.AsyncResult.CallMessage = mMsg;
 
@@ -179,30 +179,30 @@ namespace System.Runtime.Remoting.Proxies
                                res_msg = (IMethodReturnMessage)mMsg.AsyncResult.EndInvoke ();
 
                        // Check for constructor msg
-                       if (mMsg.MethodBase.IsConstructor) \r
+                       if (mMsg.MethodBase.IsConstructor) 
                        {
-                               if (is_remproxy) \r
+                               if (is_remproxy) 
                                        res_msg = (IMethodReturnMessage) (rp as RemotingProxy).ActivateRemoteObject ((IMethodMessage) msg);
-                               else \r
+                               else 
                                        msg = new ConstructionCall (rp.GetProxiedType ());
                        }
                                
                        if (null == res_msg) 
                        {
                                res_msg = (IMethodReturnMessage)rp.Invoke (msg);
-\r
-                               // Note, from begining this code used AsyncResult.IsCompleted for\r
-                               // checking if it was a remoting or custom proxy, but in some\r
-                               // cases the remoting proxy finish before the call returns\r
-                               // causing this method to be called, therefore causing all kind of bugs.\r
-                               if ((!is_remproxy) && call_type == CallType.BeginInvoke)\r
-                               {\r
+
+                               // Note, from begining this code used AsyncResult.IsCompleted for
+                               // checking if it was a remoting or custom proxy, but in some
+                               // cases the remoting proxy finish before the call returns
+                               // causing this method to be called, therefore causing all kind of bugs.
+                               if ((!is_remproxy) && call_type == CallType.BeginInvoke)
+                               {
                                        IMessage asyncMsg = null;
 
                                        // allow calltype EndInvoke to finish
                                        asyncMsg = mMsg.AsyncResult.SyncProcessMessage (res_msg as IMessage);
                                        res_msg = new ReturnMessage (asyncMsg, null, 0, null, res_msg as IMethodCallMessage);
-                               }\r
+                               }
                        }
                        
                        if (res_msg.LogicalCallContext != null && res_msg.LogicalCallContext.HasInfo)
index 83929ea62212570601a670639d2cb7d48092e021..70d20535c6944507c8da377d2dff70b52846b85e 100644 (file)
@@ -59,6 +59,8 @@ namespace System.Security {
                public HostProtectionException (string message, HostProtectionResource protectedResources, HostProtectionResource demandedResources)
                        : base (message)
                {
+                       this._protected = protectedResources;
+                       this._demanded = demandedResources;
                }
 
                protected HostProtectionException (SerializationInfo info, StreamingContext context)
index 7824e0880dd768a80eefb96900e08f78ee7fc1c8..13980f5d767712bcfcda735069190006226bf437 100644 (file)
@@ -43,6 +43,7 @@ namespace System.Security {
        }
 
        // Must match MonoSecurityFrame in /mono/mini/declsec.h
+#pragma warning disable 649    
        internal class RuntimeSecurityFrame {
                public AppDomain domain;
                public MethodInfo method;
@@ -50,6 +51,7 @@ namespace System.Security {
                public RuntimeDeclSecurityEntry deny;
                public RuntimeDeclSecurityEntry permitonly;
        }
+#pragma warning restore 649    
 
        internal struct SecurityFrame {
 
index ce50dee7a4386c4dac8a5d92617a7d049c916529..a1e44a48687c96ef299957aa37fc8404f37c9795 100644 (file)
@@ -54,7 +54,7 @@ namespace System.Threading {
        public sealed class Thread : _Thread {
 #endif
 
-#pragma warning disable 169, 414
+#pragma warning disable 169, 414, 649
                #region Sync with metadata/object-internals.h
                int lock_thread_id;
                // stores a thread handle
@@ -113,7 +113,7 @@ namespace System.Threading {
                private IntPtr unused5;
                private IntPtr unused6;
                #endregion
-#pragma warning restore 169, 414
+#pragma warning restore 169, 414, 649
 
                // the name of local_slots is important as it's used by the runtime.
                [ThreadStatic] 
index bb6921b81f080dfd9281fc34fa89c6214f467346..9cf025e75a2da6516c67abd568cdacc3dd0b16c0 100644 (file)
@@ -44,9 +44,6 @@ namespace System {
        public class AppDomainManager : MarshalByRefObject {
 
                private ApplicationActivator _activator;
-               private Assembly _entry;
-               private HostExecutionContextManager _host_context;
-               private HostSecurityManager _host_security;
                private AppDomainManagerInitializationOptions _flags;
 
                public AppDomainManager ()
@@ -55,19 +52,25 @@ namespace System {
                }
 
                public virtual ApplicationActivator ApplicationActivator {
-                       get { return _activator; }
+                       get {
+                               if (_activator == null)
+                                       _activator = new ApplicationActivator ();
+                                return _activator;
+                       }
                }
 
+               [MonoTODO]
                public virtual Assembly EntryAssembly {
-                       get { return _entry; }
+                       get { throw new NotImplementedException (); }
                }
 
+               [MonoTODO]
                public virtual HostExecutionContextManager HostExecutionContextManager {
-                       get { return _host_context; }
+                       get { throw new NotImplementedException (); }
                }
 
                public virtual HostSecurityManager HostSecurityManager {
-                       get { return _host_security; }
+                       get { return null; }
                }
 
                public AppDomainManagerInitializationOptions InitializationFlags {
index c5191da69a785f45d2baede547297a072b449a13..3dc4fe78ec02e8b6d4d633f2f7c2521ef24a05c9 100644 (file)
@@ -55,7 +55,7 @@ namespace System
        public abstract class Delegate : ICloneable, ISerializable
        {
                #region Sync with object-internals.h
-#pragma warning disable 169, 414
+#pragma warning disable 169, 414, 649
                private IntPtr method_ptr;
                private IntPtr invoke_impl;
                private object m_target;
@@ -69,7 +69,7 @@ namespace System
                private MethodInfo original_method_info;
 
                private DelegateData data;
-#pragma warning restore 169, 414
+#pragma warning restore 169, 414, 649
                #endregion
 
                protected Delegate (object target, string method)
index 4fe247f7b4702e715a10e9328f2e1b004a89b8b2..9fde5561bcd7e33196bd0b5aa78ea45694fac3a1 100644 (file)
@@ -52,7 +52,7 @@ namespace System
        , _Exception
 #endif
        {
-#pragma warning disable 169    
+#pragma warning disable 169, 649
                #region Sync with object-internals.h
                IntPtr [] trace_ips;
                Exception inner_exception;
@@ -66,7 +66,7 @@ namespace System
                string source;
                IDictionary _data;
                #endregion
-#pragma warning restore 169            
+#pragma warning restore 169, 649               
 
                public Exception ()
                {
index 4f6eb4123f06f2d32000ea1560fc0826337daa4e..eb26344fc4d221c93cdf1a220e38b56c469cf115 100644 (file)
@@ -81,7 +81,7 @@ namespace System {
                //string [] names; // Last one is the description
                byte [] buffer;
                int booleansOffset;
-               string term;
+               //string term;
 
                public TermInfoReader (string term, string filename)
                {
@@ -110,9 +110,9 @@ namespace System {
                        ReadNames (buffer, ref booleansOffset);
                }
 
-               public string Term {
-                       get { return term; }
-               }
+//             public string Term {
+//                     get { return term; }
+//             }
 
                void ReadHeader (byte [] buffer, ref int position)
                {