From d9382f72901dd2bd40d38834eb591cea784e90e5 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 29 Aug 2022 14:14:51 -0700 Subject: Fix "unsafe narrowing" warnings in absl, 7/n. 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 focuses on .cc files in debugging/internal/.) Bug: chromium:1292951 PiperOrigin-RevId: 470812243 Change-Id: I5578030bb42ba73cb83d4df84f89e431ceac8992 --- absl/debugging/internal/address_is_readable.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'absl/debugging/internal/address_is_readable.cc') diff --git a/absl/debugging/internal/address_is_readable.cc b/absl/debugging/internal/address_is_readable.cc index 4be6256b..91eaa76f 100644 --- a/absl/debugging/internal/address_is_readable.cc +++ b/absl/debugging/internal/address_is_readable.cc @@ -52,7 +52,7 @@ namespace debugging_internal { bool AddressIsReadable(const void *addr) { // Align address on 8-byte boundary. On aarch64, checking last // byte before inaccessible page returned unexpected EFAULT. - const uintptr_t u_addr = reinterpret_cast(addr) & ~7; + const uintptr_t u_addr = reinterpret_cast(addr) & ~uintptr_t{7}; addr = reinterpret_cast(u_addr); // rt_sigprocmask below will succeed for this input. -- cgit v1.2.3