Updated Branches:
  refs/heads/master 049f5f337 -> 6b9e1c6a8

THRIFT-1709 Warning "Bitwise-or operator used on a sign-extended operand; 
consider casting to a smaller unsigned type first" in TBinaryProtocol.cs at 
ReadInt64()

Patch: Jens Geyer


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/ee353e6c
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/ee353e6c
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/ee353e6c

Branch: refs/heads/master
Commit: ee353e6c98f8c8712d43d626c483217a45a4089d
Parents: 049f5f3
Author: Jens Geyer <[email protected]>
Authored: Sat Jul 6 09:28:49 2013 +0200
Committer: Jens Geyer <[email protected]>
Committed: Sat Jul 6 09:30:30 2013 +0200

----------------------------------------------------------------------
 lib/csharp/src/Protocol/TBinaryProtocol.cs | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/ee353e6c/lib/csharp/src/Protocol/TBinaryProtocol.cs
----------------------------------------------------------------------
diff --git a/lib/csharp/src/Protocol/TBinaryProtocol.cs 
b/lib/csharp/src/Protocol/TBinaryProtocol.cs
index 27c2c94..e16b837 100644
--- a/lib/csharp/src/Protocol/TBinaryProtocol.cs
+++ b/lib/csharp/src/Protocol/TBinaryProtocol.cs
@@ -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];
+               }
+
+#pragma warning disable 675
+
+        private byte[] i64in = new byte[8];
                public override long ReadI64()
                {
-                       ReadAll(i64in, 0, 8);
+                       ReadAll(i64in, 0, 8);
             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()
+        }
+
+#pragma warning restore 675
+
+        public override double ReadDouble()
                {
 #if !SILVERLIGHT
                        return BitConverter.Int64BitsToDouble(ReadI64());

Reply via email to