From 748f72326d9a295958bc9ba63bbb1a5d39030ef7 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Fri, 27 Jun 2008 23:03:39 +0000 Subject: last round of warning squashing. calling it a day now. --- .../Shared/Api/Runtime/YieldProlog/YPCompiler.cs | 63 +++++++++++++--------- 1 file changed, 38 insertions(+), 25 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs index c2040c9..d6115ce 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs @@ -209,14 +209,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog object[] functorArgs = YP.getFunctorArgs(Term); Variable pred = new Variable(); + // disable warning on l1, don't see how we can + // code this differently + #pragma warning disable 0168 foreach (bool l1 in ((CompilerState)State)._pred.match - (new object[] { functorName, functorArgs.Length, pred, Atom.a("det") })) + (new object[] { functorName, functorArgs.Length, pred, Atom.a("det") })) { if (CompilerState.isNoneOut(YP.getFunctorArgs(pred.getValue()))) { return true; } } + #pragma warning restore 0168 return false; } @@ -228,14 +232,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog object[] functorArgs = YP.getFunctorArgs(Term); Variable pred = new Variable(); + // disable warning on l1, don't see how we can + // code this differently + #pragma warning disable 0168 foreach (bool l1 in ((CompilerState)State)._pred.match - (new object[] { functorName, functorArgs.Length, pred, Atom.a("semidet") })) + (new object[] { functorName, functorArgs.Length, pred, Atom.a("semidet") })) { if (CompilerState.isNoneOut(YP.getFunctorArgs(pred.getValue()))) { return true; } } + #pragma warning restore 0168 return false; } @@ -275,6 +283,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog } } + // disable warning unused variables, the following code is + // infested with it. + #pragma warning disable 0168, 0219 + /// /// Use makeFunctionPseudoCode, convertFunctionCSharp and compileAnonymousFunction /// to return an anonymous YP.IClause for the Head and Body of a rule clause. @@ -3939,12 +3951,12 @@ namespace Temporary { YP.nl(); convertStatementListCSharp(RestStatements, Level); return; - goto cutIf1; + // goto cutIf1; } convertStatementListCSharp(RestStatements, Level); return; - cutIf1: - { } + // cutIf1: + // { } } } { @@ -4111,12 +4123,12 @@ namespace Temporary { YP.write(Atom.a(@", ")); convertArgListCSharp(Tail); return; - goto cutIf1; + // goto cutIf1; } convertArgListCSharp(Tail); return; - cutIf1: - { } + // cutIf1: + // { } } } } @@ -4266,13 +4278,13 @@ namespace Temporary { YP.put_code(Code); convertStringCodesCSharp(RestCodes); return; - goto cutIf1; + // goto cutIf1; } YP.put_code(Code); convertStringCodesCSharp(RestCodes); return; - cutIf1: - { } + // cutIf1: + // { } } } } @@ -4623,12 +4635,12 @@ namespace Temporary { YP.write(Atom.a(@", ")); convertArgListJavascript(Tail); return; - goto cutIf1; + // goto cutIf1; } convertArgListJavascript(Tail); return; - cutIf1: - { } + // cutIf1: + // { } } } } @@ -4777,7 +4789,7 @@ namespace Temporary { YP.put_code(Code); convertStringCodesJavascript(RestCodes); return; - goto cutIf1; + // goto cutIf1; } if (YP.termEqual(Code, 92)) { @@ -4785,13 +4797,13 @@ namespace Temporary { YP.put_code(Code); convertStringCodesJavascript(RestCodes); return; - goto cutIf1; + // goto cutIf1; } YP.put_code(Code); convertStringCodesJavascript(RestCodes); return; - cutIf1: - { } + // cutIf1: + // { } } } } @@ -5420,12 +5432,12 @@ namespace Temporary { YP.write(Atom.a(@", ")); convertArgListPython(Tail); return; - goto cutIf1; + // goto cutIf1; } convertArgListPython(Tail); return; - cutIf1: - { } + // cutIf1: + // { } } } } @@ -5573,7 +5585,7 @@ namespace Temporary { YP.put_code(Code); convertStringCodesPython(RestCodes); return; - goto cutIf1; + // goto cutIf1; } if (YP.termEqual(Code, 92)) { @@ -5581,13 +5593,13 @@ namespace Temporary { YP.put_code(Code); convertStringCodesPython(RestCodes); return; - goto cutIf1; + // goto cutIf1; } YP.put_code(Code); convertStringCodesPython(RestCodes); return; - cutIf1: - { } + // cutIf1: + // { } } } } @@ -5646,6 +5658,7 @@ namespace Temporary { } } } + #pragma warning restore 0168 } } -- cgit v1.1