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/debugging/failure_signal_handler.cc | |
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/debugging/failure_signal_handler.cc')
-rw-r--r-- | absl/debugging/failure_signal_handler.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc index 5e8f0b05..ef8ab9e5 100644 --- a/absl/debugging/failure_signal_handler.cc +++ b/absl/debugging/failure_signal_handler.cc @@ -138,7 +138,8 @@ static bool SetupAlternateStackOnce() { const size_t page_mask = static_cast<size_t>(sysconf(_SC_PAGESIZE)) - 1; #endif size_t stack_size = - (std::max<size_t>(SIGSTKSZ, 65536) + page_mask) & ~page_mask; + (std::max(static_cast<size_t>(SIGSTKSZ), size_t{65536}) + page_mask) & + ~page_mask; #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) // Account for sanitizer instrumentation requiring additional stack space. |