diff --git a/OpenMetaverse.GUI/LocalChat.cs b/OpenMetaverse.GUI/LocalChat.cs index e302c4cb..20cf4628 100644 --- a/OpenMetaverse.GUI/LocalChat.cs +++ b/OpenMetaverse.GUI/LocalChat.cs @@ -87,7 +87,7 @@ namespace OpenMetaverse.GUI /// /// /// - /// + /// /// public void LogChat(string name, ChatType type, string message, Color color) { diff --git a/OpenMetaverse.GUI/MiniMap.cs b/OpenMetaverse.GUI/MiniMap.cs index 3cecd843..4545fe8c 100644 --- a/OpenMetaverse.GUI/MiniMap.cs +++ b/OpenMetaverse.GUI/MiniMap.cs @@ -43,7 +43,8 @@ namespace OpenMetaverse.GUI private UUID _MapImageID; private GridClient _Client; private Image _MapLayer; - private Point _MousePosition; + //warning CS0414: The private field `OpenMetaverse.GUI.MiniMap._MousePosition' is assigned but its value is never used + //private Point _MousePosition; ToolTip _ToolTip; /// @@ -191,7 +192,8 @@ namespace OpenMetaverse.GUI void MiniMap_MouseMove(object sender, MouseEventArgs e) { _ToolTip.Hide(this); - _MousePosition = e.Location; + //warning CS0414: The private field `OpenMetaverse.GUI.MiniMap._MousePosition' is assigned but its value is never used + //_MousePosition = e.Location; } void Grid_OnCoarseLocationUpdate(Simulator sim, List newEntries, List removedEntries) diff --git a/OpenMetaverse.Tests/NotationLLSDTests.cs b/OpenMetaverse.Tests/NotationLLSDTests.cs index ca28c7c3..729e48dd 100644 --- a/OpenMetaverse.Tests/NotationLLSDTests.cs +++ b/OpenMetaverse.Tests/NotationLLSDTests.cs @@ -711,9 +711,7 @@ namespace OpenMetaverse.Tests OSD llsdTwo = OSD.FromInteger(1); llsdArray.Add(llsdOne); llsdArray.Add(llsdTwo); - - string sOne = OSDParser.SerializeLLSDNotationFormatted(llsdArray); - + OSDMap llsdMap = new OSDMap(); OSD llsdThree = OSD.FromInteger(2); llsdMap["test1"] = llsdThree; @@ -721,9 +719,7 @@ namespace OpenMetaverse.Tests llsdMap["test2"] = llsdFour; llsdArray.Add(llsdMap); - - string sTwo = OSDParser.SerializeLLSDNotationFormatted(llsdArray); - + OSDArray llsdArrayTwo = new OSDArray(); OSD llsdFive = OSD.FromString("asdflkhjasdhj"); OSD llsdSix = OSD.FromString("asdkfhasjkldfghsd"); diff --git a/OpenMetaverse.Tests/TypeTests.cs b/OpenMetaverse.Tests/TypeTests.cs index e5029649..0622e678 100644 --- a/OpenMetaverse.Tests/TypeTests.cs +++ b/OpenMetaverse.Tests/TypeTests.cs @@ -64,13 +64,8 @@ namespace OpenMetaverse.Tests Assert.IsTrue(a == b, "UUID hyphenated string constructor failed, should have " + a.ToString() + " but we got " + b.ToString()); - // ToString() - string one = a.ToString(); - string two = b.ToString(); - Assert.IsTrue(a == b); - one = a.ToString(); - two = b.ToString(); - Assert.IsTrue(a == b); + // ToString() + Assert.IsTrue(a == b); Assert.IsTrue(a == (UUID)zeroonetwo); // TODO: CRC test diff --git a/OpenMetaverse/AssetManager.cs b/OpenMetaverse/AssetManager.cs index 26939d8d..cbe1b4c3 100644 --- a/OpenMetaverse/AssetManager.cs +++ b/OpenMetaverse/AssetManager.cs @@ -381,13 +381,14 @@ namespace OpenMetaverse Client.Network.RegisterCallback(PacketType.InitiateDownload, new NetworkManager.PacketCallback(InitiateDownloadPacketHandler)); } - + /// /// Request an asset download /// /// Asset UUID /// Asset type, must be correct for the transfer to succeed /// Whether to give this transfer an elevated priority + /// The callback to fire when the simulator responds with the asset data public void RequestAsset(UUID assetID, AssetType type, bool priority, AssetReceivedCallback callback) { RequestAsset(assetID, type, priority, SourceType.Asset, callback); @@ -400,6 +401,7 @@ namespace OpenMetaverse /// Asset type, must be correct for the transfer to succeed /// Whether to give this transfer an elevated priority /// Source location of the requested asset + /// The callback to fire when the simulator responds with the asset data public void RequestAsset(UUID assetID, AssetType type, bool priority, SourceType sourceType, AssetReceivedCallback callback) { AssetDownload transfer = new AssetDownload(); diff --git a/OpenMetaverse/Assets/AssetTypes/AssetGesture.cs b/OpenMetaverse/Assets/AssetTypes/AssetGesture.cs index 6045df10..4977b1ef 100644 --- a/OpenMetaverse/Assets/AssetTypes/AssetGesture.cs +++ b/OpenMetaverse/Assets/AssetTypes/AssetGesture.cs @@ -422,7 +422,8 @@ namespace OpenMetaverse.Assets GestureStepSound step = new GestureStepSound(); step.Name = lines[i++].Replace("\r", ""); step.ID = new UUID(lines[i++]); - int flags = int.Parse(lines[i++]); + // warning CS0219: The variable `flags' is assigned but its value is never used + //int flags = int.Parse(lines[i++]); Sequence.Add(step); break; @@ -432,7 +433,8 @@ namespace OpenMetaverse.Assets { GestureStepChat step = new GestureStepChat(); step.Text = lines[i++]; - int flags = int.Parse(lines[i++]); + // warning CS0219: The variable `flags' is assigned but its value is never used + //int flags = int.Parse(lines[i++]); Sequence.Add(step); break; diff --git a/OpenMetaverse/Assets/AssetTypes/AssetNotecard.cs b/OpenMetaverse/Assets/AssetTypes/AssetNotecard.cs index 257d3f64..8f6f96ea 100644 --- a/OpenMetaverse/Assets/AssetTypes/AssetNotecard.cs +++ b/OpenMetaverse/Assets/AssetTypes/AssetNotecard.cs @@ -201,7 +201,8 @@ namespace OpenMetaverse.Assets // Index if (!(m = Regex.Match(lines[i++], @"ext char index\s+(\d+)")).Success) throw new Exception("missing ext char index"); - int index = int.Parse(m.Groups[1].Value); + //warning CS0219: The variable `index' is assigned but its value is never used + //int index = int.Parse(m.Groups[1].Value); // Inventory item if (!(m = Regex.Match(lines[i++], @"inv_item\s+0")).Success) diff --git a/OpenMetaverse/Assets/AssetTypes/AssetPrim.cs b/OpenMetaverse/Assets/AssetTypes/AssetPrim.cs index d2ce7f94..458e691a 100644 --- a/OpenMetaverse/Assets/AssetTypes/AssetPrim.cs +++ b/OpenMetaverse/Assets/AssetTypes/AssetPrim.cs @@ -157,7 +157,8 @@ namespace OpenMetaverse.Assets reader.ReadStartElement("SceneObjectPart"); obj.CreatorIdentity = ReadUUID(reader, "CreatorID").ToString(); - UUID folderID = ReadUUID(reader, "FolderID"); + //warning CS0219: The variable `folderID' is assigned but its value is never used + //UUID folderID = ReadUUID(reader, "FolderID"); obj.Inventory.Serial = reader.ReadElementContentAsInt("InventorySerial", String.Empty); // FIXME: Parse TaskInventory @@ -185,7 +186,8 @@ namespace OpenMetaverse.Assets Vector3 offsetPosition = ReadVector(reader, "OffsetPosition"); obj.Rotation = ReadQuaternion(reader, "RotationOffset"); obj.Velocity = ReadVector(reader, "Velocity"); - Vector3 rotationalVelocity = ReadVector(reader, "RotationalVelocity"); + //warning CS0219: The variable `rotationalVelocity' is assigned but its value is never used + //Vector3 rotationalVelocity = ReadVector(reader, "RotationalVelocity"); obj.AngularVelocity = ReadVector(reader, "AngularVelocity"); obj.Acceleration = ReadVector(reader, "Acceleration"); obj.Description = reader.ReadElementString("Description"); @@ -307,10 +309,12 @@ namespace OpenMetaverse.Assets obj.ParentID = (uint)reader.ReadElementContentAsLong("ParentID", String.Empty); obj.CreationDate = Utils.UnixTimeToDateTime(reader.ReadElementContentAsInt("CreationDate", String.Empty)); //obj.Category = reader.ReadElementContentAsInt("Category", String.Empty); - int category = reader.ReadElementContentAsInt("Category", String.Empty); + //warning CS0219: The variable `category' is assigned but its value is never used + //int category = reader.ReadElementContentAsInt("Category", String.Empty); obj.SalePrice = reader.ReadElementContentAsInt("SalePrice", String.Empty); obj.SaleType = reader.ReadElementContentAsInt("ObjectSaleType", String.Empty); - int ownershipCost = reader.ReadElementContentAsInt("OwnershipCost", String.Empty); + //warning CS0219: The variable `ownershipCost' is assigned but its value is never used + //int ownershipCost = reader.ReadElementContentAsInt("OwnershipCost", String.Empty); obj.GroupIdentity = ReadUUID(reader, "GroupID").ToString(); obj.OwnerIdentity = ReadUUID(reader, "OwnerID").ToString(); obj.LastOwnerIdentity = ReadUUID(reader, "LastOwnerID").ToString(); diff --git a/OpenMetaverse/NetworkManager.cs b/OpenMetaverse/NetworkManager.cs index cfbf354c..2df3f17b 100644 --- a/OpenMetaverse/NetworkManager.cs +++ b/OpenMetaverse/NetworkManager.cs @@ -216,7 +216,7 @@ namespace OpenMetaverse /// /// Same as above but using inline delegates /// - /// Client.Network.OnLogoutReply += delegate(List inventoryItems) + /// Client.Network.OnLogoutReply += delegate(List<UUID> inventoryItems) /// { /// Console.WriteLine("Simulator confirmed logout"); /// }; diff --git a/OpenMetaverse/PacketDecoder.cs b/OpenMetaverse/PacketDecoder.cs index dccbc138..8cb0ad30 100644 --- a/OpenMetaverse/PacketDecoder.cs +++ b/OpenMetaverse/PacketDecoder.cs @@ -650,12 +650,7 @@ namespace OpenMetaverse.Packets return result.ToString(); } - - private static string DecodeGenericByteArrayToFormattedString(string fieldName, object fieldData) - { - return String.Format("{0,30}: {1,-40} [String]", fieldName, Utils.BytesToString((byte[]) fieldData)); - } - + private static string DecodeEstateParameter(string fieldName, object fieldData) { byte[] bytes = (byte[])fieldData; @@ -857,14 +852,7 @@ namespace OpenMetaverse.Packets fieldData, "(" + (AccessList)(uint)fieldData + ")"); } - - private static string DecodeParcelACLReply(string fieldName, object fieldData) - { - return String.Format("{0,30}: {1,-10} {2,-29} [ParcelAccessFlags]", - fieldName, - fieldData, - "(" + (ParcelAccessFlags)(uint)fieldData + ")"); - } + private static string SearchTypeFlags(string fieldName, object fieldData) { return String.Format("{0,30}: {1,-10} {2,-29} [DirectoryManager.SearchTypeFlags]", @@ -1469,13 +1457,11 @@ namespace OpenMetaverse.Packets else { var p = propertyInfo.GetValue(nestedArrayRecord, null); - string s = Utils.BytesToString((byte[])p); /* Leave the c for now at the end, it signifies something useful that still needs to be done */ result.AppendFormat("{0, 30}: {1,-40} [{2}]c" + Environment.NewLine, propertyInfo.Name, Utils.BytesToString((byte[])propertyInfo.GetValue(nestedArrayRecord, null)), propertyInfo.PropertyType.Name); - //result.AppendFormat("TEST: {0} ### ", s); } } result.AppendFormat("{0,32}" + Environment.NewLine, "***"); diff --git a/Programs/GridProxy/GridProxy.cs b/Programs/GridProxy/GridProxy.cs index daddd2f3..995f95ae 100644 --- a/Programs/GridProxy/GridProxy.cs +++ b/Programs/GridProxy/GridProxy.cs @@ -1430,10 +1430,7 @@ namespace GridProxy private Dictionary outgoingAcks; private List incomingSeenAcks; private List outgoingSeenAcks; - - private List loginRequestDelegates = new List(); - private List loginResponseDelegates = new List(); - + // SimProxy: construct a proxy for a single simulator public SimProxy(ProxyConfig proxyConfig, IPEndPoint simEndPoint, Proxy proxy) { diff --git a/Programs/PrimWorkshop/frmBrowser.cs b/Programs/PrimWorkshop/frmBrowser.cs index b0c2fdce..75942d17 100644 --- a/Programs/PrimWorkshop/frmBrowser.cs +++ b/Programs/PrimWorkshop/frmBrowser.cs @@ -49,7 +49,7 @@ namespace PrimWorkshop int ClickY = 0; uint LastHit = 0; - // + //warning CS0414: The private field `PrimWorkshop.frmBrowser.PivotPosition' is assigned but its value is never used Vector3 PivotPosition = Vector3.Zero; private bool Pivoting; Point LastPivot; @@ -58,7 +58,7 @@ namespace PrimWorkshop const int SELECT_BUFSIZE = 512; uint[] SelectBuffer = new uint[SELECT_BUFSIZE]; - // + //warning CS0414: The private field `PrimWorkshop.frmBrowser.msg' is assigned but its value is never used NativeMethods.Message msg; private bool AppStillIdle { diff --git a/Programs/WinGridProxy/FormWinGridProxy.cs b/Programs/WinGridProxy/FormWinGridProxy.cs index dac3541f..0f259e5b 100644 --- a/Programs/WinGridProxy/FormWinGridProxy.cs +++ b/Programs/WinGridProxy/FormWinGridProxy.cs @@ -363,7 +363,6 @@ namespace WinGridProxy if (tag is string && tag.ToString().StartsWith("Packet Type:")) { Be.Windows.Forms.DynamicByteProvider data = new Be.Windows.Forms.DynamicByteProvider(Utils.StringToBytes(tag.ToString())); - var ei = e.Item; if (e.Item.ImageIndex == 1) // sent item { richTextBoxDecodedRequest.Text = String.Format("{0}", tag); @@ -930,7 +929,7 @@ namespace WinGridProxy session["packet"].AsString(), session["size"].AsString(), session["host"].AsString()})); - var id = addedItem.SubItems[1]; + addedItem.ImageIndex = session["image_index"].AsInteger(); addedItem.BackColor = Color.GhostWhite; // give imported items a different color addedItem.Tag = Utils.BytesToString(session["tag"].AsBinary()); @@ -1163,6 +1162,8 @@ namespace WinGridProxy string name = packetTypes[i].Name; + // warning CS0219: The variable `pType' is assigned but its value is never used + // this is used to check for valid names. PacketType pType; try diff --git a/Programs/examples/TestClient/Commands/Inventory/CreateNotecardCommand.cs b/Programs/examples/TestClient/Commands/Inventory/CreateNotecardCommand.cs index 5c843f01..55092cc1 100644 --- a/Programs/examples/TestClient/Commands/Inventory/CreateNotecardCommand.cs +++ b/Programs/examples/TestClient/Commands/Inventory/CreateNotecardCommand.cs @@ -167,7 +167,6 @@ namespace OpenMetaverse.TestClient string DownloadNotecard(UUID itemID, UUID assetID) { - UUID transferID = UUID.Zero; AutoResetEvent assetDownloadEvent = new AutoResetEvent(false); byte[] notecardData = null; string error = "Timeout"; diff --git a/Programs/examples/groupmanager/frmGroupInfo.cs b/Programs/examples/groupmanager/frmGroupInfo.cs index 7dc0a688..c8677835 100644 --- a/Programs/examples/groupmanager/frmGroupInfo.cs +++ b/Programs/examples/groupmanager/frmGroupInfo.cs @@ -33,6 +33,7 @@ namespace groupmanager while (!IsHandleCreated) { // Force handle creation + // warning CS0219: The variable `temp' is assigned but its value is never used IntPtr temp = Handle; }