aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/parser.cc
diff options
context:
space:
mode:
authorGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2010-04-23 19:15:05 +0000
committerGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2010-04-23 19:15:05 +0000
commit15b675eea572ed092d5f01148c9ebabf09186972 (patch)
tree7be4ebe49102e8c057c9e4af94c84630f80ced70 /src/google/protobuf/compiler/parser.cc
parentd09ab8538d5742a149095445c6880382b6b4408d (diff)
add cast to avoid compiler warning
Diffstat (limited to 'src/google/protobuf/compiler/parser.cc')
-rw-r--r--src/google/protobuf/compiler/parser.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/parser.cc b/src/google/protobuf/compiler/parser.cc
index 758f70dc..9fcb1314 100644
--- a/src/google/protobuf/compiler/parser.cc
+++ b/src/google/protobuf/compiler/parser.cc
@@ -720,7 +720,8 @@ bool Parser::ParseOptionAssignment(Message* options) {
is_negative ? static_cast<uint64>(kint64max) + 1 : kuint64max;
DO(ConsumeInteger64(max_value, &value, "Expected integer."));
if (is_negative) {
- uninterpreted_option->set_negative_int_value(-value);
+ uninterpreted_option->set_negative_int_value(
+ -static_cast<int64>(value));
} else {
uninterpreted_option->set_positive_int_value(value);
}