diff options
author | Abseil Team <absl-team@google.com> | 2022-10-13 14:12:39 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-10-13 14:13:57 -0700 |
commit | f073fe8ee5dcb0aa18c893198747062f2f51ab59 (patch) | |
tree | fa473e3a4a77146484d19b456371452418e4a297 /absl/strings/internal | |
parent | cbaba1a9bfdc8900e0d360e87d2fee137f6f7d9e (diff) |
Fix "unsafe narrowing" warnings in absl, 12/12.
Addresses failures with the following, in some files:
-Wshorten-64-to-32
-Wimplicit-int-conversion
-Wsign-compare
-Wsign-conversion
-Wtautological-unsigned-zero-compare
(This specific CL enables these warnings and fixes the remaining known issues.)
Bug: chromium:1292951
PiperOrigin-RevId: 480981210
Change-Id: I92d5023c6833e24d6aa29b10d433116329972f41
Diffstat (limited to 'absl/strings/internal')
-rw-r--r-- | absl/strings/internal/cord_internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/strings/internal/cord_internal.h b/absl/strings/internal/cord_internal.h index eca747c8..fcca3a28 100644 --- a/absl/strings/internal/cord_internal.h +++ b/absl/strings/internal/cord_internal.h @@ -591,7 +591,7 @@ class InlineData { // See the documentation on 'as_chars()' for more information and examples. void set_inline_size(size_t size) { ABSL_ASSERT(size <= kMaxInline); - tag() = static_cast<char>(size << 1); + tag() = static_cast<int8_t>(size << 1); } // Compares 'this' inlined data with rhs. The comparison is a straightforward |