From 0f22013ae40e49412684903503005519144dc245 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 10 Nov 2008 19:06:01 +0000 Subject: minor: remove mono compiler warnings --- OpenSim/ApplicationPlugins/ScriptEngine/ComponentFactory.cs | 3 ++- OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 1 - .../Components/DotNetEngine/Commands_OSSL/Commands_OSSL.cs | 4 ++-- .../Components/DotNetEngine/Compilers/CILCompiler.cs | 2 +- .../Components/DotNetEngine/Scheduler/BaseClassFactory.cs | 10 +++++----- .../DotNetEngine/Scheduler/ScriptManager_ScriptLoadUnload.cs | 10 +++++----- OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/ComponentFactory.cs b/OpenSim/ApplicationPlugins/ScriptEngine/ComponentFactory.cs index 48cd1f9..03d3f6f 100644 --- a/OpenSim/ApplicationPlugins/ScriptEngine/ComponentFactory.cs +++ b/OpenSim/ApplicationPlugins/ScriptEngine/ComponentFactory.cs @@ -65,10 +65,11 @@ namespace OpenSim.ApplicationPlugins.ScriptEngine { componentAssembly = Assembly.LoadFrom(file); } - catch (Exception e) + catch { m_log.ErrorFormat("[{0}] Error loading: \"{1}\".", Name, file); } + if (componentAssembly != null) { try diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 08a97f07..48463d1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -871,7 +871,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance Stop(100); Running = run; return ScriptSerializer.Serialize(this); - Running = false; } } } diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Commands_OSSL/Commands_OSSL.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Commands_OSSL/Commands_OSSL.cs index 6b5dc14..86eab09 100644 --- a/OpenSim/ScriptEngine/Components/DotNetEngine/Commands_OSSL/Commands_OSSL.cs +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Commands_OSSL/Commands_OSSL.cs @@ -34,10 +34,10 @@ namespace OpenSim.ScriptEngine.Components.DotNetEngine.Commands_OSSL { public class Commands_OSSL : IScriptEngineComponent { - private RegionInfoStructure CurrentRegion; + //private RegionInfoStructure CurrentRegion; public void Initialize(RegionInfoStructure currentRegion) { - CurrentRegion = currentRegion; + //CurrentRegion = currentRegion; } } diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/CILCompiler.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/CILCompiler.cs index 4b0e679..bff1879 100644 --- a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/CILCompiler.cs +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/CILCompiler.cs @@ -109,7 +109,7 @@ namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers CompilerParameters parameters = new CompilerParameters(); parameters.IncludeDebugInformation = true; - string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); + //string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); foreach (string file in AppDomainAssemblies) { diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Scheduler/BaseClassFactory.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Scheduler/BaseClassFactory.cs index 2f6d916..93f29d7 100644 --- a/OpenSim/ScriptEngine/Components/DotNetEngine/Scheduler/BaseClassFactory.cs +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Scheduler/BaseClassFactory.cs @@ -60,7 +60,7 @@ namespace OpenSim.ScriptEngine.Components.DotNetEngine.Scheduler TypeBuilder classBuilder = modBuilder.DefineType(ClassID, TypeAttributes.Class | TypeAttributes.Public); // The default constructor - ConstructorBuilder ctorBuilder = classBuilder.DefineDefaultConstructor(MethodAttributes.Public); + //ConstructorBuilder ctorBuilder = classBuilder.DefineDefaultConstructor(MethodAttributes.Public); Type[] paramsTypeArray = new Type[] {typeof (System.ParamArrayAttribute)}; @@ -81,9 +81,9 @@ namespace OpenSim.ScriptEngine.Components.DotNetEngine.Scheduler //ilgen.Emit(OpCodes.Ldelem_Ref); //ilgen.MarkSequencePoint(doc, 6, 1, 6, 100); - MethodInfo ExecuteFunction = typeof(ScriptAssemblies.IScript).GetMethod( - "ExecuteFunction", - executeFunctionTypeArray); + //MethodInfo ExecuteFunction = typeof(ScriptAssemblies.IScript).GetMethod( + // "ExecuteFunction", + // executeFunctionTypeArray); ilgen.DeclareLocal(typeof(string)); ilgen.Emit(OpCodes.Nop); @@ -234,7 +234,7 @@ namespace OpenSim.ScriptEngine.Components.DotNetEngine.Scheduler File.Delete(toFile); File.Move(asmFileName, toFile); - string a = ""; + //string a = ""; } } } \ No newline at end of file diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Scheduler/ScriptManager_ScriptLoadUnload.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Scheduler/ScriptManager_ScriptLoadUnload.cs index 1fd5d72..e657f32 100644 --- a/OpenSim/ScriptEngine/Components/DotNetEngine/Scheduler/ScriptManager_ScriptLoadUnload.cs +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Scheduler/ScriptManager_ScriptLoadUnload.cs @@ -142,10 +142,10 @@ namespace OpenSim.ScriptEngine.Components.DotNetEngine.Scheduler return; } - UUID assetID = UUID.Zero; + //UUID assetID = UUID.Zero; TaskInventoryItem taskInventoryItem = new TaskInventoryItem(); - if (m_host.TaskInventory.TryGetValue(ScriptObject.Script.ItemID, out taskInventoryItem)) - assetID = taskInventoryItem.AssetID; + //if (m_host.TaskInventory.TryGetValue(ScriptObject.Script.ItemID, out taskInventoryItem)) + // assetID = taskInventoryItem.AssetID; ScenePresence presence = ScriptObject.Script.RegionInfo.Scene.GetScenePresence(taskInventoryItem.OwnerID); @@ -168,7 +168,7 @@ namespace OpenSim.ScriptEngine.Components.DotNetEngine.Scheduler { IScriptCompiler compiler = ScriptObject.Script.RegionInfo.FindCompiler(ScriptObject.Script.ScriptMetaData); - RegionInfoStructure currentRegionInfo = ScriptObject.Script.RegionInfo; + //RegionInfoStructure currentRegionInfo = ScriptObject.Script.RegionInfo; fileName = compiler.Compile(ScriptObject.Script.ScriptMetaData, ref ScriptObject.Script.Source); ScriptObject.Script.AssemblyFileName = fileName; @@ -263,7 +263,7 @@ namespace OpenSim.ScriptEngine.Components.DotNetEngine.Scheduler // Tell script not to accept new requests ss.Running = false; ss.Disabled = true; - AppDomain ad = ss.AppDomain; + //AppDomain ad = ss.AppDomain; // Remove from internal structure MemRemoveScript(localID, itemID); diff --git a/OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs b/OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs index 1339a9e..ab7835d 100644 --- a/OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs +++ b/OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs @@ -55,7 +55,7 @@ namespace ScriptAssemblies public delegate void ExecuteFunctionEventDelegate(string functionName, params object[] args); public event ExecuteFunctionEventDelegate OnExecuteFunction; - private List CommandProviders = new List(); + //private List CommandProviders = new List(); public ScriptBase() { -- cgit v1.1