aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1996-09-20 14:36:14 +0000
committerBruce Evans <bde@FreeBSD.org>1996-09-20 14:36:14 +0000
commita1971699ac907716080d93a15f20d82566d40bc3 (patch)
tree9ee3b9eb2631af8245a775da291afb7ab7bca7d6
parentb32992bc3f70c922dfc51a2882ec7deae1c7930a (diff)
downloadsrc-a1971699ac907716080d93a15f20d82566d40bc3.tar.gz
src-a1971699ac907716080d93a15f20d82566d40bc3.zip
Fixed lots of warnings from gcc-2.7.x about "left-hand operand of
comma expression has no effect" in the MAKE_SET() macro. This also fixes compiling with -O3 (which removes static functions unless there is a suitable reference to them). Declaring all the static symbols as __unused would also fix the warning, but would be bogus (they are used) and wouldn't fix -O3. However, the dummy pointers for the references waste about 1.5K text and 20K symbol space for GENERIC. This wastage hasn't changed - the dummy pointers are just nonzero now.
Notes
Notes: svn path=/head/; revision=18424
-rw-r--r--sys/sys/kernel.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h
index a5b8cc6aff3b..d9282a3d7844 100644
--- a/sys/sys/kernel.h
+++ b/sys/sys/kernel.h
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)kernel.h 8.3 (Berkeley) 1/21/94
- * $Id: kernel.h,v 1.20 1996/06/23 17:40:47 bde Exp $
+ * $Id: kernel.h,v 1.21 1996/09/03 22:52:26 bde Exp $
*/
#ifndef _SYS_KERNEL_H_
@@ -81,8 +81,7 @@ extern long timedelta;
* can't name them symbolically (e.g., 23 is N_SETT | N_EXT).
*/
#define MAKE_SET(set, sym, type) \
- static void *const __set_##set##_sym_##sym = \
- (&__set_##set##_sym_##sym, &sym, 0); \
+ static void const * const __set_##set##_sym_##sym = &sym; \
asm(".stabs \"_" #set "\", " #type ", 0, 0, _" #sym)
#define TEXT_SET(set, sym) MAKE_SET(set, sym, 23)
#define DATA_SET(set, sym) MAKE_SET(set, sym, 25)