aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2017-05-08 11:56:18 -0700
committerGitHub <noreply@github.com>2017-05-08 11:56:18 -0700
commitd22493b6f60644e7b947864162727446ce5c0ad5 (patch)
treeb22508fe6dc4dab4f3c0c1e4c84793b8c53a597d
parent3c369dc07cd0b5fa5b874e42af6191f518ee4bae (diff)
parente062f70c6d2e981686caa39e44701f7aaa6c66ed (diff)
downloadprotobuf-d22493b6f60644e7b947864162727446ce5c0ad5.tar.gz
protobuf-d22493b6f60644e7b947864162727446ce5c0ad5.tar.bz2
protobuf-d22493b6f60644e7b947864162727446ce5c0ad5.zip
Merge pull request #3064 from randomguy3/offset-type
Fix offset type macro to match the tables it is used in
-rw-r--r--src/google/protobuf/generated_message_util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/generated_message_util.h b/src/google/protobuf/generated_message_util.h
index 44174466..b9654ece 100644
--- a/src/google/protobuf/generated_message_util.h
+++ b/src/google/protobuf/generated_message_util.h
@@ -100,7 +100,7 @@ namespace internal {
// choose 16 rather than some other number just in case the compiler would
// be confused by an unaligned pointer.
#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TYPE, FIELD) \
- static_cast<int>( \
+ static_cast< ::google::protobuf::uint32>( \
reinterpret_cast<const char*>( \
&reinterpret_cast<const TYPE*>(16)->FIELD) - \
reinterpret_cast<const char*>(16))