提交 159314e0 编写于 作者: M Marek Safar

Warnings cleanup


svn path=/trunk/mcs/; revision=111730
上级 927a8b1e
......@@ -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]
......
......@@ -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.
......
......@@ -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)
{
......
......@@ -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;
......
......@@ -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 () {
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 {
......
......@@ -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)
{
}
......
......@@ -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 () {
......
......@@ -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 ()
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
object _stubData;
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();
RemotingServices.GetObjectData (obj, info, context);
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)
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)
if (mMsg.MethodBase.IsConstructor)
{
if (is_remproxy)
if (is_remproxy)
res_msg = (IMethodReturnMessage) (rp as RemotingProxy).ActivateRemoteObject ((IMethodMessage) msg);
else
else
msg = new ConstructionCall (rp.GetProxiedType ());
}
if (null == res_msg)
{
res_msg = (IMethodReturnMessage)rp.Invoke (msg);
// 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)
{
// 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);
}
}
}
if (res_msg.LogicalCallContext != null && res_msg.LogicalCallContext.HasInfo)
......
......@@ -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)
......
......@@ -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 {
......
......@@ -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]
......
......@@ -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 {
......
......@@ -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)
......
......@@ -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 ()
{
......
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册