From 755fad2f2601938901cd1e6650ff439e03ebf265 Mon Sep 17 00:00:00 2001 From: Ben Huntsman Date: Sat, 7 Dec 2024 10:44:11 -0800 Subject: [PATCH] lwp: Declare LWP_TerminateProcessSupport When building rw in src/lwp, some compilers throw a warning that LWP_TerminateProcessSupport is not declared. Here is an example: /opt/IBM/openxlC/17.1.0/bin/ibm-clang -g -O -I/home/build/openafs/src/config -I/home/build/openafs/include -I. -I. -o rw.o -c rw.c rw.c:242:5: warning: implicit declaration of function 'LWP_TerminateProcessSupport' is invalid in C99 [-Wimplicit-function-declaration] LWP_TerminateProcessSupport(); ^ 1 warning generated. Declare LWP_TerminateProcessSupport in lwp.h. Also update the function signatures in src/lwp/lwp_nt.c and src/lwp/test/testlwp.c to match. Change-Id: I86c016d7e6000dc341d8cf314173fc55f0a77331 Reviewed-on: https://gerrit.openafs.org/15979 Tested-by: BuildBot Reviewed-by: Cheyenne Wills Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie --- src/lwp/lwp.h | 2 ++ src/lwp/lwp_nt.c | 2 +- src/lwp/test/testlwp.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lwp/lwp.h b/src/lwp/lwp.h index 4e44319d92..6377e794e4 100644 --- a/src/lwp/lwp.h +++ b/src/lwp/lwp.h @@ -259,6 +259,7 @@ extern int LWP_WaitProcess(void *event); extern int LWP_INTERNALSIGNAL(void *event, int yield); extern int LWP_QWait(void); extern int LWP_QSignal(PROCESS pid); +extern int LWP_TerminateProcessSupport(void); #else extern int LWP_CurrentProcess(PROCESS * pid); extern int LWP_INTERNALSIGNAL(void *event, int yield); @@ -271,6 +272,7 @@ extern int LWP_WaitProcess(void *event); extern PROCESS LWP_ThreadId(void); extern int LWP_QWait(void); extern int LWP_QSignal(PROCESS pid); +extern int LWP_TerminateProcessSupport(void); #endif #ifdef AFS_SUN5_ENV diff --git a/src/lwp/lwp_nt.c b/src/lwp/lwp_nt.c index b7ee4e9ea9..f8e8aa3278 100644 --- a/src/lwp/lwp_nt.c +++ b/src/lwp/lwp_nt.c @@ -389,7 +389,7 @@ int LWP_INTERNALSIGNAL(void *event, int yield) return LWP_EINIT; } -int LWP_TerminateProcessSupport() /* terminate all LWP support */ +int LWP_TerminateProcessSupport(void) /* terminate all LWP support */ { int i; diff --git a/src/lwp/test/testlwp.c b/src/lwp/test/testlwp.c index 877b5cd99e..1c188d60f4 100644 --- a/src/lwp/test/testlwp.c +++ b/src/lwp/test/testlwp.c @@ -323,7 +323,7 @@ int LWP_INTERNALSIGNAL(event, yield) /* signal the occurence of an event */ return LWP_EINIT; } -int LWP_TerminateProcessSupport() /* terminate all LWP support */ +int LWP_TerminateProcessSupport(void) /* terminate all LWP support */ { int pc; int i;