Source-Changes-HG archive

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

[src/trunk]: src/tests/kernel Fix Clang/LLVM build



details:   https://anonhg.NetBSD.org/src/rev/2425061a1134
branches:  trunk
changeset: 349356:2425061a1134
user:      kamil <kamil%NetBSD.org@localhost>
date:      Thu Dec 08 13:32:17 2016 +0000

description:
Fix Clang/LLVM build

Reported error:
    src/tests/kernel/t_ptrace_wait.c:4401:33:
    error: missing field 'pl_event' initializer
            [-Werror,-Wmissing-field-initializers]

Line in the code:
    struct ptrace_lwpinfo info = {0};

Appease it with initializing info to {0, 0}.

Sponsored by <The NetBSD Foundation>

diffstat:

 tests/kernel/t_ptrace_wait.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r ba5e07a162a2 -r 2425061a1134 tests/kernel/t_ptrace_wait.c
--- a/tests/kernel/t_ptrace_wait.c      Thu Dec 08 12:22:56 2016 +0000
+++ b/tests/kernel/t_ptrace_wait.c      Thu Dec 08 13:32:17 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.c,v 1.45 2016/12/06 18:59:00 christos Exp $      */
+/*     $NetBSD: t_ptrace_wait.c,v 1.46 2016/12/08 13:32:17 kamil Exp $ */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.45 2016/12/06 18:59:00 christos Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.46 2016/12/08 13:32:17 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -4398,7 +4398,7 @@
 #if defined(TWAIT_HAVE_STATUS)
        int status;
 #endif
-       struct ptrace_lwpinfo info = {0};
+       struct ptrace_lwpinfo info = {0, 0};
 
        printf("Before forking process PID=%d\n", getpid());
        ATF_REQUIRE((child = fork()) != -1);
@@ -4469,7 +4469,7 @@
 #if defined(TWAIT_HAVE_STATUS)
        int status;
 #endif
-       struct ptrace_lwpinfo info = {0};
+       struct ptrace_lwpinfo info = {0, 0};
 
        printf("Spawn tracee\n");
        ATF_REQUIRE(msg_open(&parent_tracee) == 0);



Home | Main Index | Thread Index | Old Index