diff options
author | jb <jb@FreeBSD.org> | 1998-12-03 23:02:03 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1998-12-03 23:02:03 +0000 |
commit | 7fbad397f40ca618f68e120816bd42a4f1828585 (patch) | |
tree | 390248166b9bc7e5aec953a0cf19d545e722cbf3 /sys | |
parent | f2d57c93e436cee347c8d4e1e6752c0f49d66560 (diff) | |
download | FreeBSD-src-7fbad397f40ca618f68e120816bd42a4f1828585.zip FreeBSD-src-7fbad397f40ca618f68e120816bd42a4f1828585.tar.gz |
Add __attribute__ ((unused)) to the SYSINIT etc macros which declare
static structures that are used with the data set magic. This allows
kernel modules, for example, to be compiled with -Wall -Werror.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/kernel.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index 5c9ce82..78a724a 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.44 1998/11/10 08:41:41 peter Exp $ + * $Id: kernel.h,v 1.45 1998/11/15 15:25:56 bde Exp $ */ #ifndef _SYS_KERNEL_H_ @@ -239,7 +239,8 @@ struct sysinit { * Default: no special processing */ #define SYSINIT(uniquifier, subsystem, order, func, ident) \ - static struct sysinit uniquifier ## _sys_init = { \ + static struct sysinit __attribute__ ((unused)) \ + uniquifier ## _sys_init = { \ subsystem, \ order, \ func, \ @@ -251,7 +252,8 @@ struct sysinit { * Called on module unload: no special processing */ #define SYSUNINIT(uniquifier, subsystem, order, func, ident) \ - static struct sysinit uniquifier ## _sys_uninit = { \ + static struct sysinit __attribute__ ((unused)) \ + uniquifier ## _sys_uninit = { \ subsystem, \ order, \ func, \ @@ -265,7 +267,8 @@ struct sysinit { * for making a kernel 'thread' (or builtin process.) */ #define SYSINIT_KT(uniquifier, subsystem, order, func, ident) \ - static struct sysinit uniquifier ## _sys_init = { \ + static struct sysinit __attribute__ ((unused)) \ + uniquifier ## _sys_init = { \ subsystem, \ order, \ func, \ @@ -275,12 +278,13 @@ struct sysinit { DATA_SET(sysinit_set,uniquifier ## _sys_init); #define SYSINIT_KP(uniquifier, subsystem, order, func, ident) \ - static struct sysinit uniquifier ## _sys_init = { \ + static struct sysinit __attribute__ ((unused)) \ + uniquifier ## _sys_init = { \ subsystem, \ order, \ func, \ ident, \ - SI_TYPE_KPROCESS \ + SI_TYPE_KPROCESS \ }; \ DATA_SET(sysinit_set,uniquifier ## _sys_init); |