Browse Source

Fixed compiler warnings.

newNRvisualizers
Mike Krüger 15 years ago
parent
commit
df4805ff4a
  1. 2
      ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs
  2. 1
      ICSharpCode.NRefactory.CSharp/Parser/mcs/assembly.cs
  3. 12
      ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs
  4. 1
      ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs
  5. 3
      ICSharpCode.NRefactory.CSharp/Parser/mcs/driver.cs
  6. 6
      ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs

2
ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs

@ -246,7 +246,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
int tokenIndex = offset; int tokenIndex = offset;
string token = GetPreviousToken (ref tokenIndex, false); string token = GetPreviousToken (ref tokenIndex, false);
// check propose name, for context <variable name> <ctrl+space> (but only in control space context) // check propose name, for context <variable name> <ctrl+space> (but only in control space context)
IType isAsType = null; //IType isAsType = null;
var isAsExpression = GetExpressionAt (offset); var isAsExpression = GetExpressionAt (offset);
if (controlSpace && isAsExpression != null && isAsExpression.Item2 is VariableDeclarationStatement && token != "new") { if (controlSpace && isAsExpression != null && isAsExpression.Item2 is VariableDeclarationStatement && token != "new") {
var parent = isAsExpression.Item2 as VariableDeclarationStatement; var parent = isAsExpression.Item2 as VariableDeclarationStatement;

1
ICSharpCode.NRefactory.CSharp/Parser/mcs/assembly.cs

@ -485,6 +485,7 @@ namespace Mono.CSharp
} }
#else #else
var args = new PermissionSet[3]; var args = new PermissionSet[3];
#pragma warning disable 618
declarative_security.TryGetValue (SecurityAction.RequestMinimum, out args[0]); declarative_security.TryGetValue (SecurityAction.RequestMinimum, out args[0]);
declarative_security.TryGetValue (SecurityAction.RequestOptional, out args[1]); declarative_security.TryGetValue (SecurityAction.RequestOptional, out args[1]);
declarative_security.TryGetValue (SecurityAction.RequestRefuse, out args[2]); declarative_security.TryGetValue (SecurityAction.RequestRefuse, out args[2]);

12
ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs

@ -154,18 +154,6 @@ namespace Mono.CSharp
List<Location> attributeArgumentCommas = new List<Location> (); List<Location> attributeArgumentCommas = new List<Location> ();
List<Location> parameterListCommas = new List<Location> (); List<Location> parameterListCommas = new List<Location> ();
object lastYYVal;
// Can be used for code completion to get the last valid expression before an error.
// needs a hack in yyparse to make it work add
// lastYYVal = yyVal;
// after the big switch/case (somewhere around line 3915)
public object LastYYVal {
get {
return lastYYVal;
}
}
#line default #line default
/** error output stream. /** error output stream.

1
ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs

@ -836,7 +836,6 @@ namespace Mono.CSharp
} }
return res; return res;
return res;
} }
static PreprocessorDirective GetPreprocessorDirective (char[] id, int id_len) static PreprocessorDirective GetPreprocessorDirective (char[] id, int id_len)

3
ICSharpCode.NRefactory.CSharp/Parser/mcs/driver.cs

@ -462,8 +462,7 @@ namespace Mono.CSharp
ModuleCompiled = RootContext.ToplevelTypes, ModuleCompiled = RootContext.ToplevelTypes,
LocationsBag = parser.LocationsBag, LocationsBag = parser.LocationsBag,
UsingsBag = parser.UsingsBag, UsingsBag = parser.UsingsBag,
SpecialsBag = parser.Lexer.sbag, SpecialsBag = parser.Lexer.sbag
LastYYValue = parser.LastYYVal
}; };
} finally { } finally {
Reset (); Reset ();

6
ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs

@ -6044,7 +6044,7 @@ namespace Mono.CSharp
// The number of constants in array initializers // The number of constants in array initializers
int const_initializers_count; int const_initializers_count;
bool only_constant_initializers; // bool only_constant_initializers;
public List<Expression> Arguments { public List<Expression> Arguments {
get { return this.arguments; } get { return this.arguments; }
@ -6179,7 +6179,7 @@ namespace Mono.CSharp
++const_initializers_count; ++const_initializers_count;
} }
} else { } else {
only_constant_initializers = false; // only_constant_initializers = false;
} }
array_data.Add (element); array_data.Add (element);
@ -6284,7 +6284,7 @@ namespace Mono.CSharp
protected bool ResolveInitializers (ResolveContext ec) protected bool ResolveInitializers (ResolveContext ec)
{ {
only_constant_initializers = true; // only_constant_initializers = true;
if (arguments != null) { if (arguments != null) {
bool res = true; bool res = true;

Loading…
Cancel
Save