Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/sys PR/51861: Ngie Cooper: Sprinkle __unused, ...



details:   https://anonhg.NetBSD.org/src/rev/1134e06501d2
branches:  trunk
changeset: 820715:1134e06501d2
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 13 21:18:33 2017 +0000

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

diffstat:

 tests/lib/libc/sys/t_select.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (50 lines):

diff -r 44cd4c1c5208 -r 1134e06501d2 tests/lib/libc/sys/t_select.c
--- a/tests/lib/libc/sys/t_select.c     Fri Jan 13 21:16:38 2017 +0000
+++ b/tests/lib/libc/sys/t_select.c     Fri Jan 13 21:18:33 2017 +0000
@@ -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 @@
        return buf;
 }
 
-static void
+static __dead void
 child(const struct timespec *ts)
 {
        struct sigaction sa;
@@ -127,6 +127,7 @@
                    "after timeout %s != %s",
                    prmask(&nset, nbuf, sizeof(nbuf)),
                    prmask(&oset, obuf, sizeof(obuf)));
+       _exit(0);
 }
 
 ATF_TC(pselect_sigmask);
@@ -146,6 +147,7 @@
        switch (pid = fork()) {
        case 0:
                child(NULL);
+               /*NOTREACHED*/
        case -1:
                err(1, "fork");
        default:



Home | Main Index | Thread Index | Old Index