From c92ba1cc04c36d46b3569c06d8339cf897af65cc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 15 Jan 2018 16:23:19 +0000 Subject: [PATCH] shut up some pesty warnings --- .../RemoteController/RemoteAdminPlugin.cs | 2 +- OpenSim/Framework/Monitoring/JobEngine.cs | 2 +- .../HttpServer/PollServiceHttpRequest.cs | 3 ++- .../CoreModules/Asset/FlotsamAssetCache.cs | 2 +- .../HttpRequest/ScriptsHttpRequests.cs | 3 ++- .../CoreModules/World/Land/LandObject.cs | 4 ++-- .../CoreModules/World/Wind/WindModule.cs | 1 - .../Region/Framework/Scenes/KeyframeMotion.cs | 24 +++++++++---------- .../Serialization/SceneObjectSerializer.cs | 2 +- .../BasicPhysics/BasicPhysicsScene.cs | 4 ++-- .../PhysicsModules/BulletS/BSCharacter.cs | 1 + .../PhysicsModules/BulletS/Tests/Raycast.cs | 2 +- .../ubOdeMeshing/Meshmerizer.cs | 5 ++-- .../Shared/Instance/ScriptInstance.cs | 1 - .../Neighbour/NeighbourServicesConnector.cs | 3 ++- 15 files changed, 30 insertions(+), 29 deletions(-) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 84d87f176c..f29898a936 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -1934,7 +1934,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController GetSceneFromRegionParams(requestData, responseData, out scene); health = scene.GetHealth(out flags, out text); } - catch (Exception e) + catch { responseData["error"] = null; } diff --git a/OpenSim/Framework/Monitoring/JobEngine.cs b/OpenSim/Framework/Monitoring/JobEngine.cs index 115871e4a7..4a831e8ae2 100644 --- a/OpenSim/Framework/Monitoring/JobEngine.cs +++ b/OpenSim/Framework/Monitoring/JobEngine.cs @@ -238,7 +238,7 @@ namespace OpenSim.Framework.Monitoring break; } } - catch(ObjectDisposedException e) + catch(ObjectDisposedException) { m_log.DebugFormat("[JobEngine] {0} stopping ignoring {1} jobs in queue", Name,m_jobQueue.Count); diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs index eb8ca0db6c..8ab5808cff 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs @@ -130,7 +130,8 @@ namespace OpenSim.Framework.Servers.HttpServer response.OutputStream.Flush(); response.Send(); } - catch (Exception e) +// catch (Exception e) + catch { } } diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index f2fc070c58..47ac18834a 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -809,7 +809,7 @@ namespace OpenSim.Region.CoreModules.Asset return; } - catch (UnauthorizedAccessException e) + catch (UnauthorizedAccessException) { } finally diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index d342163c54..e7f0aec483 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -666,7 +666,8 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest ResponseBody = e.Message; } } - catch (Exception e) +// catch (Exception e) + catch { // Don't crash on anything else } diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 4471432c2d..51e60716c5 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -1396,9 +1396,9 @@ namespace OpenSim.Region.CoreModules.World.Land byte[] tempConvertArr = new byte[LandBitmap.GetLength(0) * LandBitmap.GetLength(1) / 8]; int tempByte = 0; - int i, byteNum = 0; + int byteNum = 0; int mask = 1; - i = 0; + for (int y = 0; y < LandBitmap.GetLength(1); y++) { for (int x = 0; x < LandBitmap.GetLength(0); x++) diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index a1fff62dd7..ebcb678ad7 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs @@ -47,7 +47,6 @@ namespace OpenSim.Region.CoreModules private uint m_frame = 0; private int m_dataVersion = 0; - private int m_regionID = 0; private int m_frameUpdateRate = 150; //private Random m_rndnums = new Random(Environment.TickCount); private Scene m_scene = null; diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index 80ee5101aa..bf20c32540 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -497,7 +497,7 @@ namespace OpenSim.Region.Framework.Scenes m_group.RootPart.Velocity = Vector3.Zero; m_group.RootPart.AngularVelocity = Vector3.Zero; - m_skippedUpdates = 1000; +// m_skippedUpdates = 1000; // m_group.SendGroupRootTerseUpdate(); m_group.RootPart.ScheduleTerseUpdate(); m_group.Scene.EventManager.TriggerMovingEndEvent(m_group.RootPart.LocalId); @@ -521,7 +521,7 @@ namespace OpenSim.Region.Framework.Scenes return; if (m_running && !m_waitingCrossing) StartTimer(); - m_skippedUpdates = 1000; +// m_skippedUpdates = 1000; } } @@ -652,10 +652,10 @@ namespace OpenSim.Region.Framework.Scenes m_frames.Clear(); } - [NonSerialized()] Vector3 m_lastPosUpdate; - [NonSerialized()] Quaternion m_lastRotationUpdate; +// [NonSerialized()] Vector3 m_lastPosUpdate; +// [NonSerialized()] Quaternion m_lastRotationUpdate; [NonSerialized()] Vector3 m_currentVel; - [NonSerialized()] int m_skippedUpdates; +// [NonSerialized()] int m_skippedUpdates; [NonSerialized()] double m_lasttickMS; private void DoOnTimer(double tickDuration) @@ -669,14 +669,14 @@ namespace OpenSim.Region.Framework.Scenes if (m_group == null) return; - bool update = false; +// bool update = false; if (m_selected) { if (m_group.RootPart.Velocity != Vector3.Zero) { m_group.RootPart.Velocity = Vector3.Zero; - m_skippedUpdates = 1000; +// m_skippedUpdates = 1000; // m_group.SendGroupRootTerseUpdate(); m_group.RootPart.ScheduleTerseUpdate(); } @@ -690,7 +690,7 @@ namespace OpenSim.Region.Framework.Scenes // retry to set the position that evtually caused the outbound // if still outside region this will call startCrossing below m_isCrossing = false; - m_skippedUpdates = 1000; +// m_skippedUpdates = 1000; m_group.AbsolutePosition = m_nextPosition; if (!m_isCrossing) @@ -724,7 +724,7 @@ namespace OpenSim.Region.Framework.Scenes m_currentFrame.TimeMS += (int)tickDuration; m_lasttickMS = nowMS - 50f; - update = true; +// update = true; } int elapsed = (int)(nowMS - m_lasttickMS); @@ -761,7 +761,7 @@ namespace OpenSim.Region.Framework.Scenes else m_group.RootPart.Velocity = Vector3.Zero; } - update = true; +// update = true; } else { @@ -858,7 +858,7 @@ namespace OpenSim.Region.Framework.Scenes if (m_group.RootPart.Velocity != Vector3.Zero) { m_group.RootPart.Velocity = Vector3.Zero; - m_skippedUpdates = 1000; +// m_skippedUpdates = 1000; // m_group.SendGroupRootTerseUpdate(); m_group.RootPart.ScheduleTerseUpdate(); } @@ -871,7 +871,7 @@ namespace OpenSim.Region.Framework.Scenes if (m_group != null) { m_group.RootPart.Velocity = Vector3.Zero; - m_skippedUpdates = 1000; +// m_skippedUpdates = 1000; // m_group.SendGroupRootTerseUpdate(); m_group.RootPart.ScheduleTerseUpdate(); diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index a2d512a0bf..66bf53689d 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -1401,7 +1401,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization value = reader.ReadElementContentAsString("Media", String.Empty); shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); } - catch (XmlException e) + catch (XmlException) { // There are versions of OAR files that contain unquoted XML. // ie ONE comercial fork that never wanted their oars to be read by our code diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs index 2a1ae45e08..5ce1515cb4 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsScene.cs @@ -163,7 +163,7 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics { // Console.WriteLine("Simulating"); - float fps = 0; + float fps = 1.0f / timeStep; for (int i = 0; i < _actors.Count; ++i) { BasicActor actor = _actors[i]; @@ -226,7 +226,7 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics actor.Velocity = actorVelocity; } - return 1.0f; + return fps; } public override void GetResults() diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs index d182c34890..2ca7dbc498 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs @@ -92,6 +92,7 @@ public sealed class BSCharacter : BSPhysObject Density = BSParam.AvatarDensity; _isPhysical = true; + _footOffset = footOffset; // Adjustments for zero X and Y made in Size() // This also computes avatar scale, volume, and mass SetAvatarSize(size, footOffset, true /* initializing */); diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/Raycast.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/Raycast.cs index bfa95c17cd..a6f587e974 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/Raycast.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/Raycast.cs @@ -51,7 +51,7 @@ namespace OpenSim.Region.PhysicsModule.BulletS.Tests BSScene _physicsScene { get; set; } BSPrim _targetSphere { get; set; } Vector3 _targetSpherePosition { get; set; } - float _simulationTimeStep = 0.089f; +// float _simulationTimeStep = 0.089f; uint _targetLocalID = 123; diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs index 032d4ed421..451345f3b1 100644 --- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs @@ -340,7 +340,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing faces = new List(); OSD meshOsd = null; - if (primShape.SculptData == null || primShape.SculptData.Length <= 0) + if (primShape.SculptData.Length <= 0) { // m_log.InfoFormat("[MESH]: asset data for {0} is zero length", primName); return false; @@ -363,7 +363,6 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing catch (Exception e) { m_log.Error("[MESH]: Exception deserializing mesh asset header:" + e.ToString()); - return false; } start = data.Position; @@ -1383,7 +1382,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing { File.Delete(filename); } - catch (IOException e) + catch (IOException) { m_log.ErrorFormat( "[MESH CACHE]: Failed to delete file {0}",filename); diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 9d72b1c697..a98311e17b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -771,7 +771,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance /// public object EventProcessor() { - EventParams data = null; // We check here as the thread stopping this instance from running may itself hold the m_Script lock. if (!Running) return 0; diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs index 5f075ace29..9f3b94c78d 100644 --- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs +++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs @@ -151,7 +151,8 @@ namespace OpenSim.Services.Connectors os.Write(buffer, 0, strBuffer.Length); //Send it //m_log.InfoFormat("[REST COMMS]: Posted HelloNeighbour request to remote sim {0}", uri); } - catch (Exception e) +// catch (Exception e) + catch { // m_log.WarnFormat( // "[NEIGHBOUR SERVICE CONNCTOR]: Unable to send HelloNeighbour from {0} to {1}. Exception {2}{3}",