Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2013-02-25 22:09:44 +0400
committerMarek Safar <marek.safar@gmail.com>2013-02-25 22:10:09 +0400
commit5aeeb9cf7b558b8a92a7eb7d6a524cc4e7b60191 (patch)
treeb668b54c45667e2a692af4ed42c4debcbfd044eb
parent0647a5d16bb6b00cf8457e5e077c4ff82b0d4ef4 (diff)
Fix few warningsmono-3.0.5
-rw-r--r--mcs/class/System/System.Diagnostics/Process.cs4
-rw-r--r--mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs2
-rw-r--r--mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs4
-rw-r--r--mcs/class/System/System.Net/FtpWebRequest.cs2
-rw-r--r--mcs/class/System/System.Net/HttpWebRequest.cs3
-rw-r--r--mcs/class/System/System.Net/ServicePointManager.cs7
-rw-r--r--mcs/class/System/System.Net/WebRequest.cs22
-rw-r--r--mcs/class/System/System/UriTypeConverter.cs12
8 files changed, 38 insertions, 18 deletions
diff --git a/mcs/class/System/System.Diagnostics/Process.cs b/mcs/class/System/System.Diagnostics/Process.cs
index 29f0e1a6871..89a3a2f91d4 100644
--- a/mcs/class/System/System.Diagnostics/Process.cs
+++ b/mcs/class/System/System.Diagnostics/Process.cs
@@ -75,7 +75,9 @@ namespace System.Diagnostics {
IntPtr process_handle;
int pid;
bool enableRaisingEvents;
+#if !NET_2_1
bool already_waiting;
+#endif
ISynchronizeInvoke synchronizingObject;
EventHandler exited_event;
IntPtr stdout_rd;
@@ -1606,7 +1608,9 @@ namespace System.Diagnostics {
static void CBOnExit (object state, bool unused)
{
Process p = (Process) state;
+#if !NET_2_1
p.already_waiting = false;
+#endif
p.OnExited ();
}
diff --git a/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs b/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs
index 7a29e8f83e3..f9183a51ef7 100644
--- a/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs
+++ b/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs
@@ -58,6 +58,7 @@ namespace System.Diagnostics
InnerList.AddRange (processModules);
}
+#if !NET_2_1
public ProcessModule this[int index] {
get {
return (ProcessModule)InnerList[index];
@@ -78,5 +79,6 @@ namespace System.Diagnostics
{
return InnerList.IndexOf (module);
}
+#endif
}
}
diff --git a/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs b/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs
index 6f950e7f9e0..19cd965cd20 100644
--- a/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs
+++ b/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs
@@ -68,7 +68,8 @@ namespace System.Diagnostics
{
InnerList.AddRange (processThreads);
}
-
+
+#if !NET_2_1
public ProcessThread this[int index] {
get {
return (ProcessThread)InnerList[index];
@@ -104,5 +105,6 @@ namespace System.Diagnostics
{
InnerList.Remove (thread);
}
+#endif
}
}
diff --git a/mcs/class/System/System.Net/FtpWebRequest.cs b/mcs/class/System/System.Net/FtpWebRequest.cs
index 2f328ffdae0..edb0441b723 100644
--- a/mcs/class/System/System.Net/FtpWebRequest.cs
+++ b/mcs/class/System/System.Net/FtpWebRequest.cs
@@ -173,6 +173,7 @@ namespace System.Net
}
}
+#if !NET_2_1
[MonoTODO]
public static new RequestCachePolicy DefaultCachePolicy
{
@@ -183,6 +184,7 @@ namespace System.Net
throw GetMustImplement ();
}
}
+#endif
public bool EnableSsl {
get {
diff --git a/mcs/class/System/System.Net/HttpWebRequest.cs b/mcs/class/System/System.Net/HttpWebRequest.cs
index 5f54ecfbb26..26cff2d070f 100644
--- a/mcs/class/System/System.Net/HttpWebRequest.cs
+++ b/mcs/class/System/System.Net/HttpWebRequest.cs
@@ -312,6 +312,8 @@ namespace System.Net
}
}
#endif
+
+#if !NET_2_1
[MonoTODO]
public static new RequestCachePolicy DefaultCachePolicy
{
@@ -322,6 +324,7 @@ namespace System.Net
throw GetMustImplement ();
}
}
+#endif
[MonoTODO]
public static int DefaultMaximumErrorResponseLength
diff --git a/mcs/class/System/System.Net/ServicePointManager.cs b/mcs/class/System/System.Net/ServicePointManager.cs
index 868781651e0..f91c8503f5b 100644
--- a/mcs/class/System/System.Net/ServicePointManager.cs
+++ b/mcs/class/System/System.Net/ServicePointManager.cs
@@ -333,11 +333,12 @@ namespace System.Net
if (maxServicePoints > 0 && servicePoints.Count >= maxServicePoints)
throw new InvalidOperationException ("maximum number of service points reached");
- string addr = address.ToString ();
+ int limit;
#if NET_2_1
- int limit = defaultConnectionLimit;
+ limit = defaultConnectionLimit;
#else
- int limit = (int) manager.GetMaxConnections (addr);
+ string addr = address.ToString ();
+ limit = (int) manager.GetMaxConnections (addr);
#endif
sp = new ServicePoint (address, limit, maxServicePointIdleTime);
sp.Expect100Continue = expectContinue;
diff --git a/mcs/class/System/System.Net/WebRequest.cs b/mcs/class/System/System.Net/WebRequest.cs
index cd9052cdf76..fcdaeccfea0 100644
--- a/mcs/class/System/System.Net/WebRequest.cs
+++ b/mcs/class/System/System.Net/WebRequest.cs
@@ -58,8 +58,10 @@ namespace System.Net
static HybridDictionary prefixes = new HybridDictionary ();
static bool isDefaultWebProxySet;
static IWebProxy defaultWebProxy;
+
+#if !NET_2_1
static RequestCachePolicy defaultCachePolicy;
-
+#endif
// Constructors
static WebRequest ()
@@ -114,14 +116,6 @@ namespace System.Net
authentication_level = value;
}
}
-
- [MonoTODO ("Implement the caching system. Currently always returns a policy with the NoCacheNoStore level")]
- public virtual RequestCachePolicy CachePolicy
- {
- get { return DefaultCachePolicy; }
- set {
- }
- }
public virtual string ConnectionGroupName {
get { throw GetMustImplement (); }
@@ -143,6 +137,15 @@ namespace System.Net
set { throw GetMustImplement (); }
}
+#if !NET_2_1
+ [MonoTODO ("Implement the caching system. Currently always returns a policy with the NoCacheNoStore level")]
+ public virtual RequestCachePolicy CachePolicy
+ {
+ get { return DefaultCachePolicy; }
+ set {
+ }
+ }
+
public static RequestCachePolicy DefaultCachePolicy
{
get { return defaultCachePolicy; }
@@ -150,6 +153,7 @@ namespace System.Net
throw GetMustImplement ();
}
}
+#endif
public virtual WebHeaderCollection Headers {
get { throw GetMustImplement (); }
diff --git a/mcs/class/System/System/UriTypeConverter.cs b/mcs/class/System/System/UriTypeConverter.cs
index 13ef739b1cc..2d7f9cf1415 100644
--- a/mcs/class/System/System/UriTypeConverter.cs
+++ b/mcs/class/System/System/UriTypeConverter.cs
@@ -89,12 +89,14 @@ namespace System {
return value;
string s = (value as string);
- if (s != null)
+ if (s != null) {
#if NET_2_1
if (s == "")
return null;
#endif
return new Uri (s, UriKind.RelativeOrAbsolute);
+ }
+
#if !NET_2_1
InstanceDescriptor id = (value as InstanceDescriptor);
if (id != null) {
@@ -123,13 +125,13 @@ namespace System {
#else
throw new NotSupportedException (Locale.GetText ("Cannot convert to destination type."));
#endif
- } else {
-#if NET_2_1
- throw new NotSupportedException (Locale.GetText ("Cannot convert to destination type."));
-#endif
}
+#if NET_2_1
+ throw new NotSupportedException (Locale.GetText ("Cannot convert to destination type."));
+#else
return base.ConvertTo (context, culture, value, destinationType);
+#endif
}
#if !NET_2_1