From ac29e8a94f796923fe0b42ff5eb644e137ba7d77 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Thu, 10 Sep 2020 17:53:00 +0000 Subject: [PATCH] librt: tests: fix minor issues with higher WARNS got_sigalrm is a global with external linkage and must therefore have a previous extern declaration. There's no reason to maintain the status quo there, so just make it static. The result var is unused. This part of the test has not been upstreamed, presumably because it exists solely for sem_clockwait_np. We should perhaps consider moving it into its own test file outside of ^/contrib/netbsd-tests, but this can happen later. MFC after: 1 week --- contrib/netbsd-tests/lib/librt/t_sem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/netbsd-tests/lib/librt/t_sem.c b/contrib/netbsd-tests/lib/librt/t_sem.c index 4bf379bd1fb1..5e059238f278 100644 --- a/contrib/netbsd-tests/lib/librt/t_sem.c +++ b/contrib/netbsd-tests/lib/librt/t_sem.c @@ -190,7 +190,7 @@ timespec_add_ms(struct timespec *ts, int ms) } } -volatile sig_atomic_t got_sigalrm = 0; +static volatile sig_atomic_t got_sigalrm = 0; static void sigalrm_handler(int sig __unused) @@ -212,7 +212,6 @@ ATF_TC_BODY(timedwait, tc) { struct timespec ts; sem_t sem; - int result; SEM_REQUIRE(sem_init(&sem, 0, 0)); SEM_REQUIRE(sem_post(&sem));