Warnings cleanup
authorMarek Safar <marek.safar@gmail.com>
Wed, 6 Jun 2007 14:33:02 +0000 (14:33 -0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 6 Jun 2007 14:33:02 +0000 (14:33 -0000)
svn path=/trunk/mcs/; revision=78750

mcs/mcs/anonymous.cs
mcs/mcs/codegen.cs
mcs/mcs/cs-parser.jay
mcs/mcs/cs-tokenizer.cs
mcs/mcs/expression.cs
mcs/mcs/iterators.cs

index 6e089b51d443ac23c96b87d97e776bc2200532b3..21c6b829e504b950651e45be5816ce246efe6336 100644 (file)
@@ -1723,7 +1723,6 @@ namespace Mono.CSharp {
                                return false;
 
                        return ResolveAnonymousDelegate (ec);
-                       return true;
                }
 
                public MethodInfo GetMethodBuilder (EmitContext ec)
index 9668b92eef9099d98c1d7df19f1164c7c9782a87..171ac54e06793d9a7c3d1a50e211fc90cc6bec10 100644 (file)
@@ -1011,12 +1011,12 @@ namespace Mono.CSharp {
                public AssemblyBuilder Builder;
                bool is_cls_compliant;
                bool wrap_non_exception_throws;
-               bool has_extension_method;
 
                public Attribute ClsCompliantAttribute;
 
                ListDictionary declarative_security;
 #if GMCS_SOURCE
+               bool has_extension_method;              
                public AssemblyName Name;
                MethodInfo add_type_forwarder;
                ListDictionary emitted_forwarders;
@@ -1033,7 +1033,11 @@ namespace Mono.CSharp {
                }
 
                public bool HasExtensionMethods {
-                       set { has_extension_method = value; }
+                       set {
+#if GMCS_SOURCE                                
+                               has_extension_method = value;
+#endif
+                       }
                }
 
                public bool IsClsCompliant {
index fbc6e2a7c93b1efe7810bfc9662de7bf8a9f0bc0..24ba2000fbeffab4cae5901be5580de4d9958688 100644 (file)
@@ -44,8 +44,6 @@ namespace Mono.CSharp
                /// </summary>
                Block      current_block;
 
-               Delegate   current_delegate;
-
                AnonymousMethodExpression current_anonymous_method;
 
                /// <summary>
@@ -4614,7 +4612,6 @@ fixed_statement
                int top = list.Count;
 
                start_block (lexer.Location);
-               Block assign_block = current_block;
 
                for (int i = 0; i < top; i++){
                        Pair p = (Pair) list [i];
index e88333f729c357fc56231d174e39b4f52e227afa..66f209196eb88a3e07aa074db8c0f3ccb74adc60 100644 (file)
@@ -41,11 +41,14 @@ namespace Mono.CSharp
                bool handle_constraints = false;
                bool handle_typeof = false;
                bool handle_var = false;
-               bool query_parsing;
                Location current_location;
                Location current_comment_location = Location.Null;
                ArrayList escaped_identifiers = new ArrayList ();
 
+#if GMCS_SOURCE
+               bool query_parsing;
+#endif
+               
                static bool IsLinqEnabled {
                        get {
                                return RootContext.Version == LanguageVersion.LINQ;
@@ -187,12 +190,6 @@ namespace Mono.CSharp
                        }
                }
 
-               public bool QueryParsing {
-                       set {
-                               query_parsing = value;
-                       }
-               }
-
                public XmlCommentState doc_state {
                        get { return xml_doc_state; }
                        set {
@@ -584,22 +581,6 @@ namespace Mono.CSharp
                        return true;
                }
 
-               bool parse_generic_dimension (out int dimension)
-               {
-                       dimension = 1;
-
-               again:
-                       int the_token = token ();
-                       if (the_token == Token.OP_GENERICS_GT)
-                               return true;
-                       else if (the_token == Token.COMMA) {
-                               dimension++;
-                               goto again;
-                       }
-
-                       return false;
-               }
-
                bool parse_less_than ()
                {
                start:
@@ -687,6 +668,28 @@ namespace Mono.CSharp
                        else
                                nullable_pos = -1;
                }
+               
+               public bool QueryParsing {
+                       set {
+                               query_parsing = value;
+                       }
+               }               
+               
+               bool parse_generic_dimension (out int dimension)
+               {
+                       dimension = 1;
+
+               again:
+                       int the_token = token ();
+                       if (the_token == Token.OP_GENERICS_GT)
+                               return true;
+                       else if (the_token == Token.COMMA) {
+                               dimension++;
+                               goto again;
+                       }
+
+                       return false;
+               }               
 #endif
                
                public int peek_token ()
index 85b79e376300f3f7796f6ebd1713bb011d3d9fc7..51c82c68ba9adfa39e23ba03eabc847fb14e936a 100644 (file)
@@ -5262,7 +5262,7 @@ namespace Mono.CSharp {
                {
 #if GMCS_SOURCE
                        ILGenerator ig = ec.ig;
-                       IMemoryLocation ml;
+//                     IMemoryLocation ml;
 
                        MethodInfo ci = TypeManager.activator_create_instance.MakeGenericMethod (
                                new Type [] { type });
@@ -8703,7 +8703,6 @@ namespace Mono.CSharp {
        {
                ArrayList parameters;
                TypeContainer parent;
-               Location loc;
                TypeContainer anonymous_type;
 
                public AnonymousType (ArrayList parameters, TypeContainer parent, Location loc)
@@ -8785,7 +8784,6 @@ namespace Mono.CSharp {
                LocatedToken token;
                string name;
                Expression expression;
-               Type type;
 
                public LocatedToken Token {
                        get { return token; }
@@ -8795,10 +8793,6 @@ namespace Mono.CSharp {
                        get { return name; }
                }
 
-               public Type Type {
-                       get { return type; }
-               }
-
                public Expression Expression {
                        get { return expression; }
                }
@@ -8808,6 +8802,11 @@ namespace Mono.CSharp {
                        AnonymousTypeParameter other = o as AnonymousTypeParameter;
                        return other != null && Name == other.Name && Type == other.Type;
                }
+               
+               public override int GetHashCode ()
+               {
+                       return name.GetHashCode ();
+               }
 
                public override Expression DoResolve (EmitContext ec)
                {
index c3ccc1d61b108b37956965856b2c497893c8ef8e..9d210e1b4c011e8da8bcad4a11102379b5cb2796 100644 (file)
@@ -144,8 +144,10 @@ namespace Mono.CSharp {
                TypeExpr enumerable_type;
                TypeArguments generic_args;
                TypeExpr generic_enumerator_type;
+#if GMCS_SOURCE                
                TypeExpr generic_enumerable_type;
-
+#endif
+               
                public IteratorHost (Iterator iterator)
                        : base (iterator.Container.Toplevel, iterator.Host, iterator.GenericMethod,
                                iterator.Location)