Subject: Re: hpckbd vs. -Wcast-qual
To: None <tech-kern@NetBSD.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: tech-kern
Date: 06/26/2006 23:53:59
[Redirected to tech-kern]

On Sun, Jun 25, 2006 at 17:47:09 +0200, Peter Postma wrote:

> Has anyone tried to fix hpckbd(4) overwriting "const" data?
> (http://mail-index.netbsd.org/port-hpcarm/2005/06/02/0000.html)
> 
> I've got something that seems to work, but this might not be an optimal
> solution. See ftp://ftp.netbsd.org/pub/NetBSD/misc/peter/hpckbd-const.diff

I think that pckbd_keydesctab[] was constified incorrectly.  Preceding
commetns says:

/* KBD_NULLMAP generates a entry for machine native variant.
   the entry will be modified by machine dependent keyboard driver. */
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

So the right fix is to unconst the array.


SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen