Hey,
In the same vein of the patch to build Microsoft.Scripting.Metadata on
Mono, the attached patch shows unused variables, triggering a build
failure as Microsoft.Scripting.Core is being built with warnaserror+.
--
Jb Evain <[email protected]>
diff --git a/Runtime/Microsoft.Scripting.Core/Actions/CallSite.cs b/Runtime/Microsoft.Scripting.Core/Actions/CallSite.cs
index 427fd39..9dd1f34 100644
--- a/Runtime/Microsoft.Scripting.Core/Actions/CallSite.cs
+++ b/Runtime/Microsoft.Scripting.Core/Actions/CallSite.cs
@@ -337,7 +337,6 @@ namespace System.Runtime.CompilerServices {
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
private T CreateCustomNoMatchDelegate(MethodInfo invoke) {
var @params = invoke.GetParametersCached().Map(p => Expression.Parameter(p.ParameterType, p.Name));
- var site = @params[0];
return Expression.Lambda<T>(
Expression.Block(
Expression.Call(
diff --git a/Runtime/Microsoft.Scripting.Core/Actions/CallSiteBinder.cs b/Runtime/Microsoft.Scripting.Core/Actions/CallSiteBinder.cs
index 69634f2..76b3c73 100644
--- a/Runtime/Microsoft.Scripting.Core/Actions/CallSiteBinder.cs
+++ b/Runtime/Microsoft.Scripting.Core/Actions/CallSiteBinder.cs
@@ -166,7 +166,6 @@ namespace System.Runtime.CompilerServices {
}
private static Expression<T> Stitch<T>(Expression binding, LambdaSignature<T> signature) where T : class {
- Type targetType = typeof(T);
Type siteType = typeof(CallSite<T>);
var body = new ReadOnlyCollectionBuilder<Expression>(3);
diff --git a/Runtime/Microsoft.Scripting.Core/Ast/DebugViewWriter.cs b/Runtime/Microsoft.Scripting.Core/Ast/DebugViewWriter.cs
index e19e8f6..4f6d46d 100644
--- a/Runtime/Microsoft.Scripting.Core/Ast/DebugViewWriter.cs
+++ b/Runtime/Microsoft.Scripting.Core/Ast/DebugViewWriter.cs
@@ -229,12 +229,7 @@ namespace System.Linq.Expressions {
GetMemberBinder getMember;
SetMemberBinder setMember;
DeleteMemberBinder deleteMember;
- GetIndexBinder getIndex;
- SetIndexBinder setIndex;
- DeleteIndexBinder deleteIndex;
InvokeMemberBinder call;
- InvokeBinder invoke;
- CreateInstanceBinder create;
UnaryOperationBinder unary;
BinaryOperationBinder binary;
@@ -246,17 +241,17 @@ namespace System.Linq.Expressions {
return "SetMember " + setMember.Name;
} else if ((deleteMember = binder as DeleteMemberBinder) != null) {
return "DeleteMember " + deleteMember.Name;
- } else if ((getIndex = binder as GetIndexBinder) != null) {
+ } else if ((binder as GetIndexBinder) != null) {
return "GetIndex";
- } else if ((setIndex = binder as SetIndexBinder) != null) {
+ } else if ((binder as SetIndexBinder) != null) {
return "SetIndex";
- } else if ((deleteIndex = binder as DeleteIndexBinder) != null) {
+ } else if ((binder as DeleteIndexBinder) != null) {
return "DeleteIndex";
} else if ((call = binder as InvokeMemberBinder) != null) {
return "Call " + call.Name;
- } else if ((invoke = binder as InvokeBinder) != null) {
+ } else if ((binder as InvokeBinder) != null) {
return "Invoke";
- } else if ((create = binder as CreateInstanceBinder) != null) {
+ } else if ((binder as CreateInstanceBinder) != null) {
return "Create";
} else if ((unary = binder as UnaryOperationBinder) != null) {
return "UnaryOperation " + unary.Operation;
@@ -866,8 +861,6 @@ namespace System.Linq.Expressions {
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
protected internal override Expression VisitUnary(UnaryExpression node) {
- bool parenthesize = NeedsParentheses(node, node.Operand);
-
switch (node.NodeType) {
case ExpressionType.Convert:
Out("(" + node.Type.ToString() + ")");
diff --git a/Runtime/Microsoft.Scripting.Core/Ast/ExpressionStringBuilder.cs b/Runtime/Microsoft.Scripting.Core/Ast/ExpressionStringBuilder.cs
index c5b1df4..bb01ee4 100644
--- a/Runtime/Microsoft.Scripting.Core/Ast/ExpressionStringBuilder.cs
+++ b/Runtime/Microsoft.Scripting.Core/Ast/ExpressionStringBuilder.cs
@@ -162,12 +162,7 @@ namespace System.Linq.Expressions {
GetMemberBinder getMember;
SetMemberBinder setMember;
DeleteMemberBinder deleteMember;
- GetIndexBinder getIndex;
- SetIndexBinder setIndex;
- DeleteIndexBinder deleteIndex;
InvokeMemberBinder call;
- InvokeBinder invoke;
- CreateInstanceBinder create;
UnaryOperationBinder unary;
BinaryOperationBinder binary;
@@ -179,17 +174,17 @@ namespace System.Linq.Expressions {
return "SetMember " + setMember.Name;
} else if ((deleteMember = binder as DeleteMemberBinder) != null) {
return "DeleteMember " + deleteMember.Name;
- } else if ((getIndex = binder as GetIndexBinder) != null) {
+ } else if ((binder as GetIndexBinder) != null) {
return "GetIndex";
- } else if ((setIndex = binder as SetIndexBinder) != null) {
+ } else if ((binder as SetIndexBinder) != null) {
return "SetIndex";
- } else if ((deleteIndex = binder as DeleteIndexBinder) != null) {
+ } else if ((binder as DeleteIndexBinder) != null) {
return "DeleteIndex";
} else if ((call = binder as InvokeMemberBinder) != null) {
return "Call " + call.Name;
- } else if ((invoke = binder as InvokeBinder) != null) {
+ } else if ((binder as InvokeBinder) != null) {
return "Invoke";
- } else if ((create = binder as CreateInstanceBinder) != null) {
+ } else if ((binder as CreateInstanceBinder) != null) {
return "Create";
} else if ((unary = binder as UnaryOperationBinder) != null) {
return unary.Operation.ToString();
diff --git a/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Logical.cs b/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Logical.cs
index 8f62d07..960582e 100644
--- a/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Logical.cs
+++ b/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Logical.cs
@@ -175,7 +175,6 @@ namespace System.Linq.Expressions.Compiler {
// if not null, call conversion
_ilg.MarkLabel(labNotNull);
Debug.Assert(b.Conversion.Parameters.Count == 1);
- ParameterExpression p = b.Conversion.Parameters[0];
// emit the delegate instance
EmitLambdaExpression(b.Conversion);
diff --git a/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Unary.cs b/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Unary.cs
index ab3bd04..54f338b 100644
--- a/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Unary.cs
+++ b/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Unary.cs
@@ -108,7 +108,6 @@ namespace System.Linq.Expressions.Compiler {
if (operandType != typeof(bool?))
goto case ExpressionType.Negate;
- Label labIfNull = _ilg.DefineLabel();
Label labEnd = _ilg.DefineLabel();
LocalBuilder loc = GetLocal(operandType);
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core