diff options
author | bde <bde@FreeBSD.org> | 1996-09-20 14:36:14 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-09-20 14:36:14 +0000 |
commit | 4ea82d249b65560e148bbf935bdb7f768d13ec7d (patch) | |
tree | 9ee3b9eb2631af8245a775da291afb7ab7bca7d6 | |
parent | ee80f48141a860d5f619a0ff178d0b4d65363a75 (diff) | |
download | FreeBSD-src-4ea82d249b65560e148bbf935bdb7f768d13ec7d.zip FreeBSD-src-4ea82d249b65560e148bbf935bdb7f768d13ec7d.tar.gz |
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.
-rw-r--r-- | sys/sys/kernel.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index a5b8cc6..d9282a3 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) |