Module Name:    src
Committed By:   christos
Date:           Fri Jan 13 21:18:33 UTC 2017

Modified Files:
        src/tests/lib/libc/sys: t_select.c

Log Message:
PR/51861: Ngie Cooper: Sprinkle __unused, mark __dead, _exit().


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_select.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/sys/t_select.c
diff -u src/tests/lib/libc/sys/t_select.c:1.3 src/tests/lib/libc/sys/t_select.c:1.4
--- src/tests/lib/libc/sys/t_select.c:1.3	Sun Mar 18 03:00:52 2012
+++ src/tests/lib/libc/sys/t_select.c	Fri Jan 13 16:18:33 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_select.c,v 1.3 2012/03/18 07:00:52 jruoho Exp $ */
+/*	$NetBSD: t_select.c,v 1.4 2017/01/13 21:18:33 christos Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -47,13 +47,13 @@
 static sig_atomic_t keep_going = 1;
 
 static void
-sig_handler(int signum)
+sig_handler(int signum __unused)
 {
 	keep_going = 0;
 }
 
 static void
-sigchld(int signum)
+sigchld(int signum __unused)
 {
 }
 
@@ -82,7 +82,7 @@ prmask(const sigset_t *m, char *buf, siz
 	return buf;
 }
 
-static void
+static __dead void
 child(const struct timespec *ts)
 {
 	struct sigaction sa;
@@ -127,6 +127,7 @@ child(const struct timespec *ts)
 		    "after timeout %s != %s",
 		    prmask(&nset, nbuf, sizeof(nbuf)),
 		    prmask(&oset, obuf, sizeof(obuf)));
+	_exit(0);
 }
 
 ATF_TC(pselect_sigmask);
@@ -146,6 +147,7 @@ ATF_TC_BODY(pselect_sigmask, tc)
 	switch (pid = fork()) {
 	case 0:
 		child(NULL);
+		/*NOTREACHED*/
 	case -1:
 		err(1, "fork");
 	default:

Reply via email to