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. --- OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 12 ++++++------ .../Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs | 6 +++++- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools') diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index 841ed26..d54d2f5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs @@ -40,8 +40,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { public class Compiler { - private static readonly log4net.ILog m_log - = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + // private static readonly log4net.ILog m_log + // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); // * Uses "LSL2Converter" to convert LSL to C# if necessary. // * Compiles C#-code into an assembly @@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools private static CSharpCodeProvider YPcodeProvider = new CSharpCodeProvider(); // YP is translated into CSharp private static YP2CSConverter YP_Converter = new YP2CSConverter(); - private static int instanceID = new Random().Next(0, int.MaxValue); // Unique number to use on our compiled files + // private static int instanceID = new Random().Next(0, int.MaxValue); // Unique number to use on our compiled files private static UInt64 scriptCompileCounter = 0; // And a counter public IScriptEngine m_scriptEngine; @@ -273,7 +273,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { Directory.CreateDirectory(ScriptEnginesPath); } - catch (Exception ex) + catch (Exception) { } } @@ -285,7 +285,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { Directory.CreateDirectory(ScriptEnginesPath); } - catch (Exception ex) + catch (Exception) { } } @@ -486,7 +486,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // } string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); - string rootPathSE = Path.GetDirectoryName(GetType().Assembly.Location); + // string rootPathSE = Path.GetDirectoryName(GetType().Assembly.Location); //Console.WriteLine("Assembly location: " + rootPath); parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs index 54b4861..69f9fdc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs @@ -69,11 +69,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools YP.tell(myCS_SW); //Console.WriteLine("Mycode\n ===================================\n" + myCode+"\n"); + // disable warning on l1, don't see how we can + // code this differently + #pragma warning disable 0168 foreach (bool l1 in Parser.parseInput(TermList)) { foreach (bool l2 in YPCompiler.makeFunctionPseudoCode(TermList, FunctionCode)) { - ListPair VFC = new ListPair(FunctionCode, new Variable()); + // ListPair VFC = new ListPair(FunctionCode, new Variable()); //Console.WriteLine("-------------------------") //Console.WriteLine(FunctionCode.ToString()) //Console.WriteLine("-------------------------") @@ -81,6 +84,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools //YPCompiler.convertStringCodesCSharp(VFC); } } + #pragma warning restore 0168 YP.seen(); myCS_SW.Close(); YP.told(); -- cgit v1.1