NetBSD Problem Report #13231
Received: (qmail 25819 invoked from network); 17 Jun 2001 16:01:21 -0000
Message-Id: <200106171604.f5HG4Ag03787@mercury.arpa.co.uk>
Date: Sun, 17 Jun 2001 11:04:11 -0500 (CDT)
From: rob@arpa.com
Reply-To: rob@arpa.com
To: gnats-bugs@gnats.netbsd.org
Subject: sys/dev/sun/fb.c: unused variables with RASTERCONS_FULLSCREEN defined, -Werror breaks compile
X-Send-Pr-Version: 3.95
>Number: 13231
>Category: kern
>Synopsis: sys/dev/sun/fb.c: unused variables with RASTERCONS_FULLSCREEN defined, -Werror breaks kernel compile
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Jun 17 16:02:00 +0000 2001
>Closed-Date: Mon Jun 25 11:31:51 +0000 2001
>Last-Modified: Mon Jun 25 11:31:51 +0000 2001
>Originator: Rob Misiak
>Release: 6/17/01 srcs
>Organization:
>Environment:
NetBSD/sparc, cgsix on SS5, with RASTERCONS_SMALLFONT and RASTERCONS_FULLSCREEN defined.
System: NetBSD mercury 1.5W NetBSD 1.5W (MERCURY) #31: Sat Jun 9 20:20:48 CDT 2001 rob@mercury:/usr/obj/sys/arch/sparc/MERCURY sparc
Architecture: sparc
Machine: sparc
>Description:
defining RASTERCONS_FULLSCREEN in kernel config breaks the kernel compile (because of -Werror):
cc -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-main -mno-fpu -I. -I/usr/src/sys/arch -I
/usr/src/sys -nostdinc -DSUN4M -DRASTERCONSOLE -DRASTERCONS_SMALLFONT -DRASTERCONS_FULLSCREEN -DLKM -DFDSCRIPTS -DSETUIDSCRIPTS -DMAXUSERS=32 -D
_KERNEL -D_KERNEL_OPT -c /usr/src/sys/dev/sun/fb.c
cc1: warnings being treated as errors
/usr/src/sys/dev/sun/fb.c: In function `fbrcons_init':
/usr/src/sys/dev/sun/fb.c:360: warning: unused variable `col'
/usr/src/sys/dev/sun/fb.c:360: warning: unused variable `row'
*** Error code 1
>How-To-Repeat:
kernel config:
options RASTERCONS_FULLSCREEN
>Fix:
Index: fb.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/sun/fb.c,v
retrieving revision 1.2
diff -u -r1.2 fb.c
--- fb.c 2000/10/31 21:54:35 1.2
+++ fb.c 2001/06/17 15:50:58
@@ -357,7 +357,10 @@
{
struct rconsole *rc = &fb->fb_rcons;
struct rasops_info *ri = &fb->fb_rinfo;
- int maxrow, maxcol, *row, *col;
+ int maxrow, maxcol;
+#if !defined(RASTERCONS_FULLSCREEN)
+ int *row, *col;
+#endif /* !RASTERCONS_FULLSCREEN */
/* Set up what rasops needs to know about */
bzero(ri, sizeof *ri);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: pk
State-Changed-When: Mon Jun 25 04:29:58 PDT 2001
State-Changed-Why:
Patch applied (dev/sun/fb.c, revision 1.3)
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.