summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--absl/debugging/symbolize_darwin.inc4
-rw-r--r--absl/flags/internal/usage.cc3
-rw-r--r--absl/status/statusor.h2
-rw-r--r--absl/strings/internal/charconv_parse.cc2
4 files changed, 6 insertions, 5 deletions
diff --git a/absl/debugging/symbolize_darwin.inc b/absl/debugging/symbolize_darwin.inc
index cdadd40e..443ce9ef 100644
--- a/absl/debugging/symbolize_darwin.inc
+++ b/absl/debugging/symbolize_darwin.inc
@@ -77,8 +77,8 @@ bool Symbolize(const void* pc, char* out, int out_size) {
char tmp_buf[1024];
if (debugging_internal::Demangle(symbol.c_str(), tmp_buf, sizeof(tmp_buf))) {
- int len = strlen(tmp_buf);
- if (len + 1 <= out_size) { // +1 for '\0'
+ size_t len = strlen(tmp_buf);
+ if (len + 1 <= static_cast<size_t>(out_size)) { // +1 for '\0'
assert(len < sizeof(tmp_buf));
memmove(out, tmp_buf, len + 1);
}
diff --git a/absl/flags/internal/usage.cc b/absl/flags/internal/usage.cc
index 0805df31..75573227 100644
--- a/absl/flags/internal/usage.cc
+++ b/absl/flags/internal/usage.cc
@@ -145,7 +145,8 @@ class FlagHelpPrettyPrinter {
}
// 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();
new_line = true;
}
diff --git a/absl/status/statusor.h b/absl/status/statusor.h
index bdf6039d..0bbf6ef2 100644
--- a/absl/status/statusor.h
+++ b/absl/status/statusor.h
@@ -129,7 +129,7 @@ class ABSL_MUST_USE_RESULT StatusOr;
// Example:
//
// absl::StatusOr<int> i = GetCount();
-// if (foo.ok()) {
+// if (i.ok()) {
// updated_total += *i
// }
//
diff --git a/absl/strings/internal/charconv_parse.cc b/absl/strings/internal/charconv_parse.cc
index fd6d9480..a368845f 100644
--- a/absl/strings/internal/charconv_parse.cc
+++ b/absl/strings/internal/charconv_parse.cc
@@ -405,7 +405,7 @@ strings_internal::ParsedFloat ParseFloat(const char* begin, const char* end,
}
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 += post_decimal_digits;