Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch use __unused instead of __USE and void cast to mark...
details: https://anonhg.NetBSD.org/src/rev/fbdd99e47452
branches: trunk
changeset: 791244:fbdd99e47452
user: christos <christos%NetBSD.org@localhost>
date: Sun Nov 10 00:50:13 2013 +0000
description:
use __unused instead of __USE and void cast to mark iterator variable unused
where needed (from phone)
diffstat:
sys/arch/alpha/include/cpu.h | 7 +++----
sys/arch/ia64/include/cpu.h | 6 +++---
sys/arch/mips/include/cpu.h | 6 +++---
sys/arch/sparc64/include/cpu.h | 7 +++----
sys/arch/vax/include/cpu.h | 7 +++----
sys/arch/x86/include/cpu.h | 7 +++----
6 files changed, 18 insertions(+), 22 deletions(-)
diffs (125 lines):
diff -r 4b2c322da2ef -r fbdd99e47452 sys/arch/alpha/include/cpu.h
--- a/sys/arch/alpha/include/cpu.h Sun Nov 10 00:13:50 2013 +0000
+++ b/sys/arch/alpha/include/cpu.h Sun Nov 10 00:50:13 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.79 2013/11/03 01:12:16 christos Exp $ */
+/* $NetBSD: cpu.h,v 1.80 2013/11/10 00:50:13 christos Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -146,9 +146,8 @@
extern struct cpu_info cpu_info_primary;
extern struct cpu_info *cpu_info_list;
-#define CPU_INFO_ITERATOR int
-#define CPU_INFO_FOREACH(cii, ci) cii = 0, __USE(cii), \
- ci = cpu_info_list; \
+#define CPU_INFO_ITERATOR int __unused
+#define CPU_INFO_FOREACH(cii, ci) ci = cpu_info_list; \
ci != NULL; ci = ci->ci_next
#if defined(MULTIPROCESSOR)
diff -r 4b2c322da2ef -r fbdd99e47452 sys/arch/ia64/include/cpu.h
--- a/sys/arch/ia64/include/cpu.h Sun Nov 10 00:13:50 2013 +0000
+++ b/sys/arch/ia64/include/cpu.h Sun Nov 10 00:50:13 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.11 2013/10/19 19:20:59 christos Exp $ */
+/* $NetBSD: cpu.h,v 1.12 2013/11/10 00:50:13 christos Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -117,8 +117,8 @@
extern struct cpu_info cpu_info_primary;
extern struct cpu_info *cpu_info_list;
-#define CPU_INFO_ITERATOR int
-#define CPU_INFO_FOREACH(cii, ci) cii = 0, ci = cpu_info_list; \
+#define CPU_INFO_ITERATOR int __unused
+#define CPU_INFO_FOREACH(cii, ci) ci = cpu_info_list; \
ci != NULL; ci = ci->ci_next
#ifdef MULTIPROCESSOR
/*
diff -r 4b2c322da2ef -r fbdd99e47452 sys/arch/mips/include/cpu.h
--- a/sys/arch/mips/include/cpu.h Sun Nov 10 00:13:50 2013 +0000
+++ b/sys/arch/mips/include/cpu.h Sun Nov 10 00:50:13 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.107 2013/02/28 12:44:38 macallan Exp $ */
+/* $NetBSD: cpu.h,v 1.108 2013/11/10 00:50:13 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -148,9 +148,9 @@
};
-#define CPU_INFO_ITERATOR int
+#define CPU_INFO_ITERATOR int __UNUSED
#define CPU_INFO_FOREACH(cii, ci) \
- (void)(cii), ci = &cpu_info_store; ci != NULL; ci = ci->ci_next
+ ci = &cpu_info_store; ci != NULL; ci = ci->ci_next
#endif /* !_LOCORE */
#endif /* _KERNEL */
diff -r 4b2c322da2ef -r fbdd99e47452 sys/arch/sparc64/include/cpu.h
--- a/sys/arch/sparc64/include/cpu.h Sun Nov 10 00:13:50 2013 +0000
+++ b/sys/arch/sparc64/include/cpu.h Sun Nov 10 00:50:13 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.104 2013/09/13 21:36:38 martin Exp $ */
+/* $NetBSD: cpu.h,v 1.105 2013/11/10 00:50:13 christos Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -220,9 +220,8 @@
#define cpu_number() (curcpu()->ci_index)
#define CPU_IS_PRIMARY(ci) ((ci)->ci_flags & CPUF_PRIMARY)
-#define CPU_INFO_ITERATOR int
-#define CPU_INFO_FOREACH(cii, ci) (void)cii, ci = cpus; ci != NULL; \
- ci = ci->ci_next
+#define CPU_INFO_ITERATOR int __unused
+#define CPU_INFO_FOREACH(cii, ci) ci = cpus; ci != NULL; ci = ci->ci_next
#define curlwp curcpu()->ci_curlwp
#define fplwp curcpu()->ci_fplwp
diff -r 4b2c322da2ef -r fbdd99e47452 sys/arch/vax/include/cpu.h
--- a/sys/arch/vax/include/cpu.h Sun Nov 10 00:13:50 2013 +0000
+++ b/sys/arch/vax/include/cpu.h Sun Nov 10 00:50:13 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.97 2013/11/09 20:32:59 christos Exp $ */
+/* $NetBSD: cpu.h,v 1.98 2013/11/10 00:50:13 christos Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden
@@ -185,9 +185,8 @@
#if defined(MULTIPROCESSOR)
#define CPU_IS_PRIMARY(ci) ((ci)->ci_flags & CI_MASTERCPU)
-#define CPU_INFO_ITERATOR int
-#define CPU_INFO_FOREACH(cii, ci) cii = 0, __USE(cii), \
- ci = SIMPLEQ_FIRST(&cpus); \
+#define CPU_INFO_ITERATOR int __unused
+#define CPU_INFO_FOREACH(cii, ci) ci = SIMPLEQ_FIRST(&cpus); \
ci != NULL; \
ci = SIMPLEQ_NEXT(ci, ci_next)
diff -r 4b2c322da2ef -r fbdd99e47452 sys/arch/x86/include/cpu.h
--- a/sys/arch/x86/include/cpu.h Sun Nov 10 00:13:50 2013 +0000
+++ b/sys/arch/x86/include/cpu.h Sun Nov 10 00:50:13 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.56 2013/11/05 16:04:13 christos Exp $ */
+/* $NetBSD: cpu.h,v 1.57 2013/11/10 00:50:13 christos Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -284,9 +284,8 @@
extern struct cpu_info cpu_info_primary;
extern struct cpu_info *cpu_info_list;
-#define CPU_INFO_ITERATOR int
-#define CPU_INFO_FOREACH(cii, ci) cii = 0, __USE(cii), \
- ci = cpu_info_list; \
+#define CPU_INFO_ITERATOR int __unused
+#define CPU_INFO_FOREACH(cii, ci) ci = cpu_info_list; \
ci != NULL; ci = ci->ci_next
#define CPU_STARTUP(_ci, _target) ((_ci)->ci_func->start(_ci, _target))
Home |
Main Index |
Thread Index |
Old Index