aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc
diff options
context:
space:
mode:
authorAdam Cozzette <acozzette@google.com>2016-11-22 15:44:54 -0800
committerAdam Cozzette <acozzette@google.com>2016-11-22 16:23:55 -0800
commitdb35fe735a6522089250a0a0804fb1fd18340666 (patch)
tree7b1532068eeadef058e1b5bf40056cbebfcee727 /src/google/protobuf/compiler/cpp/cpp_primitive_field.cc
parenta7f300d6ffe2fbc6bdd10495efedbe6c86a29f49 (diff)
downloadprotobuf-db35fe735a6522089250a0a0804fb1fd18340666.tar.gz
protobuf-db35fe735a6522089250a0a0804fb1fd18340666.tar.bz2
protobuf-db35fe735a6522089250a0a0804fb1fd18340666.zip
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.
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_primitive_field.cc')
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_primitive_field.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc b/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc
index 889271e9..240a6e0a 100644
--- a/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc
@@ -360,7 +360,7 @@ GenerateMergeFromCodedStream(io::Printer* printer) const {
printer->Print(variables_,
"DO_((::google::protobuf::internal::WireFormatLite::$repeated_reader$<\n"
" $type$, $wire_format_field_type$>(\n"
- " $tag_size$, $tag$, input, this->mutable_$name$())));\n");
+ " $tag_size$, $tag$u, input, this->mutable_$name$())));\n");
}
void RepeatedPrimitiveFieldGenerator::