Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Feb 1999 17:59:34 +1100 (EST)
From:      Gregory Bond <gnb@itga.com.au>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/9877: [PATCH] minor kernel warning removal
Message-ID:  <199902020659.RAA08829@hellcat.itga.com.au>

next in thread | raw e-mail | index | archive | help

>Number:         9877
>Category:       kern
>Synopsis:       Patch to remove some kernel compile warnings
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb  1 23:00:02 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Gregory Bond
>Release:        FreeBSD 3.0-STABLE i386
>Organization:
ITG Australia Ltd
>Environment:

FreeBSD hellcat.itga.com.au 3.0-STABLE FreeBSD 3.0-STABLE #7: Tue Feb  2 09:08:02 EST 1999     toor@hellcat.itga.com.au:/usr/src/sys/compile/Hellcat  i386

>Description:

	2 minor nits in the kernel that elicit warnings from the compiler:
	- if MFS is used without MFS_ROOT
	- if I586_CPU is not defined
	both are harmless, mainly declarations of stuff not protected by
	the relevent #ifdef

>How-To-Repeat:

	configure & build a kernel with "cpu I686_CPU" only
	configure & build a kernel with "options MFS" but not "options MFS_ROOT"

>Fix:
	
--- /sys/i386/isa/npx.c	Mon Jan 11 08:55:03 1999
+++ i386/isa/npx.c	Tue Feb  2 17:47:30 1999
@@ -122,8 +122,10 @@
 static	int	npxattach	__P((struct isa_device *dvp));
 static	int	npxprobe	__P((struct isa_device *dvp));
 static	int	npxprobe1	__P((struct isa_device *dvp));
+#ifdef I586_CPU
 static	long	timezero	__P((const char *funcname,
 				     void (*func)(void *buf, size_t len)));
+#endif
 
 struct	isa_driver npxdriver = {
 	npxprobe, npxattach, "npx",
--- /sys/ufs/mfs/mfs_vfsops.c	Mon Jan  4 10:17:43 1999
+++ ufs/mfs/mfs_vfsops.c	Tue Feb  2 17:45:16 1999
@@ -64,8 +64,10 @@
 
 u_char *	mfs_getimage __P((void));
 
+#ifdef MFS_ROOT
 static caddr_t	mfs_rootbase;	/* address of mini-root in kernel virtual memory */
 static u_long	mfs_rootsize;	/* size of mini-root in bytes */
+#endif
 
 static	int mfs_minor;	/* used for building internal dev_t */
 
@@ -178,7 +180,9 @@
 	struct mfs_args args;
 	struct ufsmount *ump;
 	struct fs *fs;
+#ifdef MFS_ROOT
 	u_char *base;
+#endif
 	struct mfsnode *mfsp;
 	u_int size;
 	int flags, err;
@@ -344,7 +348,9 @@
 		goto error_2;
 	}
 
+#if MFS_ROOT
 dostatfs:
+#endif
 	/*
 	 * Initialize FS stat information in mount struct; uses both
 	 * mp->mnt_stat.f_mntonname and mp->mnt_stat.f_mntfromname
>Release-Note:
>Audit-Trail:
>Unformatted:

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902020659.RAA08829>