Subject: Re: dev/ic/vga_raster.c:315: warning: unused variable `typestr'
To: None <hubert@feyrer.de>
From: Bang Jun-Young <junyoung@netbsd.org>
List: current-users
Date: 11/28/2002 16:04:12
On Wed, Nov 27, 2002 at 10:11:43PM +0100, hubert@feyrer.de wrote:
> 
> Am I the only one to see this on i386/current:
> 
> 	miyu# /usr/cvs/src-current/tools/obj.i386/tools.NetBSD-1.6I-i386/bin/nbmake-i386
> 	/usr/cvs/src-current/tools/obj.i386/tools.NetBSD-1.6I-i386/bin/i386--netbsdelf-gcc
> 	-ffreestanding  -O2 -Werror -Wall -Wno-main -Wno-format-zero-length
> 	-Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes
> 	-Wno-uninitialized  -Di386 -I.  -I../../../../arch -I../../../.. -nostdinc
> 	-DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT   -c
> 	/usr/cvs/src-current/sys/arch/i386/compile/MIYU/../../../../dev/ic/vga_raster.c
> 	cc1: warnings being treated as errors
> 	/usr/cvs/src-current/sys/arch/i386/compile/MIYU/../../../../dev/ic/vga_raster.c:
> 	In function `vga_cnattach':
> 	/usr/cvs/src-current/sys/arch/i386/compile/MIYU/../../../../dev/ic/vga_raster.c:315:
> 	warning: unused variable `typestr'
> 	*** Error code 1
> 
> The following patch fixes things for me:
> 
> 	Index: vga_raster.c
> 	===================================================================
> 	RCS file: /cvsroot/syssrc/sys/dev/ic/vga_raster.c,v
> 	retrieving revision 1.4
> 	diff -u -r1.4 vga_raster.c
> 	--- vga_raster.c	2002/11/04 08:05:53	1.4
> 	+++ vga_raster.c	2002/11/27 21:06:06
> 	@@ -312,7 +312,9 @@
> 	 {
> 	 	long defattr;
> 	 	const struct wsscreen_descr *scr;
> 	+#ifdef VGA_CONSOLE_SCREENTYPE
> 	 	char *typestr;
> 	+#endif
> 
> 	 	if (check && !vga_common_probe(iot, memt))
> 	 		return (ENXIO);
> 

I fixed it some time ago, but fotgot to commit it. Thanks!

Jun-Young

-- 
Bang Jun-Young <junyoung@netbsd.org>