From 998d7009a65def0a4debc9369d35b63611db5b55 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Tue, 22 Apr 2014 20:04:12 +0300 Subject: Eliminated many warnings --- OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs | 2 +- OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs | 2 ++ .../CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 2 -- .../CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 2 +- .../CoreModules/Framework/UserManagement/UserManagementModule.cs | 2 -- OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 2 -- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 2 +- OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs | 2 +- OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | 5 ++++- OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 3 +++ 10 files changed, 13 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs index 6ff991e..af8a0c1 100644 --- a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs @@ -140,7 +140,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures return ret.ToArray(); } - catch (XmlException e) + catch (XmlException) { return null; } diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs index 4c678c2..c2440d8 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs @@ -49,8 +49,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage private static readonly ILog m_log = LogManager.GetLogger( MethodBase.GetCurrentMethod().DeclaringType); +#pragma warning disable 0067 public event PresenceChange OnPresenceChange; public event BulkPresenceData OnBulkPresenceData; +#pragma warning restore 0067 protected List m_Scenes = new List(); diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index d4b2f2d..539367d 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -1540,8 +1540,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer public bool Cross(ScenePresence agent, bool isFlying) { - uint x; - uint y; Vector3 newpos; string version; string failureReason; diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 0becfb2..a3cebe9 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs @@ -426,7 +426,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // return base.UpdateAgent(reg, finalDestination, agentData, sp); //} - public virtual void TriggerTeleportHome(UUID id, IClientAPI client) + public override void TriggerTeleportHome(UUID id, IClientAPI client) { TeleportHome(id, client); } diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 3455e2c..6a997b3 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -686,8 +686,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement if (!ConsoleUtil.TryParseConsoleUuid(MainConsole.Instance, cmd[2], out userId)) return; - string[] names; - UserData ud; lock (m_UserCache) diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 5ab97ff..fa5bfd6 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -848,8 +848,6 @@ namespace OpenSim.Region.CoreModules.World.Land /// private ILandObject GetLandObject(int x, int y, bool returnNullIfLandObjectOutsideBounds) { - ILandObject ret = null; - if (x >= m_scene.RegionInfo.RegionSizeX || y >= m_scene.RegionInfo.RegionSizeY || x < 0 || y < 0) { // These exceptions here will cause a lot of complaints from the users specifically because diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 57fa4d9..b1cfc81 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -927,7 +927,7 @@ namespace OpenSim.Region.CoreModules.World.Land { tempConvertMap[x, y] = bit; } - catch (Exception e) + catch (Exception) { m_log.DebugFormat("{0} ConvertBytestoLandBitmap: i={1}, x={2}, y={3}", LogHeader, i, x, y); } diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs index b00620e..796a15f 100644 --- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs @@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap { mapbmp = new Bitmap(m_scene.RegionInfo.MaptileStaticFile); } - catch (Exception e) + catch (Exception) { m_log.ErrorFormat( "[MAPTILE]: Failed to load Static map image texture file: {0} for {1}", diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 3fda67f..56ceffd 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -74,8 +74,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain #endregion private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + +#pragma warning disable 414 private static readonly string LogHeader = "[TERRAIN MODULE]"; - +#pragma warning restore 414 + private readonly Commander m_commander = new Commander("terrain"); private readonly Dictionary m_floodeffects = diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index 23dee56..700fd8f 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs @@ -61,7 +61,10 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap private static readonly Color4 WATER_COLOR = new Color4(29, 72, 96, 216); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + +#pragma warning disable 414 private static string LogHeader = "[WARP 3D IMAGE MODULE]"; +#pragma warning restore 414 private Scene m_scene; private IRendering m_primMesher; -- cgit v1.1