From db35fe735a6522089250a0a0804fb1fd18340666 Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Tue, 22 Nov 2016 15:44:54 -0800 Subject: Add a "u" suffix to tag numbers in generated code This seems to be necessary to prevent warnings in some compiler configurations, particularly for tag numbers that are too large to fit in a signed 32-bit int. --- src/google/protobuf/duration.pb.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/google/protobuf/duration.pb.cc') diff --git a/src/google/protobuf/duration.pb.cc b/src/google/protobuf/duration.pb.cc index 31bd055a..12135b80 100644 --- a/src/google/protobuf/duration.pb.cc +++ b/src/google/protobuf/duration.pb.cc @@ -210,13 +210,13 @@ bool Duration::MergePartialFromCodedStream( ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Duration) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // int64 seconds = 1; case 1: { - if (tag == 8) { + if (tag == 8u) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( @@ -229,7 +229,7 @@ bool Duration::MergePartialFromCodedStream( // int32 nanos = 2; case 2: { - if (tag == 16) { + if (tag == 16u) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( -- cgit v1.2.3