Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Appease clang -Wtentative-definition-incomplete-type.



details:   https://anonhg.NetBSD.org/src/rev/dad072383127
branches:  trunk
changeset: 933981:dad072383127
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Jun 02 02:04:35 2020 +0000

description:
Appease clang -Wtentative-definition-incomplete-type.

Now, both kernel and crash(8) build with clang for amd64
(and certainly other ports also).

Pointed out by joerg.

diffstat:

 sys/kern/kern_timeout.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r c40a49bb623b -r dad072383127 sys/kern/kern_timeout.c
--- a/sys/kern/kern_timeout.c   Tue Jun 02 01:34:50 2020 +0000
+++ b/sys/kern/kern_timeout.c   Tue Jun 02 02:04:35 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_timeout.c,v 1.64 2020/05/31 23:24:20 rin Exp $    */
+/*     $NetBSD: kern_timeout.c,v 1.65 2020/06/02 02:04:35 rin Exp $    */
 
 /*-
  * Copyright (c) 2003, 2006, 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.64 2020/05/31 23:24:20 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.65 2020/06/02 02:04:35 rin Exp $");
 
 /*
  * Timeouts are kept in a hierarchical timing wheel.  The c_time is the
@@ -104,9 +104,6 @@
 #include <ddb/db_cpu.h>
 #include <ddb/db_sym.h>
 #include <ddb/db_output.h>
-
-static struct callout_cpu ccb;
-static struct cpu_info cib;
 #endif
 
 #define BUCKETS                1024
@@ -185,8 +182,12 @@
        char            cc_name2[12];
 };
 
-#ifndef CRASH
+#ifdef DDB
+static struct callout_cpu ccb;
+static struct cpu_info cib;
+#endif
 
+#ifndef CRASH /* _KERNEL */
 static void    callout_softclock(void *);
 static void    callout_wait(callout_impl_t *, void *, kmutex_t *);
 



Home | Main Index | Thread Index | Old Index