Subject: Re: error compiling pmax rcons.c with recent rasops changes.
To: Simon Burge <simonb@netbsd.org>
From: Andy Doran <ad@netbsd.org>
List: tech-kern
Date: 12/08/1999 10:07:29
Matthias Drochner made rasops_cmap[] const, so I understand why this is
only showing up. I s'pose the best thing to do is make fbd_putcmap() take
the colormap ptr as const; that'll require other changes though.
- ad
On Wed, 8 Dec 1999, Simon Burge wrote:
> 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.
>