Author: gonzalo
Date: 2005-04-20 20:47:25 -0400 (Wed, 20 Apr 2005)
New Revision: 43368
Modified:
trunk/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
trunk/mcs/class/System/Microsoft.VisualBasic/VBCodeGenerator.cs
trunk/mcs/class/System/System.Collections.Specialized/StringEnumerator.cs
trunk/mcs/class/System/System.ComponentModel/ListChangedEventArgs.cs
trunk/mcs/class/System/System.ComponentModel/ReflectionPropertyDescriptor.cs
trunk/mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
trunk/mcs/class/System/System.Diagnostics/TraceImpl.cs
trunk/mcs/class/System/System.IO/FAMWatcher.cs
trunk/mcs/class/System/System.Net.Configuration/DefaultProxyHandler.cs
trunk/mcs/class/System/System.Net.Sockets/Socket.cs
trunk/mcs/class/System/System.Net/Cookie.cs
trunk/mcs/class/System/System.Net/DigestClient.cs
trunk/mcs/class/System/System.Net/IPEndPoint.cs
trunk/mcs/class/System/System.Net/WebAsyncResult.cs
trunk/mcs/class/System/System.Net/WebConnection.cs
trunk/mcs/class/System/System.Text.RegularExpressions/interpreter.cs
trunk/mcs/class/System/System.Text.RegularExpressions/parser.cs
trunk/mcs/class/System/System/UriBuilder.cs
Log:
Fix warnings
Modified: trunk/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
===================================================================
--- trunk/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
2005-04-21 00:05:58 UTC (rev 43367)
+++ trunk/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
2005-04-21 00:47:25 UTC (rev 43368)
@@ -855,29 +855,6 @@
return "\"" + output + "\"";
}
- private void GenerateDeclaration( CodeTypeReference type,
string name, CodeExpression initExpression )
- {
- TextWriter output = Output;
-
- OutputTypeNamePair( type, GetSafeName (name) );
-
- if ( initExpression != null ) {
- output.Write( " = " );
- GenerateExpression( initExpression );
- }
-
- output.WriteLine( ';' );
- }
-
- private void GenerateMemberReferenceExpression( CodeExpression
targetObject, string memberName )
- {
- if (targetObject != null ) {
- GenerateExpression( targetObject );
- Output.Write( '.' );
- }
- Output.Write( GetSafeName (memberName) );
- }
-
protected override void GenerateParameterDeclarationExpression
(CodeParameterDeclarationExpression e)
{
if (e.CustomAttributes != null &&
e.CustomAttributes.Count > 0)
Modified: trunk/mcs/class/System/Microsoft.VisualBasic/VBCodeGenerator.cs
===================================================================
--- trunk/mcs/class/System/Microsoft.VisualBasic/VBCodeGenerator.cs
2005-04-21 00:05:58 UTC (rev 43367)
+++ trunk/mcs/class/System/Microsoft.VisualBasic/VBCodeGenerator.cs
2005-04-21 00:47:25 UTC (rev 43368)
@@ -1120,20 +1120,6 @@
return mySBuilder.ToString();
}
- private void GenerateDeclaration (CodeTypeReference type,
string name, CodeExpression initExpression)
- {
- TextWriter output = Output;
-
- OutputTypeNamePair (type, name);
-
- if (initExpression != null) {
- output.Write (" = ");
- GenerateExpression (initExpression);
- }
-
- output.WriteLine ();
- }
-
private void GenerateMemberReferenceExpression (CodeExpression
targetObject, string memberName)
{
GenerateExpression (targetObject);
Modified: trunk/mcs/class/System/System/UriBuilder.cs
===================================================================
--- trunk/mcs/class/System/System/UriBuilder.cs 2005-04-21 00:05:58 UTC (rev
43367)
+++ trunk/mcs/class/System/System/UriBuilder.cs 2005-04-21 00:47:25 UTC (rev
43368)
@@ -256,18 +256,6 @@
return builder.ToString ();
}
-
- private string EncodeUtf8 (string str)
- {
- byte [] data = Encoding.UTF8.GetBytes (str);
- int len = data.Length;
- char [] res = new char [len];
-
- for (int i=0; i<len; i++)
- res [i] = (char) data [i];
-
- return new string (res);
- }
}
}
Modified:
trunk/mcs/class/System/System.Collections.Specialized/StringEnumerator.cs
===================================================================
--- trunk/mcs/class/System/System.Collections.Specialized/StringEnumerator.cs
2005-04-21 00:05:58 UTC (rev 43367)
+++ trunk/mcs/class/System/System.Collections.Specialized/StringEnumerator.cs
2005-04-21 00:47:25 UTC (rev 43368)
@@ -28,12 +28,10 @@
namespace System.Collections.Specialized {
public class StringEnumerator {
- private StringCollection coll;
private IEnumerator enumerable;
// assembly-scoped constructor
internal StringEnumerator(StringCollection coll) {
- this.coll = coll;
this.enumerable = ((IEnumerable)coll).GetEnumerator();
}
Modified: trunk/mcs/class/System/System.ComponentModel/ListChangedEventArgs.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/ListChangedEventArgs.cs
2005-04-21 00:05:58 UTC (rev 43367)
+++ trunk/mcs/class/System/System.ComponentModel/ListChangedEventArgs.cs
2005-04-21 00:47:25 UTC (rev 43368)
@@ -36,7 +36,7 @@
ListChangedType changedType;
int oldIndex;
int newIndex;
- PropertyDescriptor propDesc; // What to do with this?
+ //PropertyDescriptor propDesc; // What to do with this?
public ListChangedEventArgs (ListChangedType listChangedType,
int newIndex)
@@ -49,7 +49,7 @@
PropertyDescriptor propDesc)
{
this.changedType = listChangedType;
- this.propDesc = propDesc;
+ //this.propDesc = propDesc;
}
public ListChangedEventArgs (ListChangedType listChangedType,
Modified:
trunk/mcs/class/System/System.ComponentModel/ReflectionPropertyDescriptor.cs
===================================================================
---
trunk/mcs/class/System/System.ComponentModel/ReflectionPropertyDescriptor.cs
2005-04-21 00:05:58 UTC (rev 43367)
+++
trunk/mcs/class/System/System.ComponentModel/ReflectionPropertyDescriptor.cs
2005-04-21 00:47:25 UTC (rev 43368)
@@ -39,20 +39,17 @@
internal class ReflectionPropertyDescriptor : PropertyDescriptor
{
PropertyInfo _member;
- Type _type;
Type _componentType;
public ReflectionPropertyDescriptor (Type componentType,
PropertyDescriptor oldPropertyDescriptor, Attribute [] attributes)
: base (oldPropertyDescriptor, attributes)
{
- _type = oldPropertyDescriptor.PropertyType;
_componentType = componentType;
}
public ReflectionPropertyDescriptor (Type componentType, string
name, Type type, Attribute [] attributes)
: base (name, attributes)
{
- _type = type;
_componentType = componentType;
}
Modified:
trunk/mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
===================================================================
---
trunk/mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
2005-04-21 00:05:58 UTC (rev 43367)
+++
trunk/mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
2005-04-21 00:47:25 UTC (rev 43368)
@@ -168,8 +168,7 @@
case "add":
name = GetAttribute
(attributes, "name", true, child);
value = GetAttribute
(attributes, "value", true, child);
- value = AsString
(value);
- ValidateIntegralValue
(name, value);
+ value = AsString
(value); ValidateIntegralValue (name, value);
newNodes [name] = value;
break;
case "remove":
@@ -192,14 +191,11 @@
d [node.Name] = newNodes;
}
- private static void ValidateIntegralValue (string name, string
value)
+ private static int ValidateIntegralValue (string name, string
value)
{
try {
- int n = int.Parse (value);
- // remove warning about unused variable.
- n = n;
- }
- catch {
+ return int.Parse (value);
+ } catch {
throw new ConfigurationException (string.Format
(
"Error in '{0}': " +
"The value of a switch
must be integral", name));
Modified: trunk/mcs/class/System/System.Diagnostics/TraceImpl.cs
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/TraceImpl.cs 2005-04-21
00:05:58 UTC (rev 43367)
+++ trunk/mcs/class/System/System.Diagnostics/TraceImpl.cs 2005-04-21
00:47:25 UTC (rev 43368)
@@ -126,8 +126,9 @@
// The DiagnosticsConfigurationHandler assumes that the
TraceImpl.Listeners
// collection exists (so it can initialize the
DefaultTraceListener and
// add/remove existing listeners).
- private static void InitOnce ()
+ private static object InitOnce ()
{
+ object d = null;
#if !NO_LOCK_FREE
// The lock-free version
if (listeners == null) {
@@ -135,10 +136,7 @@
Thread.MemoryBarrier ();
while (Interlocked.CompareExchange (ref
listeners, c, null) == null) {
// Read in the .config file and get the
ball rolling...
- System.Collections.IDictionary d =
DiagnosticsConfiguration.Settings;
-
- // remove warning about unused temporary
- d = d;
+ d = DiagnosticsConfiguration.Settings;
}
Thread.MemoryBarrier ();
}
@@ -147,15 +145,12 @@
lock (lock_) {
if (listeners == null) {
listeners = new TraceListenerCollection
();
-
// Read in the .config file and get the
ball rolling...
- System.Collections.IDictionary d =
DiagnosticsConfiguration.Settings;
-
- // remove warning about unused temporary
- d = d;
+ d = DiagnosticsConfiguration.Settings;
}
}
#endif
+ return d;
}
// FIXME: According to MSDN, this method should display a
dialog box
Modified: trunk/mcs/class/System/System.IO/FAMWatcher.cs
===================================================================
--- trunk/mcs/class/System/System.IO/FAMWatcher.cs 2005-04-21 00:05:58 UTC
(rev 43367)
+++ trunk/mcs/class/System/System.IO/FAMWatcher.cs 2005-04-21 00:47:25 UTC
(rev 43368)
@@ -39,7 +39,7 @@
namespace System.IO {
struct FAMConnection {
public int FD;
- IntPtr opaque;
+ public IntPtr opaque;
}
struct FAMRequest {
@@ -320,6 +320,11 @@
}
}
+ ~FAMWatcher ()
+ {
+ FAMClose (ref conn);
+ }
+
[DllImport ("libfam.so.0")]
extern static int FAMOpen (out FAMConnection fc);
Modified: trunk/mcs/class/System/System.Net/Cookie.cs
===================================================================
--- trunk/mcs/class/System/System.Net/Cookie.cs 2005-04-21 00:05:58 UTC (rev
43367)
+++ trunk/mcs/class/System/System.Net/Cookie.cs 2005-04-21 00:47:25 UTC (rev
43368)
@@ -58,7 +58,6 @@
int version;
static char [] reservedCharsName = new char [] {' ', '=', ';',
',', '\n', '\r', '\t'};
- static char [] reservedCharsValue = new char [] {';', ','};
static char [] portSeparators = new char [] {'"', ','};
static string tspecials = "()<>@,;:\\\"/[]?={} \t"; // from
RFC 2965, 2068
Modified: trunk/mcs/class/System/System.Net/DigestClient.cs
===================================================================
--- trunk/mcs/class/System/System.Net/DigestClient.cs 2005-04-21 00:05:58 UTC
(rev 43367)
+++ trunk/mcs/class/System/System.Net/DigestClient.cs 2005-04-21 00:47:25 UTC
(rev 43368)
@@ -61,7 +61,6 @@
int length;
int pos;
static string [] keywords = { "realm", "opaque", "nonce",
"algorithm", "qop" };
- static char [] endSeparator = new char[] { '"', ',' };
string [] values = new string [keywords.Length];
public DigestHeaderParser (string header)
@@ -130,15 +129,6 @@
pos--;
}
- void SkipNonWhitespace ()
- {
- char c = 'a';
- while (pos < length && c != ' ' && c != '\t' && c !=
'\r' && c != '\n') {
- c = header [pos++];
- }
- pos--;
- }
-
string GetKey ()
{
SkipWhitespace ();
Modified: trunk/mcs/class/System/System.Net/IPEndPoint.cs
===================================================================
--- trunk/mcs/class/System/System.Net/IPEndPoint.cs 2005-04-21 00:05:58 UTC
(rev 43367)
+++ trunk/mcs/class/System/System.Net/IPEndPoint.cs 2005-04-21 00:47:25 UTC
(rev 43368)
@@ -116,10 +116,12 @@
port = (((int)sockaddr[2])<<8) +
(int)sockaddr[3];
/// maybe flowid ?
+ /*
int unknown = (int)sockaddr[4] +
(((int)sockaddr[5])<<8) +
(((int)sockaddr[6])<<16) +
(((int)sockaddr[7])<<24);
+ */
int scopeId = (int)sockaddr[24] +
(((int)sockaddr[25])<<8) +
Modified: trunk/mcs/class/System/System.Net/WebAsyncResult.cs
===================================================================
--- trunk/mcs/class/System/System.Net/WebAsyncResult.cs 2005-04-21 00:05:58 UTC
(rev 43367)
+++ trunk/mcs/class/System/System.Net/WebAsyncResult.cs 2005-04-21 00:47:25 UTC
(rev 43368)
@@ -44,7 +44,6 @@
IAsyncResult innerAsyncResult;
bool callbackDone;
Exception exc;
- HttpWebRequest request;
HttpWebResponse response;
Stream writeStream;
byte [] buffer;
@@ -61,7 +60,6 @@
public WebAsyncResult (HttpWebRequest request, AsyncCallback
cb, object state)
{
- this.request = request;
this.cb = cb;
this.state = state;
}
@@ -90,7 +88,6 @@
{
callbackDone = false;
exc = null;
- request = null;
response = null;
writeStream = null;
exc = null;
Modified: trunk/mcs/class/System/System.Net/WebConnection.cs
===================================================================
--- trunk/mcs/class/System/System.Net/WebConnection.cs 2005-04-21 00:05:58 UTC
(rev 43367)
+++ trunk/mcs/class/System/System.Net/WebConnection.cs 2005-04-21 00:47:25 UTC
(rev 43368)
@@ -53,7 +53,6 @@
Socket socket;
object socketLock = new object ();
WebExceptionStatus status;
- WebConnectionGroup group;
bool busy;
WaitOrTimerCallback initConn;
bool keepAlive;
@@ -79,7 +78,6 @@
public WebConnection (WebConnectionGroup group, ServicePoint
sPoint)
{
- this.group = group;
this.sPoint = sPoint;
buffer = new byte [4096];
readState = ReadState.None;
Modified: trunk/mcs/class/System/System.Net.Configuration/DefaultProxyHandler.cs
===================================================================
--- trunk/mcs/class/System/System.Net.Configuration/DefaultProxyHandler.cs
2005-04-21 00:05:58 UTC (rev 43367)
+++ trunk/mcs/class/System/System.Net.Configuration/DefaultProxyHandler.cs
2005-04-21 00:47:25 UTC (rev 43368)
@@ -57,7 +57,8 @@
string name = child.Name;
if (name == "proxy") {
- string deflt =
HandlersUtil.ExtractAttributeValue ("usesystemdefault", child, true);
+ // ignored
+ HandlersUtil.ExtractAttributeValue
("usesystemdefault", child, true);
string bypass =
HandlersUtil.ExtractAttributeValue ("bypassonlocal", child, true);
string address =
HandlersUtil.ExtractAttributeValue ("proxyaddress", child, true);
if (child.Attributes != null &&
child.Attributes.Count != 0) {
Modified: trunk/mcs/class/System/System.Net.Sockets/Socket.cs
===================================================================
--- trunk/mcs/class/System/System.Net.Sockets/Socket.cs 2005-04-21 00:05:58 UTC
(rev 43367)
+++ trunk/mcs/class/System/System.Net.Sockets/Socket.cs 2005-04-21 00:47:25 UTC
(rev 43368)
@@ -58,7 +58,7 @@
{
/* Same structure in the runtime */
public Socket Sock;
- IntPtr handle;
+ public IntPtr handle;
object state;
AsyncCallback callback;
WaitHandle waithandle;
@@ -77,10 +77,10 @@
bool completed_sync;
bool completed;
- bool blocking;
+ public bool blocking;
internal int error;
SocketOperation operation;
- object ares;
+ public object ares;
public SocketAsyncResult (Socket sock, object state,
AsyncCallback callback, SocketOperation operation)
{
@@ -1204,7 +1204,6 @@
public void GetSocketOption(SocketOptionLevel level,
SocketOptionName name,
byte[] opt_value) {
- int opt_value_len=opt_value.Length;
int error;
GetSocketOption_arr_internal(socket, level, name,
Modified: trunk/mcs/class/System/System.Text.RegularExpressions/interpreter.cs
===================================================================
--- trunk/mcs/class/System/System.Text.RegularExpressions/interpreter.cs
2005-04-21 00:05:58 UTC (rev 43367)
+++ trunk/mcs/class/System/System.Text.RegularExpressions/interpreter.cs
2005-04-21 00:47:25 UTC (rev 43368)
@@ -45,7 +45,7 @@
this.group_count = program[1] + 1;
this.match_min = program[2];
- this.match_max = program[3];
+ //this.match_max = program[3];
// setup
@@ -953,7 +953,7 @@
private string text; // input text
private int text_end; // end of input text
(last character + 1)
private int group_count; // number of capturing
groups
- private int match_min, match_max; // match width
information
+ private int match_min;//, match_max; // match width
information
private QuickSearch qs; // fast substring
matcher
// match state
Modified: trunk/mcs/class/System/System.Text.RegularExpressions/parser.cs
===================================================================
--- trunk/mcs/class/System/System.Text.RegularExpressions/parser.cs
2005-04-21 00:05:58 UTC (rev 43367)
+++ trunk/mcs/class/System/System.Text.RegularExpressions/parser.cs
2005-04-21 00:47:25 UTC (rev 43368)
@@ -1004,10 +1004,6 @@
return Parser.ParseNumber (pattern, ref ptr, b, min,
max);
}
- private int ParseDecimal () {
- return Parser.ParseDecimal (pattern, ref ptr);
- }
-
private static int ParseDigit (char c, int b, int n) {
switch (b) {
case 8:
@@ -1159,10 +1155,6 @@
return (options & RegexOptions.IgnorePatternWhitespace)
!= 0;
}
- private static bool IsRightToLeft (RegexOptions options) {
- return (options & RegexOptions.RightToLeft) != 0;
- }
-
private static bool IsECMAScript (RegexOptions options) {
return (options & RegexOptions.ECMAScript) != 0;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches