Date: Thu, 10 Sep 2020 17:53:00 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365602 - head/contrib/netbsd-tests/lib/librt Message-ID: <202009101753.08AHr02P042210@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Thu Sep 10 17:53:00 2020 New Revision: 365602 URL: https://svnweb.freebsd.org/changeset/base/365602 Log: 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 Modified: head/contrib/netbsd-tests/lib/librt/t_sem.c Modified: head/contrib/netbsd-tests/lib/librt/t_sem.c ============================================================================== --- head/contrib/netbsd-tests/lib/librt/t_sem.c Thu Sep 10 17:49:21 2020 (r365601) +++ head/contrib/netbsd-tests/lib/librt/t_sem.c Thu Sep 10 17:53:00 2020 (r365602) @@ -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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009101753.08AHr02P042210>