diff options
author | Nick Drochak <nickd@mono-cvs.ximian.com> | 2002-10-15 19:03:24 +0400 |
---|---|---|
committer | Nick Drochak <nickd@mono-cvs.ximian.com> | 2002-10-15 19:03:24 +0400 |
commit | d7f6f3d82a1f3a2ffd71b83b57fb013d5c1878e2 (patch) | |
tree | 42b4c7c37df697be94f47bded94f11e5e0f86651 /mcs | |
parent | afa52b82c7e31d3df4532ef8ff67a8f3ba26a351 (diff) |
2002-10-15 Nick Drochak <ndrochak@gol.com>
* Enum.cs (Parse): Use unsigned casts to avoid compiler warnings.
svn path=/trunk/mcs/; revision=8286
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/corlib/System/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/corlib/System/Enum.cs | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog index a972b4b17f5..80f196240b4 100644 --- a/mcs/class/corlib/System/ChangeLog +++ b/mcs/class/corlib/System/ChangeLog @@ -1,3 +1,7 @@ +2002-10-15 Nick Drochak <ndrochak@gol.com> + + * Enum.cs (Parse): Use unsigned casts to avoid compiler warnings. + 2002-10-12 Nick Drochak <ndrochak@gol.com> * IntegerFormatter.cs: Fix compiler warnings. diff --git a/mcs/class/corlib/System/Enum.cs b/mcs/class/corlib/System/Enum.cs index 36ac0463e29..38e6cf67af3 100644 --- a/mcs/class/corlib/System/Enum.cs +++ b/mcs/class/corlib/System/Enum.cs @@ -251,13 +251,19 @@ namespace System { retVal |= (long)((byte)info.values.GetValue (i)); break; case TypeCode.SByte: - retVal |= (long)((SByte)info.values.GetValue (i)); + // use the unsigned version in the cast to avoid + // compiler warning + retVal |= (long)((byte)info.values.GetValue (i)); break; case TypeCode.Int16: - retVal |= (long)((short)info.values.GetValue (i)); + // use the unsigned version in the cast to avoid + // compiler warning + retVal |= (long)((ushort)info.values.GetValue (i)); break; case TypeCode.Int32: - retVal |= (long)((int)info.values.GetValue (i)); + // use the unsigned version in the cast to avoid + // compiler warning + retVal |= (long)((uint)info.values.GetValue (i)); break; case TypeCode.Int64: retVal |= (long)info.values.GetValue (i); |