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
This commit is contained in:
Kyle Evans 2020-09-10 17:53:00 +00:00
parent 3c13467099
commit ac29e8a94f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365602

View File

@ -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));