Commit b978fc02 by Abseil Team Committed by Andy Getzendanner

Export of internal Abseil changes

--
ef529b5fc5d72de02c145ae6643af0465090252b by Abseil Team <absl-team@google.com>:

Fix typo in comment (foo -> i).

PiperOrigin-RevId: 334894645

--
18aab6f6c71e6abd83d467dbf8868df24100e710 by Abseil Team <absl-team@google.com>:

Fix -Wno-sign-compare error

PiperOrigin-RevId: 334837327
GitOrigin-RevId: ef529b5fc5d72de02c145ae6643af0465090252b
Change-Id: Ieeedf1a4fd458eb38ffbda0ca77a47021b510043
parent 093cc276
...@@ -77,8 +77,8 @@ bool Symbolize(const void* pc, char* out, int out_size) { ...@@ -77,8 +77,8 @@ bool Symbolize(const void* pc, char* out, int out_size) {
char tmp_buf[1024]; char tmp_buf[1024];
if (debugging_internal::Demangle(symbol.c_str(), tmp_buf, sizeof(tmp_buf))) { if (debugging_internal::Demangle(symbol.c_str(), tmp_buf, sizeof(tmp_buf))) {
int len = strlen(tmp_buf); size_t len = strlen(tmp_buf);
if (len + 1 <= out_size) { // +1 for '\0' if (len + 1 <= static_cast<size_t>(out_size)) { // +1 for '\0'
assert(len < sizeof(tmp_buf)); assert(len < sizeof(tmp_buf));
memmove(out, tmp_buf, len + 1); memmove(out, tmp_buf, len + 1);
} }
......
...@@ -145,7 +145,8 @@ class FlagHelpPrettyPrinter { ...@@ -145,7 +145,8 @@ class FlagHelpPrettyPrinter {
} }
// Write the token, ending the string first if necessary/possible. // Write the token, ending the string first if necessary/possible.
if (!new_line && (line_len_ + token.size() >= max_line_len_)) { if (!new_line &&
(line_len_ + static_cast<int>(token.size()) >= max_line_len_)) {
EndLine(); EndLine();
new_line = true; new_line = true;
} }
......
...@@ -129,7 +129,7 @@ class ABSL_MUST_USE_RESULT StatusOr; ...@@ -129,7 +129,7 @@ class ABSL_MUST_USE_RESULT StatusOr;
// Example: // Example:
// //
// absl::StatusOr<int> i = GetCount(); // absl::StatusOr<int> i = GetCount();
// if (foo.ok()) { // if (i.ok()) {
// updated_total += *i // updated_total += *i
// } // }
// //
......
...@@ -405,7 +405,7 @@ strings_internal::ParsedFloat ParseFloat(const char* begin, const char* end, ...@@ -405,7 +405,7 @@ strings_internal::ParsedFloat ParseFloat(const char* begin, const char* end,
} }
exponent_adjustment -= static_cast<int>(zeros_skipped); exponent_adjustment -= static_cast<int>(zeros_skipped);
} }
std::size_t post_decimal_digits = ConsumeDigits<base>( int64_t post_decimal_digits = ConsumeDigits<base>(
begin, end, digits_left, &mantissa, &mantissa_is_inexact); begin, end, digits_left, &mantissa, &mantissa_is_inexact);
begin += post_decimal_digits; begin += post_decimal_digits;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment