valgrind/0010-none-tests-bug234814.c-sa_handler-take-an-int-as-arg.patch
Mark Wielaard fe2c89f5ec 3.24.0-2 - Add VALGRIND_3_24_BRANCH patches
Resolves: RHEL-67029
Resolve gating test results for valgrind-3.24.0 rhel9
2024-11-27 01:03:41 +01:00

35 lines
1.0 KiB
Diff

From 53d667789d369042b1fe45f72102ecb5c16e5d12 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sat, 23 Nov 2024 22:59:21 +0100
Subject: [PATCH 10/11] none/tests/bug234814.c: sa_handler take an int as
argument
GCC15 will turn this warning into an error:
bug234814.c: In function 'main':
bug234814.c:20:18: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
20 | sa.sa_handler = mysigbus;
| ^
(cherry picked from commit 8f6cef269b91739f6a2e7f3b4b1e0a429db3e748)
---
none/tests/bug234814.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/none/tests/bug234814.c b/none/tests/bug234814.c
index 16b561fde6b0..11e0f6779162 100644
--- a/none/tests/bug234814.c
+++ b/none/tests/bug234814.c
@@ -9,7 +9,7 @@ const char kSigbus[] = "I caught the SIGBUS signal!\n";
int GLOB = 3;
-void mysigbus() {
+void mysigbus(int signum) {
write(1, kSigbus, sizeof(kSigbus)-1);
GLOB--;
return;
--
2.47.0