Subject: error compiling pmax rcons.c with recent rasops changes.
To: None <tech-kern@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-kern
Date: 12/08/1999 15:08:46
Folks,

When compiling a -current pmax kernel, we get:

	cc  -O2 -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith -Wno-main -G 0  -mno-abicalls -mno-half-pic -I. -I../../../../arch -I../../../.. -nostdinc -I../../../../../crypto-intl/sys -I../../../../../gnu/sys -DMIPS1 -DMIPS3 -DLKM -DNKMEMCLUSTERS=1024 -DHZ=256 -DPMAPDEBUG -DMSGBUFSIZE="0x4000" -DMAXUSERS=64 -D_KERNEL -Dpmax  -c ../../../../arch/pmax/dev/rcons.c
	cc1: warnings being treated as errors
	../../../../arch/pmax/dev/rcons.c: In function `rcons_connect':
	../../../../arch/pmax/dev/rcons.c:147: warning: passing arg 2 discards `const' from pointer target type
	*** Error code 1 (continuing)

This gets things compiling, but doesn't "feel" right.  Any ideas?

	Index: rcons.c
	===================================================================
	RCS file: /cvsroot/syssrc/sys/arch/pmax/dev/rcons.c,v
	retrieving revision 1.32
	diff -p -u -r1.32 rcons.c
	--- rcons.c	1999/08/26 20:49:40	1.32
	+++ rcons.c	1999/12/08 04:06:54
	@@ -144,7 +144,7 @@ rcons_connect (info)
			panic("rcons_connect: rasops_init failed");
	 
		if (ri.ri_depth == 8 && info->fi_type.fb_boardtype != PMAX_FBTYPE_MFB)
	-		info->fi_driver->fbd_putcmap(info, rasops_cmap, 0, 256);
	+		info->fi_driver->fbd_putcmap(info, (char *)rasops_cmap, 0, 256);
	 
		fbconstty = &rcons_tty [0];
		fbconstty->t_dev = makedev(85, 0);	/* /dev/console */

Simon.