Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Dec 1998 13:43:23 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Matthew Jacob <mjacob@feral.com>
Cc:        freebsd-alpha@FreeBSD.ORG
Subject:   Re: kernel compile warnings?
Message-ID:  <Pine.BSF.4.01.9812201337230.392-100000@herring.nlsystems.com>
In-Reply-To: <Pine.LNX.4.04.9812181940230.25456-100000@feral-gw>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 18 Dec 1998, Matthew Jacob wrote:

> 
> 
> I'm getting a wad of these (after installing the latest .mk files)... I
> know that we've turned on Warnings etc. for kernel compiles, but this is
> a lot of noise to wade through... Is it just that the toolchains are
> different and the answer for now is 'cope'?
> 
> ....
> 
> ./../kern/vfs_aio.c:114: warning:
> `sysctl___vfs_aio_max_aio_queue_per_proc' defined but not used
> ../../kern/vfs_aio.c:117: warning: `sysctl___vfs_aio_max_aio_procs'
> defined but not used
> ../../kern/vfs_aio.c:120: warning: `sysctl___vfs_aio_num_aio_procs'
> defined but not used
> ../../kern/vfs_aio.c:123: warning: `sysctl___vfs_aio_num_queue_count'
> defined but not used
> ../../kern/vfs_aio.c:126: warning: `sysctl___vfs_aio_max_aio_queue'
> defined but not used
> ../../kern/vfs_aio.c:129: warning: `sysctl___vfs_aio_target_aio_procs'
> defined but not used
> ../../kern/vfs_aio.c:132: warning: `sysctl___vfs_aio_max_buf_aio' defined
> but not used
> ../../kern/vfs_aio.c:135: warning: `sysctl___vfs_aio_num_buf_aio' defined
> but not used
> ../../kern/vfs_aio.c:138: warning: `sysctl___vfs_aio_aiod_lifetime'
> defined but not used

I think this patch should fix it for both i386 and alpha ELF kernel
builds.  I'm about to test it.

Index: kernel.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/kernel.h,v
retrieving revision 1.46
diff -u -r1.46 kernel.h
--- kernel.h	1998/12/03 23:02:03	1.46
+++ kernel.h	1998/12/20 13:40:26
@@ -91,15 +91,17 @@
  */
 
 #ifdef __alpha__
-#define MAKE_SET(set, sym)			\
-	__asm(".align 3");			\
-	__asm(".section .set." #set ",\"aw\"");	\
-	__asm(".quad " #sym);			\
+#define MAKE_SET(set, sym)						\
+	static void const * const __set_##set##_sym_##sym = &sym;	\
+	__asm(".align 3");						\
+	__asm(".section .set." #set ",\"aw\"");				\
+	__asm(".quad " #sym);						\
 	__asm(".previous")
 #else
-#define MAKE_SET(set, sym)			\
-	__asm(".section .set." #set ",\"aw\"");	\
-	__asm(".long " #sym);			\
+#define MAKE_SET(set, sym)						\
+	static void const * const __set_##set##_sym_##sym = &sym;	\
+	__asm(".section .set." #set ",\"aw\"");				\
+	__asm(".long " #sym);						\
 	__asm(".previous")
 #endif
 #define TEXT_SET(set, sym) MAKE_SET(set, sym)

--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 442 9037



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9812201337230.392-100000>