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
path: root/mcs
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2008-08-27 19:40:13 +0400
committerMarek Safar <marek.safar@gmail.com>2008-08-27 19:40:13 +0400
commitcc9c53a10981325624b1e6037f2c626822fc0a6b (patch)
treeb23288265f0cfd63282c27867bb4de321d88654e /mcs
parentde48871ba98a0e410eca2f72f0855ba2482b7452 (diff)
Warnings cleanup
svn path=/trunk/mcs/; revision=111713
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/corlib/Makefile6
-rw-r--r--mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs8
-rw-r--r--mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs16
-rw-r--r--mcs/class/corlib/Mono.Globalization.Unicode/SortKeyBuffer.cs6
-rw-r--r--mcs/class/corlib/Mono.Security.Cryptography/DSAManaged.cs8
-rw-r--r--mcs/class/corlib/System.Collections/ArrayList.cs4
-rw-r--r--mcs/class/corlib/System.Collections/BitArray.cs6
-rw-r--r--mcs/class/corlib/System.Globalization/CalendricalCalculations.cs3
-rw-r--r--mcs/class/corlib/System.Globalization/CodePageDataItem.cs6
-rw-r--r--mcs/class/corlib/System.Globalization/CompareInfo.cs9
-rw-r--r--mcs/class/corlib/System.Globalization/CultureInfo.cs6
-rw-r--r--mcs/class/corlib/System.Globalization/DateTimeFormatInfo.cs4
-rw-r--r--mcs/class/corlib/System.Globalization/NumberFormatInfo.cs7
-rw-r--r--mcs/class/corlib/System.Globalization/RegionInfo.cs8
-rw-r--r--mcs/class/corlib/System.Globalization/TextInfo.cs3
-rw-r--r--mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs4
-rw-r--r--mcs/class/corlib/System.IO/BinaryReader.cs1
-rw-r--r--mcs/class/corlib/System.IO/File.cs2
-rw-r--r--mcs/class/corlib/System.IO/FileLoadException.cs3
-rw-r--r--mcs/class/corlib/System.IO/StreamWriter.cs2
-rw-r--r--mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs24
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs3
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs3
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs8
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/EventBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/FieldBuilder.cs3
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs1
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs4
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.cs3
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/PropertyBuilder.cs3
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs9
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/UnmanagedMarshal.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/Assembly.cs5
-rw-r--r--mcs/class/corlib/System.Reflection/AssemblyName.cs4
-rw-r--r--mcs/class/corlib/System.Reflection/MonoEvent.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/Pointer.cs3
-rw-r--r--mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs2
-rw-r--r--mcs/class/corlib/System.Resources/MissingManifestResourceException.cs2
-rw-r--r--mcs/class/corlib/System.Resources/ResourceReader.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting.Channels/CrossAppDomainChannel.cs4
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting.Contexts/Context.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting.Messaging/AsyncResult.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs5
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs4
-rw-r--r--mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs4
-rw-r--r--mcs/class/corlib/System.Runtime.Serialization.Formatters/ServerFault.cs1
-rw-r--r--mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Versioning/ResourceExposureAttribute.cs1
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/CryptoKeySecurity.cs4
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs6
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/GenericSecurityDescriptor.cs14
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs6
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/RC2CryptoServiceProvider.cs2
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeDeformatter.cs3
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeDeformatter.cs3
-rw-r--r--mcs/class/corlib/System.Security.Permissions/EnvironmentPermission.cs2
-rw-r--r--mcs/class/corlib/System.Security.Permissions/FileIOPermissionAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Security.Permissions/RegistryPermission.cs4
-rw-r--r--mcs/class/corlib/System.Security.Permissions/RegistryPermissionAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Security.Policy/CodeGroup.cs4
-rw-r--r--mcs/class/corlib/System.Security.Policy/DefaultPolicies.cs2
-rw-r--r--mcs/class/corlib/System.Security.Policy/Evidence.cs8
-rw-r--r--mcs/class/corlib/System.Security/PermissionSet.cs1
-rw-r--r--mcs/class/corlib/System.Security/SecureString.cs14
-rw-r--r--mcs/class/corlib/System.Security/SecurityException.cs18
-rw-r--r--mcs/class/corlib/System.Security/SecurityManager.cs15
-rw-r--r--mcs/class/corlib/System.Text/Encoding.cs29
-rw-r--r--mcs/class/corlib/System.Text/UTF8Encoding.cs13
-rw-r--r--mcs/class/corlib/System.Threading/Thread.cs20
-rw-r--r--mcs/class/corlib/System/AppDomain.cs9
-rw-r--r--mcs/class/corlib/System/ArgIterator.cs2
-rw-r--r--mcs/class/corlib/System/Array.cs13
-rw-r--r--mcs/class/corlib/System/Console.cs8
-rw-r--r--mcs/class/corlib/System/Decimal.cs14
-rw-r--r--mcs/class/corlib/System/Delegate.cs7
-rw-r--r--mcs/class/corlib/System/Environment.cs5
-rw-r--r--mcs/class/corlib/System/Exception.cs2
-rw-r--r--mcs/class/corlib/System/MonoAsyncCall.cs5
-rw-r--r--mcs/class/corlib/System/MonoListItem.cs5
-rw-r--r--mcs/class/corlib/System/Nullable.cs3
-rw-r--r--mcs/class/corlib/System/NumberFormatter.cs5
-rw-r--r--mcs/class/corlib/System/Object.cs2
-rw-r--r--mcs/class/corlib/System/String.cs27
-rw-r--r--mcs/class/corlib/System/TermInfoDriver.cs6
-rw-r--r--mcs/class/corlib/System/TermInfoReader.cs12
-rw-r--r--mcs/class/corlib/System/TypedReference.cs2
-rw-r--r--mcs/class/corlib/System/WindowsConsoleDriver.cs3
-rw-r--r--mcs/class/corlib/System/__ComObject.cs2
89 files changed, 311 insertions, 217 deletions
diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile
index f2bccc23740..18265aa0d59 100644
--- a/mcs/class/corlib/Makefile
+++ b/mcs/class/corlib/Makefile
@@ -21,11 +21,7 @@ RESOURCE_FILES = \
resources/collation.cjkKOlv2.bin
corlib_flags = -unsafe -nostdlib
-LOCAL_MCS_FLAGS = -nowarn:169,612,618,649 -d:INSIDE_CORLIB
-
-ifneq ($(FRAMEWORK_VERSION),1.0)
-LOCAL_MCS_FLAGS += -nowarn:414
-endif
+LOCAL_MCS_FLAGS = -nowarn:612,618,649 -d:INSIDE_CORLIB
# System.IO/DirectoryInfoTest.cs needs Mono.Posix
TEST_MCS_FLAGS = -debug+ -debug:full -nowarn:168,219,618,672 -unsafe -r:$(topdir)/class/lib/$(PROFILE)/Mono.Posix.dll
diff --git a/mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs b/mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs
index c32ac30c801..2283ce83e69 100644
--- a/mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs
+++ b/mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs
@@ -91,10 +91,10 @@ namespace Microsoft.Win32
ref int nameLength, IntPtr reserved,
ref RegistryValueKind type, IntPtr data, IntPtr dataLength);
- [DllImport ("advapi32.dll", CharSet=CharSet.Unicode, EntryPoint="RegSetValueEx")]
- private static extern int RegSetValueEx (IntPtr keyBase,
- string valueName, IntPtr reserved, RegistryValueKind type,
- StringBuilder data, int rawDataLength);
+// [DllImport ("advapi32.dll", CharSet=CharSet.Unicode, EntryPoint="RegSetValueEx")]
+// private static extern int RegSetValueEx (IntPtr keyBase,
+// string valueName, IntPtr reserved, RegistryValueKind type,
+// StringBuilder data, int rawDataLength);
[DllImport ("advapi32.dll", CharSet=CharSet.Unicode, EntryPoint="RegSetValueEx")]
private static extern int RegSetValueEx (IntPtr keyBase,
diff --git a/mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs b/mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs
index d2ca5c53360..f39ec295146 100644
--- a/mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs
+++ b/mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs
@@ -78,9 +78,11 @@ namespace Mono.Globalization.Unicode
internal class SimpleCollator
{
// this environment variable is for debugging quick check.
+#pragma warning disable 169, 414
static bool QuickCheckDisabled =
Environment.internalGetEnvironmentVariable (
"MONO_COLLATION_QUICK_CHECK_DISABLED") == "yes";
+#pragma warning restore 169, 414
unsafe internal struct Context
{
@@ -741,6 +743,7 @@ Console.WriteLine (" -> '{0}'", c.Replacement);
len1 == min ? - 1 : 1;
}
+#if NET_2_0
private int CompareOrdinalIgnoreCase (string s1, int idx1, int len1,
string s2, int idx2, int len2)
{
@@ -757,6 +760,7 @@ Console.WriteLine (" -> '{0}'", c.Replacement);
return len1 == len2 ? 0 :
len1 == min ? - 1 : 1;
}
+#endif
public unsafe int Compare (string s1, int idx1, int len1,
string s2, int idx2, int len2, CompareOptions options)
@@ -1324,7 +1328,7 @@ Console.WriteLine (" -> '{0}'", c.Replacement);
return IsSuffix (opt, s, target, start, length, ref prev, sk1, sk2);
*/
}
-
+/*
unsafe bool IsSuffix (string s, string t, int start, int length, ref Context ctx)
{
int tstart = 0;
@@ -1405,7 +1409,7 @@ Console.WriteLine ("==== {0} {1} {2} {3} {4} {5} {6} {7} {8}", s, si, send, leng
return false;
#endif
}
-
+*/
#endregion
#region IndexOf() / LastIndexOf()
@@ -1516,6 +1520,7 @@ Console.WriteLine ("==== {0} {1} {2} {3} {4} {5} {6} {7} {8}", s, si, send, leng
return -1;
}
+#if NET_2_0
int IndexOfOrdinalIgnoreCase (string s, string target, int start, int length)
{
if (target.Length == 0)
@@ -1539,6 +1544,7 @@ Console.WriteLine ("==== {0} {1} {2} {3} {4} {5} {6} {7} {8}", s, si, send, leng
}
return -1;
}
+#endif
// char
@@ -1603,6 +1609,7 @@ Console.WriteLine ("==== {0} {1} {2} {3} {4} {5} {6} {7} {8}", s, si, send, leng
return -1;
}
+#if NET_2_0
int IndexOfOrdinalIgnoreCase (string s, char target, int start, int length)
{
int end = start + length;
@@ -1612,6 +1619,7 @@ Console.WriteLine ("==== {0} {1} {2} {3} {4} {5} {6} {7} {8}", s, si, send, leng
return i;
return -1;
}
+#endif
// Searches target byte[] keydata
unsafe int IndexOfSortKey (string s, int start, int length, byte* sortkey, char target, int ti, bool noLv4, ref Context ctx)
@@ -1756,6 +1764,7 @@ Console.WriteLine ("==== {0} {1} {2} {3} {4} {5} {6} {7} {8}", s, si, send, leng
return -1;
}
+#if NET_2_0
int LastIndexOfOrdinalIgnoreCase (string s, string target, int start, int length)
{
if (target.Length == 0)
@@ -1783,6 +1792,7 @@ Console.WriteLine ("==== {0} {1} {2} {3} {4} {5} {6} {7} {8}", s, si, send, leng
}
return -1;
}
+#endif
// char
@@ -1852,6 +1862,7 @@ Console.WriteLine ("==== {0} {1} {2} {3} {4} {5} {6} {7} {8}", s, si, send, leng
return -1;
}
+#if NET_2_0
int LastIndexOfOrdinalIgnoreCase (string s, char target, int start, int length)
{
if (s.Length == 0)
@@ -1863,6 +1874,7 @@ Console.WriteLine ("==== {0} {1} {2} {3} {4} {5} {6} {7} {8}", s, si, send, leng
return i;
return -1;
}
+#endif
// Searches target byte[] keydata
unsafe int LastIndexOfSortKey (string s, int start, int orgStart, int length, byte* sortkey, int ti, bool noLv4, ref Context ctx)
diff --git a/mcs/class/corlib/Mono.Globalization.Unicode/SortKeyBuffer.cs b/mcs/class/corlib/Mono.Globalization.Unicode/SortKeyBuffer.cs
index a4f6230c3a6..b8b9ee41b08 100644
--- a/mcs/class/corlib/Mono.Globalization.Unicode/SortKeyBuffer.cs
+++ b/mcs/class/corlib/Mono.Globalization.Unicode/SortKeyBuffer.cs
@@ -39,7 +39,7 @@ namespace Mono.Globalization.Unicode
// l4k = katakana flag, l4w = kana width sensitivity
int l1, l2, l3, l4s, l4t, l4k, l4w, l5;
byte [] l1b, l2b, l3b, l4sb, l4tb, l4kb, l4wb, l5b;
- int level5LastPos;
+// int level5LastPos;
string source;
bool processLevel2;
@@ -55,7 +55,7 @@ namespace Mono.Globalization.Unicode
public void Reset ()
{
l1 = l2 = l3 = l4s = l4t = l4k = l4w = l5 = 0;
- level5LastPos = 0;
+// level5LastPos = 0;
frenchSorted = false;
}
@@ -195,7 +195,7 @@ namespace Mono.Globalization.Unicode
AppendBufferPrimitive ((byte) ((offsetValue / 64) + 0x80), ref l5b, ref l5);
AppendBufferPrimitive ((byte) (offsetValue % 64 * 4 + 3), ref l5b, ref l5);
- level5LastPos = l2;
+// level5LastPos = l2;
// sortkey value
AppendBufferPrimitive (category, ref l5b, ref l5);
diff --git a/mcs/class/corlib/Mono.Security.Cryptography/DSAManaged.cs b/mcs/class/corlib/Mono.Security.Cryptography/DSAManaged.cs
index 6135e5050ae..752f660fdef 100644
--- a/mcs/class/corlib/Mono.Security.Cryptography/DSAManaged.cs
+++ b/mcs/class/corlib/Mono.Security.Cryptography/DSAManaged.cs
@@ -205,14 +205,6 @@ namespace Mono.Security.Cryptography {
j = (p - 1) / q;
}
- private bool Validate ()
- {
- // J is optional
- bool okJ = ((j == 0) || (j == ((p - 1) / q)));
- // TODO: Validate the key parameters (P, Q, G, J) using the Seed and Counter
- return okJ;
- }
-
private RandomNumberGenerator Random {
get {
if (rng == null)
diff --git a/mcs/class/corlib/System.Collections/ArrayList.cs b/mcs/class/corlib/System.Collections/ArrayList.cs
index e7d72319b55..2f213e1d1a0 100644
--- a/mcs/class/corlib/System.Collections/ArrayList.cs
+++ b/mcs/class/corlib/System.Collections/ArrayList.cs
@@ -2515,8 +2515,10 @@ namespace System.Collections
/// Total number of state changes.
/// </summary>
private int _version;
-
+
+#if NET_2_0
private static readonly object [] EmptyArray = new object [0];
+#endif
#endregion
diff --git a/mcs/class/corlib/System.Collections/BitArray.cs b/mcs/class/corlib/System.Collections/BitArray.cs
index 1875416f758..423ed1553df 100644
--- a/mcs/class/corlib/System.Collections/BitArray.cs
+++ b/mcs/class/corlib/System.Collections/BitArray.cs
@@ -347,7 +347,7 @@ namespace System.Collections {
class BitArrayEnumerator : IEnumerator, ICloneable {
BitArray _bitArray;
bool _current;
- int _index, _max, _version;
+ int _index, _version;
public object Clone () {
return MemberwiseClone ();
@@ -357,7 +357,6 @@ namespace System.Collections {
{
_index = -1;
_bitArray = ba;
- _max = ba.m_length;
_version = ba._version;
}
@@ -380,9 +379,8 @@ namespace System.Collections {
_current = _bitArray [++_index];
return true;
}
- else
- _index = _bitArray.Count;
+ _index = _bitArray.Count;
return false;
}
diff --git a/mcs/class/corlib/System.Globalization/CalendricalCalculations.cs b/mcs/class/corlib/System.Globalization/CalendricalCalculations.cs
index 85ebb77acfc..0181f450867 100644
--- a/mcs/class/corlib/System.Globalization/CalendricalCalculations.cs
+++ b/mcs/class/corlib/System.Globalization/CalendricalCalculations.cs
@@ -1929,9 +1929,6 @@ internal class CCEastAsianLunisolarCalendar
throw new Exception ("GetMonth");
}
- static readonly int [] leap_month_calc = new int [] {
- 0, 2, 0, 2, 2, 4, 5, 6, 7, 8, 9, 10};
-
public static bool IsLeapMonth (int gyear, int month)
{
int goldenNumber = gyear % 19;
diff --git a/mcs/class/corlib/System.Globalization/CodePageDataItem.cs b/mcs/class/corlib/System.Globalization/CodePageDataItem.cs
index 2fb0aac0c1f..68c194d3a30 100644
--- a/mcs/class/corlib/System.Globalization/CodePageDataItem.cs
+++ b/mcs/class/corlib/System.Globalization/CodePageDataItem.cs
@@ -40,7 +40,8 @@ namespace System.Globalization
{
[Serializable]
internal sealed class CodePageDataItem
- {
+ {
+#pragma warning disable 169
private string m_bodyName;
private int m_codePage;
private int m_dataIndex;
@@ -52,6 +53,7 @@ namespace System.Globalization
private CodePageDataItem ()
{
- }
+ }
+#pragma warning disable 169
}
}
diff --git a/mcs/class/corlib/System.Globalization/CompareInfo.cs b/mcs/class/corlib/System.Globalization/CompareInfo.cs
index 7292da8d170..6d2e2463d83 100644
--- a/mcs/class/corlib/System.Globalization/CompareInfo.cs
+++ b/mcs/class/corlib/System.Globalization/CompareInfo.cs
@@ -58,12 +58,15 @@ namespace System.Globalization
private int culture;
[NonSerialized]
private string icu_name;
- [NonSerialized]
- private IntPtr ICU_collator;
+// [NonSerialized]
+// private IntPtr ICU_collator;
+
+#pragma warning disable 169
private int win32LCID; // Unused, but MS.NET serializes this
#if NET_2_0
private string m_name; // Unused, but MS.NET serializes this
#endif
+#pragma warning restore 169
[NonSerialized]
SimpleCollator collator;
@@ -865,7 +868,7 @@ namespace System.Globalization
try {
this.construct_compareinfo (icu_name);
} catch {
- ICU_collator=IntPtr.Zero;
+ // ICU_collator=IntPtr.Zero;
}
}
}
diff --git a/mcs/class/corlib/System.Globalization/CultureInfo.cs b/mcs/class/corlib/System.Globalization/CultureInfo.cs
index 4d1befbb861..95ec7e73092 100644
--- a/mcs/class/corlib/System.Globalization/CultureInfo.cs
+++ b/mcs/class/corlib/System.Globalization/CultureInfo.cs
@@ -44,13 +44,16 @@ namespace System.Globalization
public class CultureInfo : ICloneable, IFormatProvider
{
static volatile CultureInfo invariant_culture_info;
+#if NET_2_0
static object shared_table_lock = new object ();
+#endif
internal static int BootstrapCultureID;
const int NumOptionalCalendars = 5;
const int GregorianTypeMask = 0x00FFFFFF;
const int CalendarTypeBits = 24;
+#pragma warning disable 169
bool m_isReadOnly;
int cultureID;
[NonSerialized]
@@ -93,9 +96,10 @@ namespace System.Globalization
private Calendar [] optional_calendars;
[NonSerialized]
CultureInfo parent_culture;
-
+
int m_dataItem; // MS.NET serializes this.
Calendar calendar; // MS.NET serializes this.
+#pragma warning restore 169
// Deserialized instances will set this to false
[NonSerialized]
diff --git a/mcs/class/corlib/System.Globalization/DateTimeFormatInfo.cs b/mcs/class/corlib/System.Globalization/DateTimeFormatInfo.cs
index 50247c5d6ac..4871c77a75b 100644
--- a/mcs/class/corlib/System.Globalization/DateTimeFormatInfo.cs
+++ b/mcs/class/corlib/System.Globalization/DateTimeFormatInfo.cs
@@ -64,7 +64,7 @@ namespace System.Globalization
= new string[13] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ""};
private static readonly string[] INVARIANT_MONTH_NAMES
= new string[13] { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ""};
- private static readonly string[] INVARIANT_ERA_NAMES = {"A.D."};
+// private static readonly string[] INVARIANT_ERA_NAMES = {"A.D."};
#if NET_2_0
static readonly string [] INVARIANT_SHORT_DAY_NAMES =
new string [7] {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"};
@@ -73,6 +73,7 @@ namespace System.Globalization
private const string _RoundtripPattern = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK";
+#pragma warning disable 169
#region Sync with object-internals.h
private bool m_isReadOnly;
private string amDesignator;
@@ -128,6 +129,7 @@ namespace System.Globalization
private DateTimeFormatFlags formatFlags;
private string m_name; // Unused, but MS.NET serializes this
#endif
+#pragma warning restore 169
internal DateTimeFormatInfo(bool read_only)
{
diff --git a/mcs/class/corlib/System.Globalization/NumberFormatInfo.cs b/mcs/class/corlib/System.Globalization/NumberFormatInfo.cs
index 04f8b9858b3..e7d6354666d 100644
--- a/mcs/class/corlib/System.Globalization/NumberFormatInfo.cs
+++ b/mcs/class/corlib/System.Globalization/NumberFormatInfo.cs
@@ -95,16 +95,19 @@ namespace System.Globalization {
private string positiveInfinitySymbol;
private string positiveSign;
+#pragma warning disable 169
string ansiCurrencySymbol; // TODO, MS.NET serializes this.
int m_dataItem; // Unused, but MS.NET serializes this.
bool m_useUserOverride; // Unused, but MS.NET serializes this.
bool validForParseAsNumber; // Unused, but MS.NET serializes this.
bool validForParseAsCurrency; // Unused, but MS.NET serializes this.
+#pragma warning restore 169
+
#if NET_2_0
string[] nativeDigits = invariantNativeDigits;
int digitSubstitution = 1; // DigitShapes.None.
- static string [] invariantNativeDigits = new string [] {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
+ static readonly string [] invariantNativeDigits = new string [] {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
#endif
internal NumberFormatInfo (int lcid, bool read_only)
@@ -167,6 +170,7 @@ namespace System.Globalization {
}
// this is called by mono/mono/metadata/locales.c
+#pragma warning disable 169
void InitPatterns ()
{
string [] partOne, partTwo;
@@ -335,6 +339,7 @@ namespace System.Globalization {
}
}
+#pragma warning restore 169
// =========== Currency Format Properties =========== //
diff --git a/mcs/class/corlib/System.Globalization/RegionInfo.cs b/mcs/class/corlib/System.Globalization/RegionInfo.cs
index e8cfc40fb9b..eaaa605fcb3 100644
--- a/mcs/class/corlib/System.Globalization/RegionInfo.cs
+++ b/mcs/class/corlib/System.Globalization/RegionInfo.cs
@@ -56,7 +56,10 @@ namespace System.Globalization
}
}
+#if NET_2_0
int lcid; // it is used only for Equals() (not even used in GetHashCode()).
+ string currencyEnglishName;
+#endif
int regionId;
string iso2Name;
string iso3Name;
@@ -64,7 +67,6 @@ namespace System.Globalization
string englishName;
string currencySymbol;
string isoCurrencySymbol;
- string currencyEnglishName;
public RegionInfo (int culture)
{
@@ -99,6 +101,7 @@ namespace System.Globalization
#endif
}
+#if NET_2_0
bool GetByTerritory (CultureInfo ci)
{
if (ci == null)
@@ -108,9 +111,12 @@ namespace System.Globalization
this.lcid = ci.LCID;
return construct_internal_region_from_name (ci.Territory.ToUpperInvariant ());
}
+#endif
+#if !NET_2_0
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern bool construct_internal_region_from_lcid (int lcid);
+#endif
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern bool construct_internal_region_from_name (string name);
diff --git a/mcs/class/corlib/System.Globalization/TextInfo.cs b/mcs/class/corlib/System.Globalization/TextInfo.cs
index 74c05d4dc68..4d397375f9f 100644
--- a/mcs/class/corlib/System.Globalization/TextInfo.cs
+++ b/mcs/class/corlib/System.Globalization/TextInfo.cs
@@ -66,9 +66,12 @@ namespace System.Globalization {
bool m_isReadOnly;
string customCultureName;
#endif
+#pragma warning disable 169
[NonSerialized]
int m_nDataItem;
bool m_useUserOverride;
+#pragma warning restore 169
+
int m_win32LangID;
[NonSerialized]
diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
index a84c3517304..426f7c472bc 100644
--- a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
@@ -634,7 +634,7 @@ namespace System.IO.IsolatedStorage {
Domain = domain;
}
}
-
+/*
[SecurityPermission (SecurityAction.Assert, SerializationFormatter = true)]
private void LoadIdentities (string root)
{
@@ -651,7 +651,7 @@ namespace System.IO.IsolatedStorage {
_domainIdentity = identities.Domain;
}
}
-
+*/
[SecurityPermission (SecurityAction.Assert, SerializationFormatter = true)]
private void SaveIdentities (string root)
{
diff --git a/mcs/class/corlib/System.IO/BinaryReader.cs b/mcs/class/corlib/System.IO/BinaryReader.cs
index c8d3dcf3c7c..1530a91172b 100644
--- a/mcs/class/corlib/System.IO/BinaryReader.cs
+++ b/mcs/class/corlib/System.IO/BinaryReader.cs
@@ -44,7 +44,6 @@ namespace System.IO {
public class BinaryReader : IDisposable {
Stream m_stream;
Encoding m_encoding;
- int m_encoding_max_byte;
byte[] m_buffer;
diff --git a/mcs/class/corlib/System.IO/File.cs b/mcs/class/corlib/System.IO/File.cs
index 77cdcba15a5..2e7ca744342 100644
--- a/mcs/class/corlib/System.IO/File.cs
+++ b/mcs/class/corlib/System.IO/File.cs
@@ -519,11 +519,13 @@ namespace System.IO
throw new ArgumentException (Locale.GetText ("Path contains invalid chars"));
}
+#if !NET_2_0
private static IOException CreatePartOfPathNotFoundException (string path)
{
string msg = Locale.GetText ("Part of the path \"{0}\" could not be found.", path);
return new IOException (msg);
}
+#endif
#endregion
diff --git a/mcs/class/corlib/System.IO/FileLoadException.cs b/mcs/class/corlib/System.IO/FileLoadException.cs
index b5a1a01ca73..d570c09a187 100644
--- a/mcs/class/corlib/System.IO/FileLoadException.cs
+++ b/mcs/class/corlib/System.IO/FileLoadException.cs
@@ -49,7 +49,6 @@ namespace System.IO {
// Fields
const int Result = unchecked ((int)0x80070002);
string msg;
- Exception inner;
string fileName;
string fusionLog;
@@ -81,7 +80,6 @@ namespace System.IO {
{
HResult = Result;
msg = message;
- this.inner = inner;
}
public FileLoadException (string message, string fileName, Exception inner)
@@ -90,7 +88,6 @@ namespace System.IO {
HResult = Result;
this.msg = message;
this.fileName = fileName;
- this.inner = inner;
}
protected FileLoadException (SerializationInfo info, StreamingContext context)
diff --git a/mcs/class/corlib/System.IO/StreamWriter.cs b/mcs/class/corlib/System.IO/StreamWriter.cs
index 4a672776ac1..00f4586c511 100644
--- a/mcs/class/corlib/System.IO/StreamWriter.cs
+++ b/mcs/class/corlib/System.IO/StreamWriter.cs
@@ -49,7 +49,6 @@ namespace System.IO {
private Encoding internalEncoding;
private Stream internalStream;
- private bool closed;
private bool iflush;
@@ -307,7 +306,6 @@ namespace System.IO {
public override void Close()
{
- closed = true;
Dispose (true);
}
diff --git a/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs b/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
index 7b3a35a3400..bc1e88de4c4 100644
--- a/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
+++ b/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
@@ -42,11 +42,10 @@ namespace System.IO
{
long length;
bool closed;
- bool canseek = false;
+// bool canseek;
long capacity;
FileAccess fileaccess;
IntPtr initial_pointer;
- IntPtr pointer_position;
long initial_position;
long current_position;
@@ -56,25 +55,19 @@ namespace System.IO
protected UnmanagedMemoryStream()
{
fileaccess = FileAccess.Read;
- initial_position = 0;
- canseek = true;
- closed = false;
- current_position = initial_position;
+// canseek = true;
}
public unsafe UnmanagedMemoryStream (byte *pointer, long length)
+ : this ()
{
if (pointer == null)
throw new ArgumentNullException("pointer");
if (length < 0)
throw new ArgumentOutOfRangeException("length", "Non-negative number required.");
- fileaccess = FileAccess.Read;
+
this.length = length;
capacity = length;
- initial_position = 0;
- current_position = initial_position;
- canseek = true;
- closed = false;
initial_pointer = new IntPtr((void*)pointer);
}
@@ -90,15 +83,12 @@ namespace System.IO
throw new ArgumentOutOfRangeException("length", "The length cannot be greater than the capacity.");
if (!Enum.IsDefined (typeof (FileAccess), access))
throw new ArgumentOutOfRangeException ("access", "Enum value was out of legal range.");
+
fileaccess = access;
this.length = length;
this.capacity = capacity;
- initial_position = 0;
- current_position = initial_position;
- canseek = true;
+// canseek = true;
initial_pointer = new IntPtr ((void*)pointer);
- closed = false;
- fileaccess = access;
}
#endregion
@@ -336,7 +326,7 @@ namespace System.IO
this.capacity = capacity;
initial_position = 0;
current_position = initial_position;
- canseek = true;
+// canseek = true;
initial_pointer = new IntPtr ((void *)pointer);
closed = false;
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
index f1827a2d76c..0c254b38828 100644
--- a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
@@ -96,6 +96,7 @@ namespace System.Reflection.Emit
#endif
[ClassInterface (ClassInterfaceType.None)]
public sealed class AssemblyBuilder : Assembly, _AssemblyBuilder {
+#pragma warning disable 169, 414
#region Sync with object-internals.h
private UIntPtr dynamic_assembly; /* GC-tracked */
private MethodInfo entry_point;
@@ -122,6 +123,8 @@ namespace System.Reflection.Emit
bool corlib_internal;
Type[] type_forwarders;
#endregion
+#pragma warning restore 169, 414
+
internal Type corlib_object_type = typeof (System.Object);
internal Type corlib_value_type = typeof (System.ValueType);
internal Type corlib_enum_type = typeof (System.Enum);
diff --git a/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
index 3f056767b96..33bbcf10ecc 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
@@ -47,6 +47,8 @@ namespace System.Reflection.Emit {
#endif
[ClassInterface (ClassInterfaceType.None)]
public sealed class ConstructorBuilder : ConstructorInfo, _ConstructorBuilder {
+
+#pragma warning disable 169, 414
private RuntimeMethodHandle mhandle;
private ILGenerator ilgen;
private Type[] parameters;
@@ -61,6 +63,7 @@ namespace System.Reflection.Emit {
private Type[][] paramModReq;
private Type[][] paramModOpt;
private RefEmitPermissionSet[] permissions;
+#pragma warning restore 169, 414
internal ConstructorBuilder (TypeBuilder tb, MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes, Type[][] paramModReq, Type[][] paramModOpt)
{
diff --git a/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs b/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
index eb607ec419b..a07c376cf03 100644
--- a/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
@@ -46,6 +46,8 @@ namespace System.Reflection.Emit {
[ComVisible (true)]
#endif
public sealed class DynamicMethod : MethodInfo {
+
+#pragma warning disable 169, 414
#region Sync with reflection.h
private RuntimeMethodHandle mhandle;
private string name;
@@ -62,6 +64,8 @@ namespace System.Reflection.Emit {
private IntPtr referenced_by;
private Type owner;
#endregion
+#pragma warning restore 169, 414
+
private Delegate deleg;
private MonoMethod method;
private ParameterBuilder[] pinfo;
@@ -371,10 +375,6 @@ namespace System.Reflection.Emit {
throw new InvalidOperationException ("Type definition of the method is complete.");
}
- private Exception NotSupported () {
- return new NotSupportedException ("The invoked member is not supported on a dynamic method.");
- }
-
internal int AddRef (object reference) {
if (refs == null)
refs = new object [4];
diff --git a/mcs/class/corlib/System.Reflection.Emit/EventBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/EventBuilder.cs
index 94de4359501..4c391538ec1 100644
--- a/mcs/class/corlib/System.Reflection.Emit/EventBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/EventBuilder.cs
@@ -45,6 +45,7 @@ namespace System.Reflection.Emit {
#endif
[ClassInterface (ClassInterfaceType.None)]
public sealed class EventBuilder : _EventBuilder {
+#pragma warning disable 169, 414
string name;
Type type;
TypeBuilder typeb;
@@ -55,6 +56,7 @@ namespace System.Reflection.Emit {
MethodBuilder[] other_methods;
EventAttributes attrs;
int table_idx;
+#pragma warning restore 169, 414
internal EventBuilder (TypeBuilder tb, string eventName, EventAttributes eventAttrs, Type eventType) {
name = eventName;
diff --git a/mcs/class/corlib/System.Reflection.Emit/FieldBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/FieldBuilder.cs
index 991afd1ffcb..8b4f452e27e 100644
--- a/mcs/class/corlib/System.Reflection.Emit/FieldBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/FieldBuilder.cs
@@ -45,6 +45,8 @@ namespace System.Reflection.Emit {
#endif
[ClassInterface (ClassInterfaceType.None)]
public sealed class FieldBuilder : FieldInfo, _FieldBuilder {
+
+#pragma warning disable 169, 414
private FieldAttributes attrs;
private Type type;
private String name;
@@ -58,6 +60,7 @@ namespace System.Reflection.Emit {
private RuntimeFieldHandle handle;
private Type[] modReq;
private Type[] modOpt;
+#pragma warning restore 169, 414
internal FieldBuilder (TypeBuilder tb, string fieldName, Type type, FieldAttributes attributes, Type[] modReq, Type[] modOpt)
{
diff --git a/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs b/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
index ec76cbbc604..624ea68efd4 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
@@ -221,7 +221,6 @@ namespace System.Reflection.Emit {
private LabelFixup[] fixups;
private int num_fixups;
internal Module module;
- private Stack scopes;
private int cur_block;
private Stack open_blocks;
private TokenGenerator token_gen;
diff --git a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
index e923d1da2ca..c923d68eb1d 100644
--- a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
@@ -49,6 +49,7 @@ namespace System.Reflection.Emit
[ClassInterface (ClassInterfaceType.None)]
public sealed class MethodBuilder : MethodInfo, _MethodBuilder
{
+#pragma warning disable 169, 414
private RuntimeMethodHandle mhandle;
private Type rtype;
internal Type[] parameters;
@@ -80,6 +81,7 @@ namespace System.Reflection.Emit
private Type[][] paramModReq;
private Type[][] paramModOpt;
private RefEmitPermissionSet[] permissions;
+#pragma warning restore 169, 414
internal MethodBuilder (TypeBuilder tb, string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] returnModReq, Type[] returnModOpt, Type[] parameterTypes, Type[][] paramModReq, Type[][] paramModOpt)
{
diff --git a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
index 0a8798a4e12..34e4b601046 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
@@ -48,6 +48,8 @@ namespace System.Reflection.Emit {
#endif
[ClassInterface (ClassInterfaceType.None)]
public class ModuleBuilder : Module, _ModuleBuilder {
+
+#pragma warning disable 169, 414
#region Sync with object-internals.h
private UIntPtr dynamic_image; /* GC-tracked */
private int num_types;
@@ -61,6 +63,8 @@ namespace System.Reflection.Emit {
bool is_main;
private MonoResource[] resources;
#endregion
+#pragma warning restore 169, 414
+
private TypeBuilder global_type;
private Type global_type_created;
Hashtable name_cache;
diff --git a/mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.cs
index f9b630bd96b..3c38781095e 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.cs
@@ -46,6 +46,8 @@ namespace System.Reflection.Emit {
#endif
[ClassInterface (ClassInterfaceType.None)]
public class ParameterBuilder : _ParameterBuilder {
+
+#pragma warning disable 169, 414
private MethodBase methodb; /* MethodBuilder, ConstructorBuilder or DynamicMethod */
private string name;
private CustomAttributeBuilder[] cattrs;
@@ -54,6 +56,7 @@ namespace System.Reflection.Emit {
private int position;
private int table_idx;
object def_value;
+#pragma warning restore 169, 414
internal ParameterBuilder (MethodBase mb, int pos, ParameterAttributes attributes, string strParamName) {
name = strParamName;
diff --git a/mcs/class/corlib/System.Reflection.Emit/PropertyBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/PropertyBuilder.cs
index 17aabfbbfed..3f49b6232e3 100644
--- a/mcs/class/corlib/System.Reflection.Emit/PropertyBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/PropertyBuilder.cs
@@ -45,6 +45,8 @@ namespace System.Reflection.Emit {
#endif
[ClassInterface (ClassInterfaceType.None)]
public sealed class PropertyBuilder : PropertyInfo, _PropertyBuilder {
+
+#pragma warning disable 169, 414
private PropertyAttributes attrs;
private string name;
private Type type;
@@ -59,6 +61,7 @@ namespace System.Reflection.Emit {
private Type[] returnModOpt;
private Type[][] paramModReq;
private Type[][] paramModOpt;
+#pragma warning restore 169, 414
internal PropertyBuilder (TypeBuilder tb, string name, PropertyAttributes attributes, Type returnType, Type[] returnModReq, Type[] returnModOpt, Type[] parameterTypes, Type[][] paramModReq, Type[][] paramModOpt) {
this.name = name;
diff --git a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
index 56e2df96200..b9d55f49731 100644
--- a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
@@ -52,6 +52,7 @@ namespace System.Reflection.Emit
[ClassInterface (ClassInterfaceType.None)]
public sealed class TypeBuilder : Type, _TypeBuilder
{
+#pragma warning disable 169
#region Sync with reflection.h
private string tname;
private string nspace;
@@ -81,12 +82,14 @@ namespace System.Reflection.Emit
private RefEmitPermissionSet[] permissions;
private Type created;
#endregion
+#pragma warning restore 169
+
string fullname;
bool createTypeCalled;
private Type underlying_type;
public const int UnspecifiedTypeSize = 0;
-
+
protected override TypeAttributes GetAttributeFlagsImpl ()
{
return attrs;
@@ -98,8 +101,10 @@ namespace System.Reflection.Emit
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern void create_internal_class (TypeBuilder tb);
+#if NET_2_0 || BOOTSTRAP_NET_2_0
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern void setup_generic_class ();
+#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern void create_generic_class ();
@@ -1564,8 +1569,6 @@ namespace System.Reflection.Emit
return res;
}
- static int UnmanagedDataCount = 0;
-
public FieldBuilder DefineUninitializedData (string name, int size, FieldAttributes attributes)
{
if (name == null)
diff --git a/mcs/class/corlib/System.Reflection.Emit/UnmanagedMarshal.cs b/mcs/class/corlib/System.Reflection.Emit/UnmanagedMarshal.cs
index d5145053adc..6e533ed0bec 100644
--- a/mcs/class/corlib/System.Reflection.Emit/UnmanagedMarshal.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/UnmanagedMarshal.cs
@@ -43,6 +43,7 @@ namespace System.Reflection.Emit {
#endif
[Serializable]
public sealed class UnmanagedMarshal {
+#pragma warning disable 169, 414
private int count;
private UnmanagedType t;
private UnmanagedType tbase;
@@ -52,6 +53,7 @@ namespace System.Reflection.Emit {
Type marshaltyperef;
private int param_num;
private bool has_size;
+#pragma warning restore 169, 414
private UnmanagedMarshal (UnmanagedType maint, int cnt) {
count = cnt;
diff --git a/mcs/class/corlib/System.Reflection/Assembly.cs b/mcs/class/corlib/System.Reflection/Assembly.cs
index 269e4c2ef7a..a9f3311327f 100644
--- a/mcs/class/corlib/System.Reflection/Assembly.cs
+++ b/mcs/class/corlib/System.Reflection/Assembly.cs
@@ -57,7 +57,9 @@ namespace System.Reflection {
}
// Note: changes to fields must be reflected in _MonoReflectionAssembly struct (object-internals.h)
+#pragma warning disable 169
private IntPtr _mono_assembly;
+#pragma warning restore 169
private ResolveEventHolder resolve_event_holder;
private Evidence _evidence;
@@ -721,8 +723,9 @@ namespace System.Reflection {
}
private class ResourceCloseHandler {
-
+#pragma warning disable 169, 414
Module module;
+#pragma warning restore 169, 414
public ResourceCloseHandler (Module module) {
this.module = module;
diff --git a/mcs/class/corlib/System.Reflection/AssemblyName.cs b/mcs/class/corlib/System.Reflection/AssemblyName.cs
index c54645b458d..711ea4cacb8 100644
--- a/mcs/class/corlib/System.Reflection/AssemblyName.cs
+++ b/mcs/class/corlib/System.Reflection/AssemblyName.cs
@@ -57,6 +57,7 @@ namespace System.Reflection {
[ClassInterfaceAttribute (ClassInterfaceType.None)]
public sealed class AssemblyName : ICloneable, ISerializable, IDeserializationCallback, _AssemblyName {
+#pragma warning disable 169
#region Synch with object-internals.h
string name;
string codebase;
@@ -75,6 +76,7 @@ namespace System.Reflection {
int processor_architecture;
#endif
#endregion
+#pragma warning restore 169
public AssemblyName ()
{
@@ -262,6 +264,7 @@ namespace System.Reflection {
}
}
+#if NET_2_0
private bool IsPublicKeyValid {
get {
// check for ECMA key
@@ -299,6 +302,7 @@ namespace System.Reflection {
return false;
}
}
+#endif
private byte [] InternalGetPublicKeyToken ()
{
diff --git a/mcs/class/corlib/System.Reflection/MonoEvent.cs b/mcs/class/corlib/System.Reflection/MonoEvent.cs
index 6b84ea7da85..5f7f62b5b10 100644
--- a/mcs/class/corlib/System.Reflection/MonoEvent.cs
+++ b/mcs/class/corlib/System.Reflection/MonoEvent.cs
@@ -59,8 +59,10 @@ namespace System.Reflection {
internal sealed class MonoEvent: EventInfo
#endif
{
+#pragma warning disable 169
IntPtr klass;
IntPtr handle;
+#pragma warning restore 169
public override EventAttributes Attributes {
get {
diff --git a/mcs/class/corlib/System.Reflection/Pointer.cs b/mcs/class/corlib/System.Reflection/Pointer.cs
index df077a418ee..08a79d4d2bf 100644
--- a/mcs/class/corlib/System.Reflection/Pointer.cs
+++ b/mcs/class/corlib/System.Reflection/Pointer.cs
@@ -46,9 +46,10 @@ namespace System.Reflection {
#endif
[CLSCompliant(false)]
public unsafe sealed class Pointer : ISerializable {
-
void *data;
+#pragma warning disable 169, 414
Type type;
+#pragma warning restore 169, 414
private Pointer () {
}
diff --git a/mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs b/mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs
index 028ddeb6909..6dda87f5505 100644
--- a/mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs
+++ b/mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs
@@ -51,7 +51,9 @@ public class StrongNameKeyPair
{
private byte[] _publicKey;
private string _keyPairContainer;
+#if NET_2_0
private bool _keyPairExported;
+#endif
private byte[] _keyPairArray;
[NonSerialized]
diff --git a/mcs/class/corlib/System.Resources/MissingManifestResourceException.cs b/mcs/class/corlib/System.Resources/MissingManifestResourceException.cs
index a1d7c403d65..a7618fe4f0f 100644
--- a/mcs/class/corlib/System.Resources/MissingManifestResourceException.cs
+++ b/mcs/class/corlib/System.Resources/MissingManifestResourceException.cs
@@ -42,8 +42,6 @@ namespace System.Resources
#endif
public class MissingManifestResourceException: SystemException
{
- private string param;
-
// Constructors
public MissingManifestResourceException ()
: base (Locale.GetText ("The assembly does not contain the resources for the required culture."))
diff --git a/mcs/class/corlib/System.Resources/ResourceReader.cs b/mcs/class/corlib/System.Resources/ResourceReader.cs
index 3969b9ed1bf..da95dcf2ca1 100644
--- a/mcs/class/corlib/System.Resources/ResourceReader.cs
+++ b/mcs/class/corlib/System.Resources/ResourceReader.cs
@@ -285,6 +285,7 @@ namespace System.Resources
return ret;
}
+#if NET_2_0
object ReadValueVer2 (int type_index)
{
switch ((PredefinedResourceType)type_index)
@@ -353,6 +354,7 @@ namespace System.Resources
type_index -= (int)PredefinedResourceType.FistCustom;
return ReadNonPredefinedValue (Type.GetType (typeNames[type_index], true));
}
+#endif
object ReadValueVer1 (Type type)
{
diff --git a/mcs/class/corlib/System.Runtime.Remoting.Channels/CrossAppDomainChannel.cs b/mcs/class/corlib/System.Runtime.Remoting.Channels/CrossAppDomainChannel.cs
index 5294ad7190c..bde837fc7a0 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Channels/CrossAppDomainChannel.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting.Channels/CrossAppDomainChannel.cs
@@ -49,7 +49,7 @@ namespace System.Runtime.Remoting.Channels
internal class CrossAppDomainData
{
// TODO: Add context support
- private int _ContextID;
+ // private int _ContextID;
private int _DomainID;
private string _processGuid;
@@ -184,6 +184,7 @@ namespace System.Runtime.Remoting.Channels
public CADMethodReturnMessage cadMrm;
}
+#pragma warning disable 169
private static ProcessMessageRes ProcessMessageInDomain (
byte[] arrRequest,
CADMethodCallMessage cadMsg)
@@ -201,6 +202,7 @@ namespace System.Runtime.Remoting.Channels
}
return res;
}
+#pragma warning restore 169
public virtual IMessage SyncProcessMessage(IMessage msgRequest)
{
diff --git a/mcs/class/corlib/System.Runtime.Remoting.Contexts/Context.cs b/mcs/class/corlib/System.Runtime.Remoting.Contexts/Context.cs
index 69dbb38b897..a9e7b21fc85 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Contexts/Context.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting.Contexts/Context.cs
@@ -47,11 +47,13 @@ namespace System.Runtime.Remoting.Contexts {
#endif
public class Context
{
+#pragma warning disable 169, 414
#region Sync with domain-internals.h
int domain_id;
int context_id;
UIntPtr static_data; /* GC-tracked */
#endregion
+#pragma warning restore 169, 414
// Default server context sink chain
static IMessageSink default_server_context_sink;
diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/AsyncResult.cs b/mcs/class/corlib/System.Runtime.Remoting.Messaging/AsyncResult.cs
index d2e743438e1..342f0b6ab10 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Messaging/AsyncResult.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting.Messaging/AsyncResult.cs
@@ -41,6 +41,7 @@ namespace System.Runtime.Remoting.Messaging {
#endif
public class AsyncResult : IAsyncResult, IMessageSink {
+#pragma warning disable 169, 414
object async_state;
WaitHandle handle;
object async_delegate;
@@ -52,6 +53,7 @@ public class AsyncResult : IAsyncResult, IMessageSink {
object async_callback;
ExecutionContext current;
ExecutionContext original;
+#pragma warning restore 169, 414
// not part of MonoAsyncResult...
MonoMethodMessage call_message;
diff --git a/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs b/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs
index 8c62f243353..0d5d4565a8e 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs
@@ -47,11 +47,13 @@ using System.Runtime.InteropServices;
namespace System.Runtime.Remoting.Proxies
{
+#pragma warning disable 169
internal class TransparentProxy {
public RealProxy _rp;
IntPtr _class;
bool _custom_type_info;
}
+#pragma warning restore 169
#if NET_2_0
[ComVisible (true)]
@@ -61,6 +63,8 @@ namespace System.Runtime.Remoting.Proxies
// derive from this class so keep these locals
// in sync with the definition RealProxy
// in object-internals.h
+
+#pragma warning disable 169, 414
#region Sync with object-internals.h
Type class_to_proxy;
internal Context _targetContext;
@@ -71,6 +75,7 @@ namespace System.Runtime.Remoting.Proxies
Object _objTP;
object _stubData;
#endregion
+#pragma warning restore 169, 414
protected RealProxy ()
{
diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs
index 0e3a376a9bc..f86abcceab3 100644
--- a/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs
@@ -60,8 +60,8 @@ namespace System.Runtime.Remoting
static string applicationID = null;
static string applicationName = null;
- static string configFile = "";
- static SmallXmlParser parser = null;
+// static string configFile = "";
+// static SmallXmlParser parser = null;
static string processGuid = null;
static bool defaultConfigRead = false;
static bool defaultDelayedConfigRead = false;
diff --git a/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs b/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs
index 7dff79fe92d..25d5ba2512d 100644
--- a/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs
+++ b/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs
@@ -41,7 +41,7 @@ namespace System.Runtime.Serialization.Formatters.Binary
{
internal class ObjectReader
{
- BinaryFormatter _formatter;
+// BinaryFormatter _formatter;
ISurrogateSelector _surrogateSelector;
StreamingContext _context;
SerializationBinder _binder;
@@ -78,7 +78,7 @@ namespace System.Runtime.Serialization.Formatters.Binary
public ObjectReader (BinaryFormatter formatter)
{
- _formatter = formatter;
+// _formatter = formatter;
_surrogateSelector = formatter.SurrogateSelector;
_context = formatter.Context;
_binder = formatter.Binder;
diff --git a/mcs/class/corlib/System.Runtime.Serialization.Formatters/ServerFault.cs b/mcs/class/corlib/System.Runtime.Serialization.Formatters/ServerFault.cs
index 50ceedc8c9a..d886edf5504 100644
--- a/mcs/class/corlib/System.Runtime.Serialization.Formatters/ServerFault.cs
+++ b/mcs/class/corlib/System.Runtime.Serialization.Formatters/ServerFault.cs
@@ -50,7 +50,6 @@ namespace System.Runtime.Serialization.Formatters {
string exceptionType;
string message;
string stackTrace;
- Exception exception;
public ServerFault (string exceptionType, string message,
string stackTrace)
diff --git a/mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs b/mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs
index b36c92dd170..793328ab943 100644
--- a/mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs
+++ b/mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs
@@ -342,6 +342,7 @@ namespace System.Runtime.Serialization
}
/* used by the runtime */
+#pragma warning disable 169
private SerializationEntry [] get_entries ()
{
SerializationEntry [] res = new SerializationEntry [this.MemberCount];
@@ -352,5 +353,6 @@ namespace System.Runtime.Serialization
return res;
}
+#pragma warning restore 169
}
}
diff --git a/mcs/class/corlib/System.Runtime.Versioning/ResourceExposureAttribute.cs b/mcs/class/corlib/System.Runtime.Versioning/ResourceExposureAttribute.cs
index 50f1a8a856e..8858c411d49 100644
--- a/mcs/class/corlib/System.Runtime.Versioning/ResourceExposureAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.Versioning/ResourceExposureAttribute.cs
@@ -37,7 +37,6 @@ namespace System.Runtime.Versioning {
public sealed class ResourceExposureAttribute: Attribute {
private ResourceScope exposure;
- private ResourceScope consumption;
public ResourceExposureAttribute (ResourceScope exposureLevel)
{
diff --git a/mcs/class/corlib/System.Security.AccessControl/CryptoKeySecurity.cs b/mcs/class/corlib/System.Security.AccessControl/CryptoKeySecurity.cs
index 637e7a2041c..c92c32633a6 100644
--- a/mcs/class/corlib/System.Security.AccessControl/CryptoKeySecurity.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/CryptoKeySecurity.cs
@@ -36,7 +36,7 @@ namespace System.Security.AccessControl
{
public sealed class CryptoKeySecurity : NativeObjectSecurity
{
- CommonSecurityDescriptor securityDescriptor;
+// CommonSecurityDescriptor securityDescriptor;
[MonoTODO]
public CryptoKeySecurity ()
@@ -46,7 +46,7 @@ namespace System.Security.AccessControl
[MonoTODO]
public CryptoKeySecurity (CommonSecurityDescriptor securityDescriptor)
{
- this.securityDescriptor = securityDescriptor;
+// this.securityDescriptor = securityDescriptor;
}
public override Type AccessRightType {
diff --git a/mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs b/mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs
index 18147d0be0c..e29349cdfc6 100644
--- a/mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs
@@ -34,6 +34,8 @@ using System.Security.Principal;
namespace System.Security.AccessControl {
public sealed class DiscretionaryAcl : CommonAcl
{
+// RawAcl raw_acl;
+
public DiscretionaryAcl (bool isContainer, bool isDS,
int capacity)
: this (isContainer, isDS, 0, capacity)
@@ -45,7 +47,7 @@ namespace System.Security.AccessControl {
RawAcl rawAcl)
: base (isContainer, isDS, 0)
{
- this.raw_acl = rawAcl;
+// this.raw_acl = rawAcl;
}
public DiscretionaryAcl (bool isContainer, bool isDS,
@@ -54,8 +56,6 @@ namespace System.Security.AccessControl {
{
}
- RawAcl raw_acl;
-
public void AddAccess (AccessControlType accessType,
SecurityIdentifier sid, int accessMask,
InheritanceFlags inheritanceFlags,
diff --git a/mcs/class/corlib/System.Security.AccessControl/GenericSecurityDescriptor.cs b/mcs/class/corlib/System.Security.AccessControl/GenericSecurityDescriptor.cs
index c4324ee1d71..6e35900179b 100644
--- a/mcs/class/corlib/System.Security.AccessControl/GenericSecurityDescriptor.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/GenericSecurityDescriptor.cs
@@ -33,13 +33,13 @@ using System.Security.Principal;
namespace System.Security.AccessControl {
public abstract class GenericSecurityDescriptor
{
- bool isContainer;
- bool isDS;
- ControlFlags flags;
- SecurityIdentifier owner;
- SecurityIdentifier group;
- SystemAcl systemAcl;
- DiscretionaryAcl discretionaryAcl;
+// bool isContainer;
+// bool isDS;
+// ControlFlags flags;
+// SecurityIdentifier owner;
+// SecurityIdentifier group;
+// SystemAcl systemAcl;
+// DiscretionaryAcl discretionaryAcl;
protected GenericSecurityDescriptor ()
{
diff --git a/mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs b/mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs
index 467d57a3dff..f74244a7691 100644
--- a/mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs
@@ -34,6 +34,8 @@ using System.Security.Principal;
namespace System.Security.AccessControl {
public sealed class SystemAcl : CommonAcl
{
+// RawAcl raw_acl;
+
public SystemAcl (bool isContainer, bool isDS, int capacity)
: this (isContainer, isDS, 0, capacity)
{
@@ -42,7 +44,7 @@ namespace System.Security.AccessControl {
public SystemAcl (bool isContainer, bool isDS, RawAcl rawAcl)
: this (isContainer, isDS, 0)
{
- this.raw_acl = rawAcl;
+// this.raw_acl = rawAcl;
}
public SystemAcl (bool isContainer, bool isDS, byte revision,
@@ -51,8 +53,6 @@ namespace System.Security.AccessControl {
{
}
- RawAcl raw_acl;
-
public void AddAudit (AuditFlags auditFlags,
SecurityIdentifier sid, int accessMask,
InheritanceFlags inheritanceFlags,
diff --git a/mcs/class/corlib/System.Security.Cryptography/RC2CryptoServiceProvider.cs b/mcs/class/corlib/System.Security.Cryptography/RC2CryptoServiceProvider.cs
index 4986a248964..ce49e0803a3 100644
--- a/mcs/class/corlib/System.Security.Cryptography/RC2CryptoServiceProvider.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/RC2CryptoServiceProvider.cs
@@ -44,7 +44,9 @@ namespace System.Security.Cryptography {
#endif
public sealed class RC2CryptoServiceProvider : RC2 {
+#if NET_2_0
private bool _useSalt;
+#endif
public RC2CryptoServiceProvider ()
{
diff --git a/mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeDeformatter.cs b/mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeDeformatter.cs
index 05b9b1213a8..002e4299019 100644
--- a/mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeDeformatter.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeDeformatter.cs
@@ -39,11 +39,10 @@ namespace System.Security.Cryptography {
public class RSAOAEPKeyExchangeDeformatter : AsymmetricKeyExchangeDeformatter {
private RSA rsa;
- private string param;
+// private string param;
public RSAOAEPKeyExchangeDeformatter ()
{
- rsa = null;
}
public RSAOAEPKeyExchangeDeformatter (AsymmetricAlgorithm key)
diff --git a/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeDeformatter.cs b/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeDeformatter.cs
index 44408cc7112..88f308cba0c 100644
--- a/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeDeformatter.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeDeformatter.cs
@@ -39,12 +39,11 @@ namespace System.Security.Cryptography {
public class RSAPKCS1KeyExchangeDeformatter : AsymmetricKeyExchangeDeformatter {
private RSA rsa;
- private string param;
+// private string param;
private RandomNumberGenerator random;
public RSAPKCS1KeyExchangeDeformatter ()
{
- rsa = null;
}
public RSAPKCS1KeyExchangeDeformatter (AsymmetricAlgorithm key)
diff --git a/mcs/class/corlib/System.Security.Permissions/EnvironmentPermission.cs b/mcs/class/corlib/System.Security.Permissions/EnvironmentPermission.cs
index 7ac551cd59f..aa2023e1e48 100644
--- a/mcs/class/corlib/System.Security.Permissions/EnvironmentPermission.cs
+++ b/mcs/class/corlib/System.Security.Permissions/EnvironmentPermission.cs
@@ -45,7 +45,7 @@ namespace System.Security.Permissions {
private const int version = 1;
- EnvironmentPermissionAccess flags;
+// EnvironmentPermissionAccess flags;
PermissionState _state;
ArrayList readList;
ArrayList writeList;
diff --git a/mcs/class/corlib/System.Security.Permissions/FileIOPermissionAttribute.cs b/mcs/class/corlib/System.Security.Permissions/FileIOPermissionAttribute.cs
index f5c1fcb2cb7..91b71b8fc6f 100644
--- a/mcs/class/corlib/System.Security.Permissions/FileIOPermissionAttribute.cs
+++ b/mcs/class/corlib/System.Security.Permissions/FileIOPermissionAttribute.cs
@@ -52,7 +52,7 @@ namespace System.Security.Permissions {
private FileIOPermissionAccess allLocalFiles;
private string changeAccessControl;
private string viewAccessControl;
- private string viewAndModify;
+ //private string viewAndModify;
#endif
// Constructor
diff --git a/mcs/class/corlib/System.Security.Permissions/RegistryPermission.cs b/mcs/class/corlib/System.Security.Permissions/RegistryPermission.cs
index 62e42fc2429..626cbb5c9ba 100644
--- a/mcs/class/corlib/System.Security.Permissions/RegistryPermission.cs
+++ b/mcs/class/corlib/System.Security.Permissions/RegistryPermission.cs
@@ -48,12 +48,12 @@ namespace System.Security.Permissions {
private const int version = 1;
private PermissionState _state;
- private RegistryPermissionAccess _access;
+// private RegistryPermissionAccess _access;
private ArrayList createList;
private ArrayList readList;
private ArrayList writeList;
#if NET_2_0
- private AccessControlActions _control;
+// private AccessControlActions _control;
#endif
// Constructors
diff --git a/mcs/class/corlib/System.Security.Permissions/RegistryPermissionAttribute.cs b/mcs/class/corlib/System.Security.Permissions/RegistryPermissionAttribute.cs
index 7ae08c3942c..910a5218e54 100644
--- a/mcs/class/corlib/System.Security.Permissions/RegistryPermissionAttribute.cs
+++ b/mcs/class/corlib/System.Security.Permissions/RegistryPermissionAttribute.cs
@@ -49,7 +49,7 @@ namespace System.Security.Permissions {
#if NET_2_0
private string changeAccessControl;
private string viewAccessControl;
- private string viewAndModify;
+// private string viewAndModify;
#endif
// Constructor
diff --git a/mcs/class/corlib/System.Security.Policy/CodeGroup.cs b/mcs/class/corlib/System.Security.Policy/CodeGroup.cs
index d20fa81fbbe..2e8d833974d 100644
--- a/mcs/class/corlib/System.Security.Policy/CodeGroup.cs
+++ b/mcs/class/corlib/System.Security.Policy/CodeGroup.cs
@@ -46,7 +46,7 @@ namespace System.Security.Policy {
string m_description;
string m_name;
ArrayList m_children = new ArrayList();
- PolicyLevel m_level;
+// PolicyLevel m_level;
#if NET_2_0
protected CodeGroup (IMembershipCondition membershipCondition, PolicyStatement policy)
@@ -239,7 +239,7 @@ namespace System.Security.Policy {
m_description = e.Attribute("Description");
// seems like we might need this to Resolve() in subclasses
- m_level = level;
+ //m_level = level;
ParseXml (e, level);
}
diff --git a/mcs/class/corlib/System.Security.Policy/DefaultPolicies.cs b/mcs/class/corlib/System.Security.Policy/DefaultPolicies.cs
index 9f2d18d36de..ad510b331d3 100644
--- a/mcs/class/corlib/System.Security.Policy/DefaultPolicies.cs
+++ b/mcs/class/corlib/System.Security.Policy/DefaultPolicies.cs
@@ -361,6 +361,7 @@ namespace System.Security.Policy {
return se;
}
+#if !NET_2_0
private static SecurityElement EventLogPermission (string name, string access)
{
SecurityElement se = new SecurityElement ("IPermission");
@@ -374,5 +375,6 @@ namespace System.Security.Policy {
se.AddChild (child);
return se;
}
+#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Policy/Evidence.cs b/mcs/class/corlib/System.Security.Policy/Evidence.cs
index 3a967d88aed..7ec182697cc 100644
--- a/mcs/class/corlib/System.Security.Policy/Evidence.cs
+++ b/mcs/class/corlib/System.Security.Policy/Evidence.cs
@@ -53,7 +53,9 @@ namespace System.Security.Policy {
private bool _locked;
private ArrayList hostEvidenceList;
private ArrayList assemblyEvidenceList;
+#if NET_2_0
private int _hashCode;
+#endif
public Evidence ()
{
@@ -136,7 +138,9 @@ namespace System.Security.Policy {
public void AddAssembly (object id)
{
AssemblyEvidenceList.Add (id);
+#if NET_2_0
_hashCode = 0;
+#endif
}
public void AddHost (object id)
@@ -145,7 +149,9 @@ namespace System.Security.Policy {
new SecurityPermission (SecurityPermissionFlag.ControlEvidence).Demand ();
}
HostEvidenceList.Add (id);
+#if NET_2_0
_hashCode = 0;
+#endif
}
#if NET_2_0
@@ -265,7 +271,9 @@ namespace System.Security.Policy {
foreach (object o in evidence.assemblyEvidenceList)
AddAssembly (o);
}
+#if NET_2_0
_hashCode = 0;
+#endif
}
}
diff --git a/mcs/class/corlib/System.Security/PermissionSet.cs b/mcs/class/corlib/System.Security/PermissionSet.cs
index 33806f746a2..1ac01aefc57 100644
--- a/mcs/class/corlib/System.Security/PermissionSet.cs
+++ b/mcs/class/corlib/System.Security/PermissionSet.cs
@@ -58,7 +58,6 @@ namespace System.Security {
private PermissionState state;
private ArrayList list;
- private int _hashcode;
private PolicyLevel _policyLevel;
private bool _declsec;
private bool _readOnly;
diff --git a/mcs/class/corlib/System.Security/SecureString.cs b/mcs/class/corlib/System.Security/SecureString.cs
index 94f42ab1c1a..8ed45714751 100644
--- a/mcs/class/corlib/System.Security/SecureString.cs
+++ b/mcs/class/corlib/System.Security/SecureString.cs
@@ -232,15 +232,15 @@ namespace System.Security {
// internal/private stuff
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static void EncryptInternal (byte [] data, object scope);
+// [MethodImplAttribute(MethodImplOptions.InternalCall)]
+// extern static void EncryptInternal (byte [] data, object scope);
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static void DecryptInternal (byte [] data, object scope);
+// [MethodImplAttribute(MethodImplOptions.InternalCall)]
+// extern static void DecryptInternal (byte [] data, object scope);
- static readonly object scope = Enum.Parse (
- Assembly.Load (Consts.AssemblySystem_Security)
- .GetType ("System.Security.Cryptography.MemoryProtectionScope"), "SameProcess");
+// static readonly object scope = Enum.Parse (
+// Assembly.Load (Consts.AssemblySystem_Security)
+// .GetType ("System.Security.Cryptography.MemoryProtectionScope"), "SameProcess");
// Note that ProtectedMemory is not supported on non-Windows environment right now.
private void Encrypt ()
diff --git a/mcs/class/corlib/System.Security/SecurityException.cs b/mcs/class/corlib/System.Security/SecurityException.cs
index 71f0f0f8ca8..817bc4c2f2b 100644
--- a/mcs/class/corlib/System.Security/SecurityException.cs
+++ b/mcs/class/corlib/System.Security/SecurityException.cs
@@ -49,17 +49,25 @@ namespace System.Security {
Type permissionType;
private string _granted;
private string _refused;
- private SecurityAction _action;
private object _demanded;
+ private IPermission _firstperm;
+// private IPermission _permfailed;
+ private MethodInfo _method;
+ private Evidence _evidence;
+
+#if !NET_2_0
+ #pragma warning disable 169
+#endif
+ private SecurityAction _action;
private object _denyset;
private object _permitset;
private AssemblyName _assembly;
- private IPermission _firstperm;
- private IPermission _permfailed;
- private MethodInfo _method;
private string _url;
private SecurityZone _zone;
- private Evidence _evidence;
+
+#if !NET_2_0
+ #pragma warning restore 169
+#endif
// Properties
diff --git a/mcs/class/corlib/System.Security/SecurityManager.cs b/mcs/class/corlib/System.Security/SecurityManager.cs
index 100fe29efff..06d174500bf 100644
--- a/mcs/class/corlib/System.Security/SecurityManager.cs
+++ b/mcs/class/corlib/System.Security/SecurityManager.cs
@@ -611,13 +611,6 @@ namespace System.Security {
return LinkDemand (mb.ReflectedType.Assembly, &klass, &method);
}
- // internal - get called at JIT time
-
- private static void DemandUnmanaged ()
- {
- UnmanagedCode.Demand ();
- }
-
private unsafe static bool LinkDemand (Assembly a, RuntimeDeclSecurityActions *klass, RuntimeDeclSecurityActions *method)
{
try {
@@ -647,6 +640,7 @@ namespace System.Security {
}
}
+#pragma warning disable 169
private static bool LinkDemandFullTrust (Assembly a)
{
// FullTrust is immutable (and means Unrestricted)
@@ -785,6 +779,12 @@ namespace System.Security {
}
}
+ // internal - get called at JIT time
+
+ private static void DemandUnmanaged ()
+ {
+ UnmanagedCode.Demand ();
+ }
// internal - get called by JIT generated code
@@ -798,5 +798,6 @@ namespace System.Security {
{
throw new SecurityException ("SecurityAction.DemandChoice was removed from 2.0");
}
+#pragma warning restore 169
}
}
diff --git a/mcs/class/corlib/System.Text/Encoding.cs b/mcs/class/corlib/System.Text/Encoding.cs
index 0ec2eb9a7e6..19ddf206351 100644
--- a/mcs/class/corlib/System.Text/Encoding.cs
+++ b/mcs/class/corlib/System.Text/Encoding.cs
@@ -46,7 +46,9 @@ public abstract class Encoding
// Code page used by this encoding.
internal int codePage;
internal int windows_code_page;
+#if NET_2_0
bool is_readonly = true;
+#endif
// Constructor.
protected Encoding ()
@@ -484,7 +486,9 @@ public abstract class Encoding
// Try to obtain a code page handler from the I18N handler.
Encoding enc = (Encoding)(InvokeI18N ("GetEncoding", codepage));
if (enc != null) {
+#if NET_2_0
enc.is_readonly = true;
+#endif
return enc;
}
@@ -496,7 +500,9 @@ public abstract class Encoding
Type type = assembly.GetType (cpName);
if (type != null) {
enc = (Encoding)(Activator.CreateInstance (type));
+#if NET_2_0
enc.is_readonly = true;
+#endif
return enc;
}
@@ -505,7 +511,9 @@ public abstract class Encoding
type = Type.GetType (cpName);
if (type != null) {
enc = (Encoding)(Activator.CreateInstance (type));
+#if NET_2_0
enc.is_readonly = true;
+#endif
return enc;
}
@@ -838,7 +846,6 @@ public abstract class Encoding
static volatile Encoding utf8EncodingWithoutMarkers;
static volatile Encoding unicodeEncoding;
static volatile Encoding isoLatin1Encoding;
- static volatile Encoding unixConsoleEncoding;
#if NET_2_0
static volatile Encoding utf8EncodingUnsafe;
static volatile Encoding utf32Encoding;
@@ -855,7 +862,7 @@ public abstract class Encoding
lock (lockobj) {
if (asciiEncoding == null) {
asciiEncoding = new ASCIIEncoding ();
- asciiEncoding.is_readonly = true;
+// asciiEncoding.is_readonly = true;
}
}
}
@@ -872,7 +879,7 @@ public abstract class Encoding
lock (lockobj) {
if (bigEndianEncoding == null) {
bigEndianEncoding = new UnicodeEncoding (true, true);
- bigEndianEncoding.is_readonly = true;
+// bigEndianEncoding.is_readonly = true;
}
}
}
@@ -920,7 +927,9 @@ public abstract class Encoding
// not supported by underlying OS
defaultEncoding = UTF8Unmarked;
}
+#if NET_2_0
defaultEncoding.is_readonly = true;
+#endif
}
}
}
@@ -937,7 +946,7 @@ public abstract class Encoding
lock (lockobj) {
if (isoLatin1Encoding == null) {
isoLatin1Encoding = new Latin1Encoding ();
- isoLatin1Encoding.is_readonly = true;
+// isoLatin1Encoding.is_readonly = true;
}
}
}
@@ -959,7 +968,7 @@ public abstract class Encoding
lock (lockobj) {
if (utf7Encoding == null) {
utf7Encoding = new UTF7Encoding ();
- utf7Encoding.is_readonly = true;
+// utf7Encoding.is_readonly = true;
}
}
}
@@ -976,7 +985,7 @@ public abstract class Encoding
lock (lockobj) {
if (utf8EncodingWithMarkers == null) {
utf8EncodingWithMarkers = new UTF8Encoding (true);
- utf8EncodingWithMarkers.is_readonly = true;
+// utf8EncodingWithMarkers.is_readonly = true;
}
}
}
@@ -994,7 +1003,7 @@ public abstract class Encoding
lock (lockobj){
if (utf8EncodingWithoutMarkers == null){
utf8EncodingWithoutMarkers = new UTF8Encoding (false, false);
- utf8EncodingWithoutMarkers.is_readonly = true;
+// utf8EncodingWithoutMarkers.is_readonly = true;
}
}
}
@@ -1035,7 +1044,7 @@ public abstract class Encoding
lock (lockobj) {
if (unicodeEncoding == null) {
unicodeEncoding = new UnicodeEncoding (false, true);
- unicodeEncoding.is_readonly = true;
+// unicodeEncoding.is_readonly = true;
}
}
}
@@ -1053,7 +1062,7 @@ public abstract class Encoding
lock (lockobj) {
if (utf32Encoding == null) {
utf32Encoding = new UTF32Encoding (false, true);
- utf32Encoding.is_readonly = true;
+// utf32Encoding.is_readonly = true;
}
}
}
@@ -1070,7 +1079,7 @@ public abstract class Encoding
lock (lockobj) {
if (bigEndianUTF32Encoding == null) {
bigEndianUTF32Encoding = new UTF32Encoding (true, true);
- bigEndianUTF32Encoding.is_readonly = true;
+// bigEndianUTF32Encoding.is_readonly = true;
}
}
}
diff --git a/mcs/class/corlib/System.Text/UTF8Encoding.cs b/mcs/class/corlib/System.Text/UTF8Encoding.cs
index 70e21758c3f..60ca637178f 100644
--- a/mcs/class/corlib/System.Text/UTF8Encoding.cs
+++ b/mcs/class/corlib/System.Text/UTF8Encoding.cs
@@ -402,11 +402,6 @@ Char.IsLetterOrDigit (pair);
return posn - byteIndex;
}
- private unsafe int Fallback (byte* bytes, int byteCount, char lead, char tail)
- {
- throw new NotImplementedException ();
- }
-
// Get the bytes that result from encoding a character buffer.
public override int GetBytes (char[] chars, int charIndex, int charCount,
byte[] bytes, int byteIndex)
@@ -1161,14 +1156,14 @@ Char.IsLetterOrDigit (pair);
[Serializable]
private class UTF8Encoder : Encoder
{
- private bool emitIdentifier;
+// private bool emitIdentifier;
private char leftOverForCount;
private char leftOverForConv;
// Constructor.
public UTF8Encoder (bool emitIdentifier)
{
- this.emitIdentifier = emitIdentifier;
+// this.emitIdentifier = emitIdentifier;
leftOverForCount = '\0';
leftOverForConv = '\0';
}
@@ -1184,7 +1179,7 @@ Char.IsLetterOrDigit (pair);
{
int result;
result = InternalGetBytes (chars, charIndex, charCount, bytes, byteIndex, ref leftOverForConv, flush);
- emitIdentifier = false;
+// emitIdentifier = false;
return result;
}
@@ -1199,7 +1194,7 @@ Char.IsLetterOrDigit (pair);
{
int result;
result = InternalGetBytes (chars, charCount, bytes, byteCount, ref leftOverForConv, flush);
- emitIdentifier = false;
+// emitIdentifier = false;
return result;
}
#endif
diff --git a/mcs/class/corlib/System.Threading/Thread.cs b/mcs/class/corlib/System.Threading/Thread.cs
index 6dd29bd08db..ce50dee7a43 100644
--- a/mcs/class/corlib/System.Threading/Thread.cs
+++ b/mcs/class/corlib/System.Threading/Thread.cs
@@ -54,6 +54,7 @@ namespace System.Threading {
public sealed class Thread : _Thread {
#endif
+#pragma warning disable 169, 414
#region Sync with metadata/object-internals.h
int lock_thread_id;
// stores a thread handle
@@ -112,6 +113,7 @@ namespace System.Threading {
private IntPtr unused5;
private IntPtr unused6;
#endregion
+#pragma warning restore 169, 414
// the name of local_slots is important as it's used by the runtime.
[ThreadStatic]
@@ -119,10 +121,12 @@ namespace System.Threading {
// can be both a ThreadSart and a ParameterizedThreadStart
private MulticastDelegate threadstart;
- private string thread_name=null;
-
+ //private string thread_name=null;
+
+#if NET_2_0
private static int _managed_id_counter;
private int managed_id;
+#endif
private IPrincipal _principal;
internal NumberFormatter _numberFormatter;
@@ -317,10 +321,6 @@ namespace System.Threading {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern void Thread_init ();
- private static int GetNewManagedId() {
- return Interlocked.Increment(ref _managed_id_counter);
- }
-
public Thread(ThreadStart start) {
if(start==null) {
throw new ArgumentNullException("Null ThreadStart");
@@ -362,8 +362,8 @@ namespace System.Threading {
}
}
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- private static extern int current_lcid ();
+ //[MethodImplAttribute (MethodImplOptions.InternalCall)]
+ //private static extern int current_lcid ();
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern CultureInfo GetCachedCurrentCulture ();
@@ -887,6 +887,10 @@ namespace System.Threading {
#endif
#if NET_2_0
+ private static int GetNewManagedId() {
+ return Interlocked.Increment(ref _managed_id_counter);
+ }
+
public Thread (ThreadStart start, int maxStackSize)
{
if (start == null)
diff --git a/mcs/class/corlib/System/AppDomain.cs b/mcs/class/corlib/System/AppDomain.cs
index 00cdf3954a8..6532592419e 100644
--- a/mcs/class/corlib/System/AppDomain.cs
+++ b/mcs/class/corlib/System/AppDomain.cs
@@ -982,6 +982,7 @@ namespace System {
}
// The following methods are called from the runtime. Don't change signatures.
+#pragma warning disable 169
private void DoAssemblyLoad (Assembly assembly)
{
if (AssemblyLoad == null)
@@ -1105,6 +1106,7 @@ namespace System {
else
arrResponse = null;
}
+#pragma warning restore 169
// End of methods called from the runtime
@@ -1148,13 +1150,6 @@ namespace System {
public event UnhandledExceptionEventHandler UnhandledException;
#endif
- /* Avoid warnings for events used only by the runtime */
- private void DummyUse () {
- ProcessExit += (EventHandler)null;
- ResourceResolve += (ResolveEventHandler)null;
- UnhandledException += (UnhandledExceptionEventHandler)null;
- }
-
#if NET_2_0
public event ResolveEventHandler ReflectionOnlyAssemblyResolve;
diff --git a/mcs/class/corlib/System/ArgIterator.cs b/mcs/class/corlib/System/ArgIterator.cs
index 139a82eaa12..9f69dcc37a1 100644
--- a/mcs/class/corlib/System/ArgIterator.cs
+++ b/mcs/class/corlib/System/ArgIterator.cs
@@ -39,10 +39,12 @@ namespace System
[StructLayout (LayoutKind.Auto)]
public struct ArgIterator
{
+#pragma warning disable 169, 414
IntPtr sig;
IntPtr args;
int next_arg;
int num_args;
+#pragma warning restore 169, 414
[MethodImpl (MethodImplOptions.InternalCall)]
extern void Setup (IntPtr argsp, IntPtr start);
diff --git a/mcs/class/corlib/System/Array.cs b/mcs/class/corlib/System/Array.cs
index 860df19324a..4499ad0f8fc 100644
--- a/mcs/class/corlib/System/Array.cs
+++ b/mcs/class/corlib/System/Array.cs
@@ -1383,15 +1383,6 @@ namespace System
array [j] = val;
}
-#if NET_2_0
- void generic_swapper<T> (int i, int j) {
- T[] array = this as T[];
- T val = array [i];
- array [i] = array [j];
- array [j] = val;
- }
-#endif
-
static int new_gap (int gap)
{
gap = (gap * 10) / 13;
@@ -2228,12 +2219,10 @@ namespace System
class ArrayReadOnlyList<T> : IList<T>
{
T [] array;
- bool is_value_type;
public ArrayReadOnlyList (T [] array)
{
this.array = array;
- is_value_type = typeof (T).IsValueType;
}
public T this [int index] {
@@ -2304,7 +2293,7 @@ namespace System
throw ReadOnlyError ();
}
- Exception ReadOnlyError ()
+ static Exception ReadOnlyError ()
{
return new NotSupportedException ("This collection is read-only.");
}
diff --git a/mcs/class/corlib/System/Console.cs b/mcs/class/corlib/System/Console.cs
index ec9effd876a..1611bcca74d 100644
--- a/mcs/class/corlib/System/Console.cs
+++ b/mcs/class/corlib/System/Console.cs
@@ -686,7 +686,13 @@ namespace System
}
delegate void InternalCancelHandler ();
- static InternalCancelHandler cancel_handler = new InternalCancelHandler (DoConsoleCancelEvent);
+
+#pragma warning disable 414
+ //
+ // Used by console-io.c
+ //
+ static readonly InternalCancelHandler cancel_handler = new InternalCancelHandler (DoConsoleCancelEvent);
+#pragma warning restore 414
internal static void DoConsoleCancelEvent ()
{
diff --git a/mcs/class/corlib/System/Decimal.cs b/mcs/class/corlib/System/Decimal.cs
index 2fe981b6bff..5dd816eebb5 100644
--- a/mcs/class/corlib/System/Decimal.cs
+++ b/mcs/class/corlib/System/Decimal.cs
@@ -87,11 +87,6 @@ namespace System
private static readonly Decimal MaxValueDiv10 = MaxValue / 10;
- // maximal decimal value as double
- private static readonly double dDecMaxValue = 7.922816251426433759354395033e28;
- // epsilon decimal value as double
- private static readonly double dDecEpsilon = 0.5e-28; // == 0.5 * 1 / 10^28
-
// some constants
private const int DECIMAL_DIVIDE_BY_ZERO = 5;
private const uint MAX_SCALE = 28;
@@ -146,7 +141,6 @@ namespace System
public Decimal (uint value)
{
lo = value;
- flags = hi = mid = 0;
}
public Decimal (long value)
@@ -1371,8 +1365,8 @@ namespace System
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern int decimal2Int64 (ref Decimal val, out long result);
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private static extern int double2decimal (out Decimal erg, double val, int digits);
+// [MethodImplAttribute(MethodImplOptions.InternalCall)]
+// private static extern int double2decimal (out Decimal erg, double val, int digits);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern int decimalIncr (ref Decimal d1, ref Decimal d2);
@@ -1393,8 +1387,8 @@ namespace System
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern void decimalFloorAndTrunc (ref Decimal val, int floorFlag);
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private static extern void decimalRound (ref Decimal val, int decimals);
+// [MethodImplAttribute(MethodImplOptions.InternalCall)]
+// private static extern void decimalRound (ref Decimal val, int decimals);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern int decimalMult (ref Decimal pd1, ref Decimal pd2);
diff --git a/mcs/class/corlib/System/Delegate.cs b/mcs/class/corlib/System/Delegate.cs
index 235d36f7b63..c5191da69a7 100644
--- a/mcs/class/corlib/System/Delegate.cs
+++ b/mcs/class/corlib/System/Delegate.cs
@@ -55,6 +55,7 @@ namespace System
public abstract class Delegate : ICloneable, ISerializable
{
#region Sync with object-internals.h
+#pragma warning disable 169, 414
private IntPtr method_ptr;
private IntPtr invoke_impl;
private object m_target;
@@ -68,6 +69,7 @@ namespace System
private MethodInfo original_method_info;
private DelegateData data;
+#pragma warning restore 169, 414
#endregion
protected Delegate (object target, string method)
@@ -125,18 +127,19 @@ namespace System
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal extern void SetMulticastInvoke ();
+#if NET_2_0
private static bool arg_type_match (Type delArgType, Type argType) {
bool match = delArgType == argType;
-#if NET_2_0
// Delegate contravariance
if (!match) {
if (!delArgType.IsValueType && (delArgType != typeof (ValueType)) && (argType.IsAssignableFrom (delArgType)))
match = true;
}
-#endif
+
return match;
}
+#endif
private static bool return_type_match (Type delReturnType, Type returnType) {
bool returnMatch = returnType == delReturnType;
diff --git a/mcs/class/corlib/System/Environment.cs b/mcs/class/corlib/System/Environment.cs
index 58967192b42..00ceb72713a 100644
--- a/mcs/class/corlib/System/Environment.cs
+++ b/mcs/class/corlib/System/Environment.cs
@@ -689,6 +689,10 @@ namespace System {
get { return ((int) Platform != 128); }
}
+ //
+ // Used by gacutil.exe
+ //
+#pragma warning disable 169
private static string GacPath {
get {
if (Environment.IsRunningOnWindows) {
@@ -700,6 +704,7 @@ namespace System {
return Path.Combine (Path.Combine (internalGetGacPath (), "mono"), "gac");
}
}
+#pragma warning restore 169
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern static string [] GetLogicalDrivesInternal ();
diff --git a/mcs/class/corlib/System/Exception.cs b/mcs/class/corlib/System/Exception.cs
index 74333cb6ae1..4fe247f7b47 100644
--- a/mcs/class/corlib/System/Exception.cs
+++ b/mcs/class/corlib/System/Exception.cs
@@ -52,6 +52,7 @@ namespace System
, _Exception
#endif
{
+#pragma warning disable 169
#region Sync with object-internals.h
IntPtr [] trace_ips;
Exception inner_exception;
@@ -65,6 +66,7 @@ namespace System
string source;
IDictionary _data;
#endregion
+#pragma warning restore 169
public Exception ()
{
diff --git a/mcs/class/corlib/System/MonoAsyncCall.cs b/mcs/class/corlib/System/MonoAsyncCall.cs
index 1c76e9125c3..5de35956f3e 100644
--- a/mcs/class/corlib/System/MonoAsyncCall.cs
+++ b/mcs/class/corlib/System/MonoAsyncCall.cs
@@ -35,6 +35,8 @@
namespace System {
+#pragma warning disable 169
+
internal class MonoAsyncCall {
#region Sync with the unmanaged ASyncCall structure
object msg;
@@ -46,6 +48,9 @@ namespace System {
long wait_event;
#endregion
}
+
+#pragma warning restore 169
+
}
diff --git a/mcs/class/corlib/System/MonoListItem.cs b/mcs/class/corlib/System/MonoListItem.cs
index 6a2b8511c39..e4846ef92b7 100644
--- a/mcs/class/corlib/System/MonoListItem.cs
+++ b/mcs/class/corlib/System/MonoListItem.cs
@@ -33,6 +33,8 @@
namespace System {
+#pragma warning disable 169
+
/*
* This class represents an item of a list to be used for
* holding managed objects in the runtime.
@@ -42,4 +44,7 @@ namespace System {
object data;
}
+
+#pragma warning disable 169
+
}
diff --git a/mcs/class/corlib/System/Nullable.cs b/mcs/class/corlib/System/Nullable.cs
index f8d49c3e6a0..9813659e01d 100644
--- a/mcs/class/corlib/System/Nullable.cs
+++ b/mcs/class/corlib/System/Nullable.cs
@@ -172,7 +172,7 @@ namespace System
//
// These are called by the JIT
//
-
+#pragma warning disable 169
//
// JIT implementation of box valuetype System.Nullable`1<T>
//
@@ -190,6 +190,7 @@ namespace System
return null;
return (T) o;
}
+#pragma warning restore 169
}
}
#endif
diff --git a/mcs/class/corlib/System/NumberFormatter.cs b/mcs/class/corlib/System/NumberFormatter.cs
index 90dec6c3734..39060087234 100644
--- a/mcs/class/corlib/System/NumberFormatter.cs
+++ b/mcs/class/corlib/System/NumberFormatter.cs
@@ -1554,11 +1554,6 @@ namespace System
#region StringBuilder formatting helpers
- private static void ZeroTrimEnd (StringBuilder sb)
- {
- ZeroTrimEnd (sb, false);
- }
-
private static void ZeroTrimEnd (StringBuilder sb, bool canEmpty)
{
int len = 0;
diff --git a/mcs/class/corlib/System/Object.cs b/mcs/class/corlib/System/Object.cs
index b7e463138a7..42e56f12444 100644
--- a/mcs/class/corlib/System/Object.cs
+++ b/mcs/class/corlib/System/Object.cs
@@ -141,6 +141,7 @@ namespace System {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern IntPtr obj_address ();
+#pragma warning disable 169
void FieldGetter (string typeName, string fieldName, ref object val)
{
/* never called */
@@ -150,5 +151,6 @@ namespace System {
{
/* never called */
}
+#pragma warning restore 169
}
}
diff --git a/mcs/class/corlib/System/String.cs b/mcs/class/corlib/System/String.cs
index a3b076ec4b0..a8e45b0a32e 100644
--- a/mcs/class/corlib/System/String.cs
+++ b/mcs/class/corlib/System/String.cs
@@ -2617,7 +2617,7 @@ namespace System
// Certain constructors are redirected to CreateString methods with
// matching argument list. The this pointer should not be used.
-
+#pragma warning disable 169
private unsafe String CreateString (sbyte* value)
{
if (value == null)
@@ -2786,6 +2786,7 @@ namespace System
}
return result;
}
+#pragma warning restore 169
/* helpers used by the runtime as well as above or eslewhere in corlib */
internal static unsafe void memset (byte *dest, int val, int len)
@@ -3016,26 +3017,26 @@ namespace System
[MethodImplAttribute (MethodImplOptions.InternalCall)]
public extern String (char c, int count);
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- private extern static string InternalJoin (string separator, string[] value, int sIndex, int count);
+// [MethodImplAttribute (MethodImplOptions.InternalCall)]
+// private extern static string InternalJoin (string separator, string[] value, int sIndex, int count);
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- private extern String InternalReplace (String oldValue, string newValue, CompareInfo comp);
+// [MethodImplAttribute (MethodImplOptions.InternalCall)]
+// private extern String InternalReplace (String oldValue, string newValue, CompareInfo comp);
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- private extern void InternalCopyTo (int sIndex, char[] dest, int destIndex, int count);
+// [MethodImplAttribute (MethodImplOptions.InternalCall)]
+// private extern void InternalCopyTo (int sIndex, char[] dest, int destIndex, int count);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern String[] InternalSplit (char[] separator, int count, int options);
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- private extern String InternalTrim (char[] chars, int typ);
+// [MethodImplAttribute (MethodImplOptions.InternalCall)]
+// private extern String InternalTrim (char[] chars, int typ);
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- private extern int InternalLastIndexOfAny (char [] anyOf, int sIndex, int count);
+// [MethodImplAttribute (MethodImplOptions.InternalCall)]
+// private extern int InternalLastIndexOfAny (char [] anyOf, int sIndex, int count);
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- private extern String InternalPad (int width, char chr, bool right);
+// [MethodImplAttribute (MethodImplOptions.InternalCall)]
+// private extern String InternalPad (int width, char chr, bool right);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal extern static String InternalAllocateStr (int length);
diff --git a/mcs/class/corlib/System/TermInfoDriver.cs b/mcs/class/corlib/System/TermInfoDriver.cs
index 6e1e560c718..782d68d2014 100644
--- a/mcs/class/corlib/System/TermInfoDriver.cs
+++ b/mcs/class/corlib/System/TermInfoDriver.cs
@@ -37,7 +37,7 @@ namespace System {
class TermInfoDriver : IConsoleDriver {
/* Do not rename this field, its looked up from the runtime */
static bool need_window_dimensions = true;
- static uint flag = 0xdeadbeef;
+ //static uint flag = 0xdeadbeef;
static string [] locations = { "/etc/terminfo", "/usr/share/terminfo", "/usr/lib/terminfo" };
TermInfoReader reader;
@@ -54,8 +54,6 @@ namespace System {
StreamReader stdin;
CStreamWriter stdout;
internal byte verase;
- byte vsusp;
- byte intr;
int windowWidth;
int windowHeight;
@@ -200,6 +198,8 @@ namespace System {
if (resetColors != null)
endString += resetColors;
+ byte vsusp;
+ byte intr;
if (!ConsoleDriver.TtySetup (keypadXmit, endString, out verase, out vsusp, out intr))
throw new IOException ("Error initializing terminal.");
diff --git a/mcs/class/corlib/System/TermInfoReader.cs b/mcs/class/corlib/System/TermInfoReader.cs
index 67bcf2ab099..4f6eb4123f0 100644
--- a/mcs/class/corlib/System/TermInfoReader.cs
+++ b/mcs/class/corlib/System/TermInfoReader.cs
@@ -72,13 +72,13 @@ namespace System {
//
class TermInfoReader {
- short nameSize;
+ //short nameSize;
short boolSize;
short numSize;
short strOffsets;
- short strSize;
+ //short strSize;
- string [] names; // Last one is the description
+ //string [] names; // Last one is the description
byte [] buffer;
int booleansOffset;
string term;
@@ -121,7 +121,7 @@ namespace System {
if (magic != 282)
throw new Exception (String.Format ("Magic number is wrong: {0}", magic));
- nameSize = GetInt16 (buffer, position);
+ /*nameSize =*/ GetInt16 (buffer, position);
position += 2;
boolSize = GetInt16 (buffer, position);
position += 2;
@@ -129,7 +129,7 @@ namespace System {
position += 2;
strOffsets = GetInt16 (buffer, position);
position += 2;
- strSize = GetInt16 (buffer, position);
+ /*strSize =*/ GetInt16 (buffer, position);
position += 2;
}
@@ -137,7 +137,7 @@ namespace System {
{
string prev = GetString (buffer, position);
position += prev.Length + 1;
- names = prev.Split ('|');
+ //names = prev.Split ('|');
}
public bool Get (TermInfoBooleans boolean)
diff --git a/mcs/class/corlib/System/TypedReference.cs b/mcs/class/corlib/System/TypedReference.cs
index 45f40ce1e44..daabc74ffca 100644
--- a/mcs/class/corlib/System/TypedReference.cs
+++ b/mcs/class/corlib/System/TypedReference.cs
@@ -41,9 +41,11 @@ namespace System
#endif
public struct TypedReference
{
+#pragma warning disable 169
RuntimeTypeHandle type;
IntPtr value;
IntPtr klass;
+#pragma warning restore 169
public override bool Equals (object o)
{
diff --git a/mcs/class/corlib/System/WindowsConsoleDriver.cs b/mcs/class/corlib/System/WindowsConsoleDriver.cs
index 23c21e86635..8b614ec27b7 100644
--- a/mcs/class/corlib/System/WindowsConsoleDriver.cs
+++ b/mcs/class/corlib/System/WindowsConsoleDriver.cs
@@ -35,6 +35,7 @@ namespace System {
public bool Visible;
}
+#pragma warning disable 169
struct InputRecord {
public short EventType;
// This is KEY_EVENT_RECORD
@@ -48,6 +49,7 @@ namespace System {
bool pad2;
//
}
+#pragma warning restore 169
struct CharInfo {
public char Character;
@@ -98,7 +100,6 @@ namespace System {
IntPtr inputHandle;
IntPtr outputHandle;
short defaultAttribute;
- bool inited;
public WindowsConsoleDriver ()
{
diff --git a/mcs/class/corlib/System/__ComObject.cs b/mcs/class/corlib/System/__ComObject.cs
index acfd093db96..46a23abf9c3 100644
--- a/mcs/class/corlib/System/__ComObject.cs
+++ b/mcs/class/corlib/System/__ComObject.cs
@@ -52,10 +52,12 @@ namespace System
internal class __ComObject : MarshalByRefObject
{
+#pragma warning disable 169
#region Sync with object-internals.h
IntPtr iunknown;
IntPtr hash_table;
#endregion
+#pragma warning restore 169
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal static extern __ComObject CreateRCW (Type t);