Attached patch fixes 5 more unused local variable warnings. It should be uncontroversial.
If some unused variable assignment is there for debugging or other purposes, I think it is advisable to write a comment saying it is so. If this is the case, please tell me. All warnings were found by Mono C# compiler. -- Seo Sanghyeon
Index: ironruby/src/microsoft.scripting.core/compiler/ilgen.cs =================================================================== --- ironruby.orig/src/microsoft.scripting.core/compiler/ilgen.cs 2008-08-15 05:48:51.000000000 +0900 +++ ironruby/src/microsoft.scripting.core/compiler/ilgen.cs 2008-08-15 05:49:07.000000000 +0900 @@ -1165,7 +1165,6 @@ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private void EmitNumericConversion(Type typeFrom, Type typeTo, bool isChecked) { bool isFromUnsigned = TypeUtils.IsUnsigned(typeFrom); - bool isFromFloatingPoint = TypeUtils.IsFloatingPoint(typeFrom); if (typeTo == typeof(Single)) { if (isFromUnsigned) Emit(OpCodes.Conv_R_Un); Index: ironruby/src/microsoft.scripting.core/compiler/TryStatementInfo.cs =================================================================== --- ironruby.orig/src/microsoft.scripting.core/compiler/TryStatementInfo.cs 2008-08-15 05:48:51.000000000 +0900 +++ ironruby/src/microsoft.scripting.core/compiler/TryStatementInfo.cs 2008-08-15 05:49:07.000000000 +0900 @@ -107,7 +107,6 @@ ReadOnlyCollection<CatchBlock> handlers = _ts.Handlers; Debug.Assert(handlers != null && handler < handlers.Count); - CatchBlock cb = handlers[handler]; _catchYieldsFlags[handler] = true; _yieldInCatch = true; Index: ironruby/src/microsoft.scripting.core/compiler/lambdacompiler.unary.cs =================================================================== --- ironruby.orig/src/microsoft.scripting.core/compiler/lambdacompiler.unary.cs 2008-08-15 05:48:51.000000000 +0900 +++ ironruby/src/microsoft.scripting.core/compiler/lambdacompiler.unary.cs 2008-08-15 05:49:07.000000000 +0900 @@ -82,7 +82,6 @@ if (operandType != typeof(bool?)) goto case ExpressionType.Negate; - Label labIfNull = _ilg.DefineLabel(); Label labEnd = _ilg.DefineLabel(); LocalBuilder loc = _ilg.GetLocal(operandType); Index: ironruby/src/microsoft.scripting/generation/ilgen.cs =================================================================== --- ironruby.orig/src/microsoft.scripting/generation/ilgen.cs 2008-08-15 05:53:51.000000000 +0900 +++ ironruby/src/microsoft.scripting/generation/ilgen.cs 2008-08-15 05:53:54.000000000 +0900 @@ -1173,7 +1173,6 @@ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private void EmitNumericConversion(Type typeFrom, Type typeTo, bool isChecked) { bool isFromUnsigned = TypeUtils.IsUnsigned(typeFrom); - bool isFromFloatingPoint = TypeUtils.IsFloatingPoint(typeFrom); if (typeTo == typeof(Single)) { if (isFromUnsigned) Emit(OpCodes.Conv_R_Un); Index: ironruby/src/microsoft.scripting/tuple.cs =================================================================== --- ironruby.orig/src/microsoft.scripting/tuple.cs 2008-08-15 05:50:34.000000000 +0900 +++ ironruby/src/microsoft.scripting/tuple.cs 2008-08-15 05:50:40.000000000 +0900 @@ -248,7 +248,6 @@ res.SetValue(i, CreateTupleInstance(pi.PropertyType, newStart, newEnd, args)); } } else { - int argCnt = tupleType.GetGenericArguments().Length; for (int i = start; i < end; i++) { res.SetValue(i - start, args[i]); }
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core