|
From: Paul F. <pa...@so...> - 2023-02-03 12:51:12
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=cdabd4ba74ea653515a1bf9a6e9067f3179c2d54 commit cdabd4ba74ea653515a1bf9a6e9067f3179c2d54 Author: Paul Floyd <pj...@wa...> Date: Fri Feb 3 13:48:22 2023 +0100 Regtest: foix warning from drd test pth_mutex_signal.c GCC on RHEL 7.6 ARM complains about the empty init list. I also noticed that we are using the SA_NOTIFY form of sigaction (with that union member and handler prototype) but not setting the SA_NOTIFY flag. Seems harmless in this case as we don't use the siginfo or context. Diff: --- drd/tests/pth_mutex_signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drd/tests/pth_mutex_signal.c b/drd/tests/pth_mutex_signal.c index 38fafdba8a..916afdfe59 100644 --- a/drd/tests/pth_mutex_signal.c +++ b/drd/tests/pth_mutex_signal.c @@ -42,12 +42,12 @@ int main () pthread_mutexattr_t mutex_attr; pthread_attr_t thread_attr_contender; pthread_t contender; - struct sigaction signalAction = { }; + struct sigaction signalAction; // install signal handler signalAction.sa_sigaction = nullHandler; sigfillset(&signalAction.sa_mask); - signalAction.sa_flags = 0; + signalAction.sa_flags = SA_SIGINFO; sigaction(SIGINT, &signalAction, NULL); // initialize the mutex |