THRIFT-1709 Warning "Bitwise-or operator used on a sign-extended operand; consider...
authorJens Geyer <jensg@apache.org>
Sat, 6 Jul 2013 07:28:49 +0000 (09:28 +0200)
committerJens Geyer <jensg@apache.org>
Sat, 6 Jul 2013 07:30:30 +0000 (09:30 +0200)
Patch: Jens Geyer

lib/csharp/src/Protocol/TBinaryProtocol.cs

index 27c2c94..e16b837 100644 (file)
@@ -341,12 +341,14 @@ namespace Thrift.Protocol
                {
                        ReadAll(i32in, 0, 4);
                        return (int)(((i32in[0] & 0xff) << 24) | ((i32in[1] & 0xff) << 16) | ((i32in[2] & 0xff) << 8) | ((i32in[3] & 0xff)));
-               }
-
-               private byte[] i64in = new byte[8];
+               }\r
+\r
+#pragma warning disable 675\r
+\r
+        private byte[] i64in = new byte[8];
                public override long ReadI64()
                {
-                       ReadAll(i64in, 0, 8);
+                       ReadAll(i64in, 0, 8);\r
             unchecked {
               return (long)(
                   ((long)(i64in[0] & 0xff) << 56) |
@@ -358,9 +360,11 @@ namespace Thrift.Protocol
                   ((long)(i64in[6] & 0xff) << 8) |
                   ((long)(i64in[7] & 0xff)));
             }
-        }
-
-               public override double ReadDouble()
+        }\r
+\r
+#pragma warning restore 675\r
+\r
+        public override double ReadDouble()
                {
 #if !SILVERLIGHT
                        return BitConverter.Int64BitsToDouble(ReadI64());