Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Sep 1999 12:55:49 +1000 (EST)
From:      Gregory Bond <gnb@itga.com.au>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/13846: [Patch] bunch of kernel compile warnings fixed
Message-ID:  <199909200255.MAA32233@hellcat.itga.com.au>

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

>Number:         13846
>Category:       kern
>Synopsis:       [PATCH] 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:   Sun Sep 19 20:00:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        FreeBSD 3.3-RC i386
>Organization:
ITG Australia Ltd
>Environment:

FreeBSD hellcat.itga.com.au 3.3-RC FreeBSD 3.3-RC #2: Thu Sep 16 18:03:41 EST 1999     toor@hellcat.itga.com.au:/usr/src/sys/compile/Hellcat  i386

>Description:

This patch silences some kernel compile warnings.  Some of these warnings
are dependent on kernel config options
	not I585_CPU
	MFS and not MFS_ROOT

This patch superceeds two PRs I previously submitted (9877 and 9878) and
should be more usable now that I have a local CVS repository!

>How-To-Repeat:

cd /usr/src/sys/compile/KERNEL && make >& errs && grep ':' errs

>Fix:

Index: sys/i386/i386/identcpu.c
===================================================================
RCS file: /usr/ncvs/src/sys/i386/i386/identcpu.c,v
retrieving revision 1.57.2.8
diff -u -r1.57.2.8 identcpu.c
--- identcpu.c	1999/09/10 20:47:22	1.57.2.8
+++ identcpu.c	1999/09/20 02:30:25
@@ -126,7 +126,9 @@
 printcpuinfo(void)
 {
 
-	u_int regs[4], nreg;
+	u_int regs[4];
+	u_int nreg = 0; /* Used iff strcmp(cpu_vendor,"AuthenticAMD") == 0 */
+
 	cpu_class = i386_cpus[cpu].cpu_class;
 	printf("CPU: ");
 	strncpy(cpu_model, i386_cpus[cpu].cpu_name, sizeof cpu_model);
Index: sys/i386/isa/clock.c
===================================================================
RCS file: /usr/ncvs/src/sys/i386/isa/clock.c,v
retrieving revision 1.129.2.4
diff -u -r1.129.2.4 clock.c
--- clock.c	1999/08/29 16:07:14	1.129.2.4
+++ clock.c	1999/09/20 02:35:55
@@ -592,7 +592,7 @@
 static u_int
 calibrate_clocks(void)
 {
-	u_int64_t old_tsc;
+	u_int64_t old_tsc = 0; /* used iff tsc_present */
 	u_int count, prev_count, tot_count;
 	int sec, start_sec, timeout;
 
Index: sys/i386/isa/npx.c
===================================================================
RCS file: /usr/ncvs/src/sys/i386/isa/npx.c,v
retrieving revision 1.65.2.1
diff -u -r1.65.2.1 npx.c
--- npx.c	1999/08/29 16:07:29	1.65.2.1
+++ npx.c	1999/09/16 08:20:08
@@ -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",
Index: sys/i386/isa/snd/ad1848.c
===================================================================
RCS file: /usr/ncvs/src/sys/i386/isa/snd/ad1848.c,v
retrieving revision 1.20.2.1
diff -u -r1.20.2.1 ad1848.c
--- ad1848.c	1999/05/10 12:31:53	1.20.2.1
+++ ad1848.c	1999/09/17 00:25:03
@@ -1584,7 +1584,7 @@
     }
     dev->id_drq = d.drq[0] ; /* primary dma */
     dev->id_irq = (1 << d.irq[0] ) ;
-    dev->id_intr = pcmintr ;
+    dev->id_ointr = pcmintr ;
     dev->id_flags = DV_F_DUAL_DMA | (d.drq[1] ) ;
 
     tmp_d.synth_base = d.port[1]; /* XXX check this for yamaha */
@@ -1687,7 +1687,7 @@
     }
     dev->id_drq = d.drq[0] ; /* primary dma */
     dev->id_irq = (1 << d.irq[0] ) ;
-    dev->id_intr = pcmintr ;
+    dev->id_ointr = pcmintr ;
     pcmattach(dev);
 }
 
@@ -1752,7 +1752,7 @@
 
     dev->id_drq = d.drq[0] ; /* primary dma */
     dev->id_irq = (1 << d.irq[0] ) ;
-    dev->id_intr = pcmintr ;
+    dev->id_ointr = pcmintr ;
     dev->id_flags = DV_F_DUAL_DMA | d.drq[1] ;
     tmp_d.audio_fmt |= AFMT_FULLDUPLEX ;
 
@@ -1815,7 +1815,7 @@
     dev->id_iobase = d.port[2] - 4 ; /* room for 4 mss registers */
     dev->id_drq = d.drq[1] ; /* XXX PLAY dma */
     dev->id_irq = (1 << d.irq[0] ) ;
-    dev->id_intr = pcmintr ;
+    dev->id_ointr = pcmintr ;
     dev->id_flags = DV_F_DUAL_DMA | d.drq[0]  ; /* REC dma */
 
     tmp_d.io_base = d.port[2] - 4;
Index: sys/i386/isa/snd/sbcard.h
===================================================================
RCS file: /usr/ncvs/src/sys/i386/isa/snd/sbcard.h,v
retrieving revision 1.6
diff -u -r1.6 sbcard.h
--- sbcard.h	1998/12/10 18:36:10	1.6
+++ sbcard.h	1999/09/17 00:25:03
@@ -260,8 +260,6 @@
 #ifdef	__SGNXPRO__
 mixer_tab       sgnxpro_mix;
 #endif
-static u_char sb16_recmasks_L[SOUND_MIXER_NRDEVICES];
-static u_char sb16_recmasks_R[SOUND_MIXER_NRDEVICES];
 #else /* __SB_MIXER_C__ defined */
 mixer_tab       sbpro_mix = {
     PMIX_ENT(SOUND_MIXER_VOLUME,  0x22, 4, 4, 0x22, 0, 4),
@@ -354,42 +352,6 @@
 	0x4b4b,			/* Input gain */
 0x4b4b};			/* Output gain */
 #endif				/* SM_GAMES */
-
-static u_char sb16_recmasks_L[SOUND_MIXER_NRDEVICES] =
-{
-	0x00,			/* SOUND_MIXER_VOLUME	 */
-	0x00,			/* SOUND_MIXER_BASS	 */
-	0x00,			/* SOUND_MIXER_TREBLE	 */
-	0x40,			/* SOUND_MIXER_SYNTH	 */
-	0x00,			/* SOUND_MIXER_PCM	 */
-	0x00,			/* SOUND_MIXER_SPEAKER	 */
-	0x10,			/* SOUND_MIXER_LINE	 */
-	0x01,			/* SOUND_MIXER_MIC	 */
-	0x04,			/* SOUND_MIXER_CD	 */
-	0x00,			/* SOUND_MIXER_IMIX	 */
-	0x00,			/* SOUND_MIXER_ALTPCM	 */
-	0x00,			/* SOUND_MIXER_RECLEV	 */
-	0x00,			/* SOUND_MIXER_IGAIN	 */
-	0x00			/* SOUND_MIXER_OGAIN	 */
-};
-
-static u_char sb16_recmasks_R[SOUND_MIXER_NRDEVICES] =
-{
-	0x00,			/* SOUND_MIXER_VOLUME	 */
-	0x00,			/* SOUND_MIXER_BASS	 */
-	0x00,			/* SOUND_MIXER_TREBLE	 */
-	0x20,			/* SOUND_MIXER_SYNTH	 */
-	0x00,			/* SOUND_MIXER_PCM	 */
-	0x00,			/* SOUND_MIXER_SPEAKER	 */
-	0x08,			/* SOUND_MIXER_LINE	 */
-	0x01,			/* SOUND_MIXER_MIC	 */
-	0x02,			/* SOUND_MIXER_CD	 */
-	0x00,			/* SOUND_MIXER_IMIX	 */
-	0x00,			/* SOUND_MIXER_ALTPCM	 */
-	0x00,			/* SOUND_MIXER_RECLEV	 */
-	0x00,			/* SOUND_MIXER_IGAIN	 */
-	0x00			/* SOUND_MIXER_OGAIN	 */
-};
 
 /*
  * Recording sources (SB Pro)
Index: sys/kern/kern_ntptime.c
===================================================================
RCS file: /usr/ncvs/src/sys/kern/kern_ntptime.c,v
retrieving revision 1.18.2.3
diff -u -r1.18.2.3 kern_ntptime.c
--- kern_ntptime.c	1999/04/13 18:55:13	1.18.2.3
+++ kern_ntptime.c	1999/09/17 00:26:28
@@ -190,7 +190,7 @@
  * End of phase/frequency-lock loop (PLL/FLL) definitions
  */
 
-static void ntp_init(void);
+static void ntp_init(void *);
 static void hardupdate(long offset);
 
 /*
@@ -505,7 +505,8 @@
  * probably be integrated with the code that does that.
  */
 static void
-ntp_init()
+ntp_init(void * p)
+/* ARGSUSED */
 {
 
 	/*
Index: sys/pci/es1370.c
===================================================================
RCS file: /usr/ncvs/src/sys/pci/es1370.c,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 es1370.c
--- es1370.c	1999/08/29 16:31:31	1.1.2.1
+++ es1370.c	1999/09/17 00:25:03
@@ -53,6 +53,7 @@
 
 #include <pci/es1370_reg.h>
 #include <i386/isa/snd/sound.h>
+#define DSP_ULAW_NOT_WANTED
 #include <i386/isa/snd/ulaw.h>
 
 #if NPCI != 0
@@ -130,7 +131,7 @@
 static void     es_rd_map(void *, bus_dma_segment_t *, int, int);
 static int      es_wrabort(snddev_info *);
 static void     es_wr_map(void *, bus_dma_segment_t *, int, int);
-static char    *es_pci_probe __P((pcici_t, pcidi_t));
+static const char *es_pci_probe __P((pcici_t, pcidi_t));
 static void	es_pci_attach __P((pcici_t, int));
 static int	es_rd_dmaupdate(snddev_info *);
 static d_select_t es_select;
@@ -1021,7 +1022,7 @@
 	return (0);
 }
 
-static char *
+static const char *
 es_pci_probe(pcici_t tag, pcidi_t type)
 {
 	if (type == ES1370_PCI_ID)
Index: sys/sys/sysent.h
===================================================================
RCS file: /usr/ncvs/src/sys/sys/sysent.h,v
retrieving revision 1.20.2.2
diff -u -r1.20.2.2 sysent.h
--- sysent.h	1999/09/01 06:12:12	1.20.2.2
+++ sysent.h	1999/09/16 08:09:10
@@ -37,6 +37,7 @@
 #define	_SYS_SYSENT_H_
 
 struct proc;
+struct vnode;
 
 typedef	int	sy_call_t __P((struct proc *, void *));
 
Index: sys/ufs/mfs/mfs_vfsops.c
===================================================================
RCS file: /usr/ncvs/src/sys/ufs/mfs/mfs_vfsops.c,v
retrieving revision 1.53.2.3
diff -u -r1.53.2.3 mfs_vfsops.c
--- mfs_vfsops.c	1999/08/29 16:33:15	1.53.2.3
+++ mfs_vfsops.c	1999/09/17 00:23:08
@@ -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?199909200255.MAA32233>