From 8c7e0829200a3bac3950e92579e14c9b179829d6 Mon Sep 17 00:00:00 2001 From: Sil3ntStorm Date: Mon, 13 Sep 2021 21:27:49 +0200 Subject: [PATCH] Fix warning about unary minus operator (#8929) --- src/google/protobuf/compiler/parser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/protobuf/compiler/parser.cc b/src/google/protobuf/compiler/parser.cc index afe9d4ff08..49ddfceb1a 100644 --- a/src/google/protobuf/compiler/parser.cc +++ b/src/google/protobuf/compiler/parser.cc @@ -1549,7 +1549,7 @@ bool Parser::ParseOption(Message* options, value_location.AddPath( UninterpretedOption::kNegativeIntValueFieldNumber); uninterpreted_option->set_negative_int_value( - static_cast(-value)); + static_cast(0 - value)); } else { value_location.AddPath( UninterpretedOption::kPositiveIntValueFieldNumber);