Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Now that these attributes are documented in attribut...
details: https://anonhg.NetBSD.org/src/rev/21d5c477e87e
branches: trunk
changeset: 790862:21d5c477e87e
user: apb <apb%NetBSD.org@localhost>
date: Fri Oct 25 14:54:25 2013 +0000
description:
Now that these attributes are documented in attribute(3), shorten
the comments for __used, __unused, __diagused, and __debugused.
Also s/variable/item/ because the attributes may bve applied
to functions.
diffstat:
sys/sys/cdefs.h | 30 +++++-------------------------
1 files changed, 5 insertions(+), 25 deletions(-)
diffs (67 lines):
diff -r 2ea04fe964ed -r 21d5c477e87e sys/sys/cdefs.h
--- a/sys/sys/cdefs.h Fri Oct 25 14:46:59 2013 +0000
+++ b/sys/sys/cdefs.h Fri Oct 25 14:54:25 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cdefs.h,v 1.115 2013/10/25 08:51:55 apb Exp $ */
+/* $NetBSD: cdefs.h,v 1.116 2013/10/25 14:54:25 apb Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -251,8 +251,7 @@
#endif
/*
- * __unused: Note that variable might be unused.
- * Do not warn if variable is unused.
+ * __unused: Note that item or function might be unused.
*/
#if __GNUC_PREREQ__(2, 7)
#define __unused __attribute__((__unused__))
@@ -261,9 +260,7 @@
#endif
/*
- * __used: Note that variable is needed, even if it appears to be unused.
- * Valid only for static variables. Do not optimise variable away.
- * Do not warn if variable is unused.
+ * __used: Note that item is needed, even if it appears to be unused.
*/
#if __GNUC_PREREQ__(3, 1)
#define __used __attribute__((__used__))
@@ -272,17 +269,8 @@
#endif
/*
- * __diagused: Note that variable is used in diagnostic code, but may be
+ * __diagused: Note that item is used in diagnostic code, but may be
* unused in non-diagnostic code.
- *
- * In the kernel, variables that are used when DIAGNOSTIC is defined,
- * but unused when DIAGNOSTIC is not defined, may be declared with
- * __diagused. In userland, variables that are used when NDEBUG is not
- * defined, but unused when NDEBUG is defined, may be declared with
- * __diagused.
- *
- * Variables used only in assert(3) or KASSERT(9) macros are likely
- * candidates for being declared with __diagused.
*/
#if (defined(_KERNEL) && defined(DIAGNOSTIC)) \
|| (!defined(_KERNEL) && !defined(NDEBUG))
@@ -292,16 +280,8 @@
#endif
/*
- * __debugused: Note that variable is used in debug code, but may be
+ * __debugused: Note that item is used in debug code, but may be
* unused in non-debug code.
- *
- * In either the kernel or userland, variables that are used when DEBUG
- * is defined, but unused when DEBUG is not defined, may be declared with
- * __debugused.
- *
- * In the kernel, variables used only in KDASSERT(9) macros are likely
- * candidates for being declared with __debugused. There is no
- * established convention for the use of DEBUG in userland code.
*/
#if defined(DEBUG)
#define __debugused /* empty */
Home |
Main Index |
Thread Index |
Old Index