Subject: port-sparc/2770: SPARC kernel fails to build with RASTERCONS options
To: None <gnats-bugs@gnats.netbsd.org>
From: None <r.evans@ic.ac.uk>
List: netbsd-bugs
Date: 09/20/1996 20:10:15
>Number: 2770
>Category: port-sparc
>Synopsis: SPARC kernel fails to build with RASTERCONS options
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 20 12:20:00 1996
>Last-Modified:
>Originator: Robert Evans
>Organization:
Imperial College Centre for Computing Services
>Release: 1.2
>Environment:
System: NetBSD afsc1.cc.ic.ac.uk 1.2 NetBSD 1.2 (DL) #22: Fri Sep 20 18:58:11 BST 1996 rhe@afsc1.cc.ic.ac.uk:/usr/src/sys/arch/sparc/compile/DL sparc
>Description:
A sparc kernel with RASTERCONSOLE and either RASTERCONS_SMALLFONT or
RASTERCONS_FULLSCREEN will fail to build because of a routine that
is declared but not used (a2int()).
>How-To-Repeat:
config a kernel with either of the above options and watch the
make fail thus:
cc -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -mno-fpu -I. -I../../../../arch -I../../../.. -DSUN4C -DSWAPPAGER -DVNODEPAGER -DDEVPAGER -DKTRACE -DSYSVMSG -DSYSVSEM -DSYSVSHM -DDIAGNOSTIC -DCOMPAT_43 -DCOMPAT_10 -DCOMPAT_11 -DFFS -DNFSSERVER -DNFSCLIENT -DCD9660 -DFIFO -DINET -DRASTERCONSOLE -DRASTERCONS_FULLSCREEN -DRASTERCONS_SMALLFONT -DBLINK -D_KERNEL -c ../../../../arch/sparc/dev/fb.c
cc1: warnings being treated as errors
../../../../arch/sparc/dev/fb.c:364: warning: `a2int' defined but not used
*** Error code 1
Stop.
>Fix:
diff -c sys/arch/sparc/dev/fb.c.orig sys/arch/sparc/dev/fb.c
*** sys/arch/sparc/dev/fb.c.orig Tue Apr 2 13:32:45 1996
--- sys/arch/sparc/dev/fb.c Fri Sep 20 19:01:20 1996
***************
*** 356,364 ****
--- 356,367 ----
#ifdef RASTERCONSOLE
#include <machine/kbd.h>
+ #if !defined(RASTERCONS_FULLSCREEN) && !defined(RASTERCONS_SMALLFONT)
static int a2int __P((char *, int));
+ #endif
static void fb_bell __P((int));
+ #if !defined(RASTERCONS_FULLSCREEN) && !defined(RASTERCONS_SMALLFONT)
static int
a2int(cp, deflt)
register char *cp;
***************
*** 372,377 ****
--- 375,381 ----
i = i * 10 + *cp++ - '0';
return (i);
}
+ #endif
static void
fb_bell(on)
>Audit-Trail:
>Unformatted: