[Libreoffice-commits] online.git: common/Seccomp.cpp
Tor Lillqvist
tml at collabora.com
Thu Jul 19 09:55:42 UTC 2018
common/Seccomp.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 3352603011bda73b201992d5b491040050ea5ff4
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Jul 19 12:17:46 2018 +0300
Avoid cast that causes gcc warning
gcc 8 warns: cast between incompatible function types from ‘void
(*)(int, siginfo_t*, void*)’ to ‘__sighandler_t’ {aka ‘void (*)(int’}
[-Werror=cast-function-type].
The struct sigaction already has an appropriately typed field
sa_sigaction in a union with the sa_handler field, so use that. (If
that is not present in some older Linux and/or glibc that we still
need to support, this commit will have to be reverted then.)
Change-Id: I67667073c89b7b22e7de1933ccaaa60868685866
diff --git a/common/Seccomp.cpp b/common/Seccomp.cpp
index e65e8b4ac..3f363923a 100644
--- a/common/Seccomp.cpp
+++ b/common/Seccomp.cpp
@@ -206,7 +206,7 @@ bool lockdown(Type type)
sigemptyset(&action.sa_mask);
action.sa_flags = SA_SIGINFO;
- action.sa_handler = reinterpret_cast<__sighandler_t>(handleSysSignal);
+ action.sa_sigaction = handleSysSignal;
sigaction(SIGSYS, &action, nullptr);
More information about the Libreoffice-commits
mailing list