diff options
author | Adam Cozzette <acozzette@google.com> | 2017-03-02 11:31:38 -0800 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2017-03-02 11:31:38 -0800 |
commit | 938206d66cd8da71e4b0e816f9e8444b44cdd0a8 (patch) | |
tree | 13a27cc7e4aad94d1922c65cb8ede3d0ce7c43fc /src/google | |
parent | a7e3b0ab016312f7427426d2cb88b0ab77210b79 (diff) | |
download | protobuf-938206d66cd8da71e4b0e816f9e8444b44cdd0a8.tar.gz protobuf-938206d66cd8da71e4b0e816f9e8444b44cdd0a8.tar.bz2 protobuf-938206d66cd8da71e4b0e816f9e8444b44cdd0a8.zip |
Return uint32 from Log2FloorNonZero64
A uint32 is big enough to hold any return value from that function, and
doing it this way prevents compiler warnings in coded_stream.h about
narrowing a uint64 to a uint32.
Diffstat (limited to 'src/google')
-rw-r--r-- | src/google/protobuf/stubs/port.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h index d37e8130..6f0633c4 100644 --- a/src/google/protobuf/stubs/port.h +++ b/src/google/protobuf/stubs/port.h @@ -358,7 +358,7 @@ class Bits { #endif } - static uint64 Log2FloorNonZero64(uint64 n) { + static uint32 Log2FloorNonZero64(uint64 n) { #if defined(__GNUC__) return 63 ^ __builtin_clzll(n); #else |