[all-commits] [llvm/llvm-project] 53558e: sanitizer_common: fix SIG_DFL warning
Dmitry Vyukov via All-commits
all-commits at lists.llvm.org
Tue May 11 22:23:41 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 53558ed8a0abaf2f457cfa3d98c85d0fa1e84b22
https://github.com/llvm/llvm-project/commit/53558ed8a0abaf2f457cfa3d98c85d0fa1e84b22
Author: Dmitry Vyukov <dvyukov at google.com>
Date: 2021-05-12 (Wed, 12 May 2021)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp
Log Message:
-----------
sanitizer_common: fix SIG_DFL warning
Currently we have:
sanitizer_posix_libcdep.cpp:146:27: warning: cast between incompatible
function types from ‘__sighandler_t’ {aka ‘void (*)(int)’} to ‘sa_sigaction_t’
146 | sigact.sa_sigaction = (sa_sigaction_t)SIG_DFL;
We don't set SA_SIGINFO, so we need to assign to sa_handler.
And SIG_DFL is meant for sa_handler, so this gets rid of both
compiler warning, type cast and potential runtime misbehavior.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D102162
More information about the All-commits
mailing list