diff options
author | Abseil Team <absl-team@google.com> | 2022-09-08 12:21:40 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-09-08 12:22:28 -0700 |
commit | 69199fcebe806a49a21992575b5227ee432f6917 (patch) | |
tree | 9013b1e4fc06bd7fa9a7d69ecdb9739eb184cfb8 /absl/debugging/failure_signal_handler.cc | |
parent | 518984e432e0597fd4e66a9c52148e8dec2bb46a (diff) |
Fix "unsafe narrowing" warnings in absl, 9/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 miscellaneous non-test source files.)
Bug: chromium:1292951
PiperOrigin-RevId: 473054605
Change-Id: Ifd7b24966613ca915511a3a607095508068200b8
Diffstat (limited to 'absl/debugging/failure_signal_handler.cc')
-rw-r--r-- | absl/debugging/failure_signal_handler.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc index b127a981..5e8f0b05 100644 --- a/absl/debugging/failure_signal_handler.cc +++ b/absl/debugging/failure_signal_handler.cc @@ -135,7 +135,7 @@ static bool SetupAlternateStackOnce() { #if defined(__wasm__) || defined (__asjms__) const size_t page_mask = getpagesize() - 1; #else - const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; + 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; @@ -356,7 +356,7 @@ static void AbslFailureSignalHandler(int signo, siginfo_t*, void* ucontext) { if (fsh_options.alarm_on_failure_secs > 0) { alarm(0); // Cancel any existing alarms. signal(SIGALRM, ImmediateAbortSignalHandler); - alarm(fsh_options.alarm_on_failure_secs); + alarm(static_cast<unsigned int>(fsh_options.alarm_on_failure_secs)); } #endif |