diff options
author | Marek Safar <marek.safar@gmail.com> | 2012-02-16 21:10:57 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2012-02-17 16:37:25 +0400 |
commit | 2869713c48b2275b7d4f6865fafd3e04ee585b59 (patch) | |
tree | ca01cbbbe902fb6eb5b4fe34257222e818a34957 /mcs/class/System.ServiceModel.Web | |
parent | 76dac96b4b953a6a1b795ee20b2bb0dab35e60df (diff) |
Fix some compiler warnings
Diffstat (limited to 'mcs/class/System.ServiceModel.Web')
-rw-r--r-- | mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs index 84016a99028..cb382e59519 100644 --- a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs +++ b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs @@ -12,14 +12,14 @@ namespace System.Runtime.Serialization.Json { TextReader r; int line = 1, column = 0; - bool raise_on_number_error; // FIXME: use it +// bool raise_on_number_error; // FIXME: use it public JavaScriptReader (TextReader reader, bool raiseOnNumberError) { if (reader == null) throw new ArgumentNullException ("reader"); this.r = reader; - raise_on_number_error = raiseOnNumberError; +// raise_on_number_error = raiseOnNumberError; } public object Read () @@ -228,11 +228,10 @@ namespace System.Runtime.Serialization.Json int exp = 0; if (PeekChar () < 0) throw new ArgumentException ("Invalid JSON numeric literal; incomplete exponent"); - bool negexp = false; + c = PeekChar (); if (c == '-') { ReadChar (); - negexp = true; } else if (c == '+') ReadChar (); @@ -326,9 +325,8 @@ namespace System.Runtime.Serialization.Json void Expect (string expected) { - int c; for (int i = 0; i < expected.Length; i++) - if ((c = ReadChar ()) != expected [i]) + if (ReadChar () != expected [i]) throw JsonError (String.Format ("Expected '{0}', differed at {1}", expected, i)); } |