dr scofield's warning safari:

* commented out [Obsolete(....)] attributes where no replacement feature
  was available: if we want to attribute code that we think needs to be 
  reworked, we should define a new attribute and use that instead 
  (together with a little tool to retrieve all the attributed code then)
* commenting out unused variables
This commit is contained in:
Dr Scofield
2008-06-27 16:58:21 +00:00
parent ba989e9fd1
commit feb30217de
18 changed files with 64 additions and 62 deletions

View File

@@ -138,7 +138,7 @@ namespace OpenSim.Framework
}
}
[Obsolete("Using Obsolete to drive development is invalid. Obsolete presumes that something new has already been created to replace this.")]
// [Obsolete("Using Obsolete to drive development is invalid. Obsolete presumes that something new has already been created to replace this.")]
public uint[] GetAllCircuits(LLUUID agentId)
{
List<uint> circuits = new List<uint>();

View File

@@ -79,17 +79,17 @@ namespace OpenSim.Framework.Communications.Capabilities
private CapsHandlers m_capsHandlers;
private static readonly string m_requestPath = "0000/";
private static readonly string m_mapLayerPath = "0001/";
// private static readonly string m_mapLayerPath = "0001/";
private static readonly string m_newInventory = "0002/";
//private static readonly string m_requestTexture = "0003/";
private static readonly string m_notecardUpdatePath = "0004/";
private static readonly string m_notecardTaskUpdatePath = "0005/";
private static readonly string m_fetchInventoryPath = "0006/";
// private static readonly string m_fetchInventoryPath = "0006/";
// The following two entries are in a module, however, there also here so that we don't re-assign
// the path to another cap by mistake.
private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; // This is in a module.
private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module.
// private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; // This is in a module.
// private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module.
//private string eventQueue = "0100/";
private BaseHttpServer m_httpListener;
@@ -246,7 +246,7 @@ namespace OpenSim.Framework.Communications.Capabilities
// multiple fetch-folder maps are allowed within the larger folders map.
public string FetchInventoryRequest(string request, string path, string param)
{
string unmodifiedRequest = request.ToString();
// string unmodifiedRequest = request.ToString();
//m_log.DebugFormat("[AGENT INVENTORY]: Received CAPS fetch inventory request {0}", unmodifiedRequest);
m_log.Debug("[CAPS]: Inventory Request in region: " + m_regionName);

View File

@@ -282,7 +282,7 @@ namespace OpenSim.Framework.Communications
if (profileData != null)
{
returnstring = new string[2];
LLUUID profileId = profileData.ID;
// LLUUID profileId = profileData.ID;
returnstring[0] = profileData.FirstName;
returnstring[1] = profileData.SurName;
lock (m_nameRequestCache)

View File

@@ -95,7 +95,7 @@ namespace OpenSim.Framework.Communications
// Response
private XmlRpcResponse xmlRpcResponse;
private XmlRpcResponse defaultXmlRpcResponse;
// private XmlRpcResponse defaultXmlRpcResponse;
private string welcomeMessage;
private string startLocation;
@@ -117,7 +117,7 @@ namespace OpenSim.Framework.Communications
loginError = new Hashtable();
uiConfigHash = new Hashtable();
defaultXmlRpcResponse = new XmlRpcResponse();
// defaultXmlRpcResponse = new XmlRpcResponse();
userProfile = new UserInfo();
inventoryRoot = new ArrayList();
initialOutfit = new ArrayList();
@@ -126,7 +126,7 @@ namespace OpenSim.Framework.Communications
inventoryLibraryOwner = new ArrayList();
xmlRpcResponse = new XmlRpcResponse();
defaultXmlRpcResponse = new XmlRpcResponse();
// defaultXmlRpcResponse = new XmlRpcResponse();
SetDefaultValues();
}

View File

@@ -58,7 +58,7 @@ namespace OpenSim.Framework.Communications
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private string realuri;
// private string realuri;
#region member variables
@@ -229,7 +229,7 @@ namespace OpenSim.Framework.Communications
sb.Append(kv.Value);
}
}
realuri = sb.ToString();
// realuri = sb.ToString();
//m_log.InfoFormat("[REST CLIENT]: RestURL: {0}", realuri);
return new Uri(sb.ToString());
}
@@ -250,8 +250,9 @@ namespace OpenSim.Framework.Communications
if (read > 0)
{
_resource.Write(_readbuf, 0, read);
IAsyncResult asynchronousResult =
s.BeginRead(_readbuf, 0, BufferSize, new AsyncCallback(StreamIsReadyDelegate), s);
// IAsyncResult asynchronousResult =
// s.BeginRead(_readbuf, 0, BufferSize, new AsyncCallback(StreamIsReadyDelegate), s);
s.BeginRead(_readbuf, 0, BufferSize, new AsyncCallback(StreamIsReadyDelegate), s);
// TODO! Implement timeout, without killing the server
//ThreadPool.RegisterWaitForSingleObject(asynchronousResult.AsyncWaitHandle, new WaitOrTimerCallback(TimeoutCallback), _request, DefaultTimeout, true);

View File

@@ -38,8 +38,8 @@ namespace OpenSim.Framework.Communications.XMPP
{
public class XmppSerializer
{
private static readonly ILog _log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private static readonly ILog _log =
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// need to do it this way, as XmlSerializer(type, extratypes)
// does not work on mono (at least).

View File

@@ -664,7 +664,7 @@ namespace OpenSim.Framework
string LastName { get; }
[Obsolete("LLClientView Specific - Replace with ???")]
// [Obsolete("LLClientView Specific - Replace with ???")]
int NextAnimationSequenceNumber { get; }
/// <summary>
@@ -680,22 +680,22 @@ namespace OpenSim.Framework
set;
}
[Obsolete("LLClientView Specific - Circuits are unique to LLClientView")]
// [Obsolete("LLClientView Specific - Circuits are unique to LLClientView")]
uint CircuitCode { get; }
[Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
// [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
event ImprovedInstantMessage OnInstantMessage;
[Obsolete("LLClientView Specific - Replace with more bare-bones arguments. Rename OnChat.")]
// [Obsolete("LLClientView Specific - Replace with more bare-bones arguments. Rename OnChat.")]
event ChatFromViewer OnChatFromViewer;
[Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
// [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
event TextureRequest OnRequestTexture;
[Obsolete("LLClientView Specific - Remove bitbuckets. Adam, can you be more specific here.. as I don't see any bit buckets.")]
// [Obsolete("LLClientView Specific - Remove bitbuckets. Adam, can you be more specific here.. as I don't see any bit buckets.")]
event RezObject OnRezObject;
[Obsolete("LLClientView Specific - Replace with more suitable arguments.")]
// [Obsolete("LLClientView Specific - Replace with more suitable arguments.")]
event ModifyTerrain OnModifyTerrain;
event BakeTerrain OnBakeTerrain;
[Obsolete("LLClientView Specific.")]
// [Obsolete("LLClientView Specific.")]
event SetAppearance OnSetAppearance;
[Obsolete("LLClientView Specific - Replace and rename OnAvatarUpdate. Difference from SetAppearance?")]
// [Obsolete("LLClientView Specific - Replace and rename OnAvatarUpdate. Difference from SetAppearance?")]
event AvatarNowWearing OnAvatarNowWearing;
event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
event UUIDNameRequest OnDetachAttachmentIntoInv;
@@ -841,7 +841,7 @@ namespace OpenSim.Framework
event ScriptReset OnScriptReset;
event UpdateVector OnAutoPilotGo;
[Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")]
// [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")]
void OutPacket(Packet newPack, ThrottleOutPacketType packType);
void SendWearables(AvatarWearable[] wearables, int serial);
void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry);

View File

@@ -341,7 +341,7 @@ namespace OpenSim.Framework
byte[] returnbytes = new byte[TotalBytesLength];
uint paramlength = ExtraParamsNum;
// uint paramlength = ExtraParamsNum;
// Stick in the number of parameters
returnbytes[i++] = (byte)ExtraParamsNum;
@@ -462,7 +462,7 @@ namespace OpenSim.Framework
ushort epType = Helpers.BytesToUInt16(data, i);
i += 2;
uint paramLength = Helpers.BytesToUIntBig(data, i);
// uint paramLength = Helpers.BytesToUIntBig(data, i);
i += 4;
switch (epType)

View File

@@ -76,7 +76,8 @@ namespace OpenSim.Framework.Servers
Stream requestStream = request.GetRequestStream();
requestStream.Write(buffer.ToArray(), 0, length);
IAsyncResult result = request.BeginGetResponse(AsyncCallback, request);
// IAsyncResult result = request.BeginGetResponse(AsyncCallback, request);
request.BeginGetResponse(AsyncCallback, request);
}
private void AsyncCallback(IAsyncResult result)

View File

@@ -86,7 +86,7 @@ namespace OpenSim.Framework.Statistics
/// Report back collected statistical information.
/// </summary>
/// <returns></returns>
public string Report()
override public string Report()
{
double elapsedHours = (DateTime.Now - startTime).TotalHours;
if (elapsedHours <= 0) { elapsedHours = 1; } // prevent divide by zero

View File

@@ -81,7 +81,7 @@ namespace OpenSim.Framework.Statistics
/// Report back collected statistical information.
/// </summary>
/// <returns></returns>
public string Report()
override public string Report()
{
return string.Format(
@"Successful logins total : {0}, today : {1}, yesterday : {2}

View File

@@ -44,7 +44,7 @@ namespace OpenSim.Framework
public class TaskInventoryDictionary : Dictionary<LLUUID, TaskInventoryItem>,
ICloneable, IXmlSerializable
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static XmlSerializer tiiSerializer = new XmlSerializer(typeof (TaskInventoryItem));

View File

@@ -637,7 +637,7 @@ namespace OpenSim.Framework
}
memory.Position = 0;
MemoryStream outStream = new MemoryStream();
// MemoryStream outStream = new MemoryStream();
byte[] compressed = new byte[memory.Length];
memory.Read(compressed, 0, compressed.Length);