[System] Warnings cleanup
authorMarek Safar <marek.safar@gmail.com>
Tue, 3 Jan 2017 16:05:26 +0000 (17:05 +0100)
committerMarek Safar <marek.safar@gmail.com>
Tue, 3 Jan 2017 16:05:26 +0000 (17:05 +0100)
mcs/class/System/System.Net.NetworkInformation/Ping.cs
mcs/class/System/System/Platform.cs
mcs/class/referencesource/System/net/System/Net/webproxy.cs

index c69388a58076e36d35a638b0dd911fcf785f9a46..1d2786002e102552f4c112c91ef8522c71a8a490 100644 (file)
@@ -71,6 +71,7 @@ namespace System.Net.NetworkInformation {
 #endif
                };
                static readonly string PingBinPath;
+               static bool canSendPrivileged;
 #endif
                const int default_timeout = 4000; // 4 sec.
                ushort identifier;
@@ -80,7 +81,6 @@ namespace System.Net.NetworkInformation {
                const UInt32 linux_cap_version = 0x20071026;
                
                static readonly byte [] default_buffer = new byte [0];
-               static bool canSendPrivileged;
                
 
                BackgroundWorker worker;
index b687c590f580272959a8304c787d3149524a6838..8afd40370cd599aeae22ae1b8ad0b908f5fdc81f 100644 (file)
@@ -30,14 +30,17 @@ namespace System {
        internal static class Platform {
                static bool checkedOS;
                static bool isMacOS;
-               static bool isFreeBSD;
 
 #if MONOTOUCH || XAMMAC
+               const bool isFreeBSD = false;
+
                private static void CheckOS() {
                        isMacOS = true;
                        checkedOS = true;
                }
 #else
+               static bool isFreeBSD;
+
                [DllImport ("libc")]
                static extern int uname (IntPtr buf);
 
index 15840cd7022b9729306b19eac0cf0382fbe0f29a..e433783951ce1010fe29fac842ba4bb704bda86e 100644 (file)
@@ -513,15 +513,17 @@ namespace System.Net {
             var data = AndroidPlatform.GetDefaultProxy ();
             if (data != null)
                 return data;
+
+            return new WebProxy (true);
 #else
             if (Platform.IsMacOS) {
                 var data = Mono.Net.CFNetwork.GetDefaultProxy ();
                 if (data != null)
                     return data;
             }
-#endif
 
             return new WebProxy (true);
+#endif
         }
 #endif