diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2020-09-10 17:53:00 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2020-09-10 17:53:00 +0000 |
commit | ac29e8a94f796923fe0b42ff5eb644e137ba7d77 (patch) | |
tree | 10dea2d268e4c0ac195fc791cafca6f9c66ec84a /contrib/netbsd-tests | |
parent | 3c134670993bf525fcd6c4dfef84a3dfc3d4ed1b (diff) | |
download | src-test2-ac29e8a94f796923fe0b42ff5eb644e137ba7d77.tar.gz src-test2-ac29e8a94f796923fe0b42ff5eb644e137ba7d77.zip |
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
Notes
Notes:
svn path=/head/; revision=365602
Diffstat (limited to 'contrib/netbsd-tests')
-rw-r--r-- | contrib/netbsd-tests/lib/librt/t_sem.c | 3 |
1 files changed, 1 insertions, 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)); |