From 628a2825f8dc0219964886e7cc3f7f519e3bd950 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Tue, 4 Jan 2022 18:04:19 -0800 Subject: Export of internal Abseil changes -- 04e8fdf6a37d31f9364ca0f70bf663ee972481c6 by Abseil Team : Another implicit sign conversion found and removed. PiperOrigin-RevId: 419718762 -- dbb6bca7d3cfa9ce79e70d0ed3d0354a4e3a0983 by Abseil Team : Fix sign conversions so that absl/status/status.h can compile with -Wconversion -Wsign-compare PiperOrigin-RevId: 419658075 GitOrigin-RevId: 04e8fdf6a37d31f9364ca0f70bf663ee972481c6 Change-Id: I18441488cc84f573c2818ee241c387e1953d5105 --- absl/strings/internal/cord_internal.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'absl/strings/internal') diff --git a/absl/strings/internal/cord_internal.h b/absl/strings/internal/cord_internal.h index b16c8fa5..776d1c40 100644 --- a/absl/strings/internal/cord_internal.h +++ b/absl/strings/internal/cord_internal.h @@ -462,8 +462,8 @@ class InlineData { // Requires the current instance to hold a tree value. CordzInfo* cordz_info() const { assert(is_tree()); - intptr_t info = - static_cast(absl::big_endian::ToHost64(as_tree_.cordz_info)); + intptr_t info = static_cast( + absl::big_endian::ToHost64(static_cast(as_tree_.cordz_info))); assert(info & 1); return reinterpret_cast(info - 1); } @@ -473,8 +473,9 @@ class InlineData { // Requires the current instance to hold a tree value. void set_cordz_info(CordzInfo* cordz_info) { assert(is_tree()); - intptr_t info = reinterpret_cast(cordz_info) | 1; - as_tree_.cordz_info = absl::big_endian::FromHost64(info); + uintptr_t info = reinterpret_cast(cordz_info) | 1; + as_tree_.cordz_info = + static_cast(absl::big_endian::FromHost64(info)); } // Resets the current cordz_info to null / empty. -- cgit v1.2.3