Use proper cast instead of gagging gcc4 with -Wno-pointer-sign.
This commit is contained in:
parent
eb92277cd7
commit
5efcb4b549
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.2 2006/05/22 07:36:52 mrg Exp $
|
||||
# $NetBSD: Makefile,v 1.3 2006/05/22 20:06:54 uwe Exp $
|
||||
|
||||
.if ${MACHINE} == "hpcarm" || ${MACHINE} == "hpcmips" || ${MACHINE} == "hpcsh"
|
||||
PROG= tpctl
|
||||
|
@ -8,7 +8,3 @@ SRCS= main.c fb.c tp.c data.c
|
|||
MAN= tpctl.8
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
.if ${HAVE_GCC} == 4
|
||||
COPTS.tp.c+= -Wno-pointer-sign
|
||||
.endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tp.c,v 1.3 2004/09/07 13:20:40 jrf Exp $ */
|
||||
/* $NetBSD: tp.c,v 1.4 2006/05/22 20:06:54 uwe Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002, 2003 TAKEMRUA Shin
|
||||
|
@ -43,7 +43,7 @@
|
|||
|
||||
#ifndef lint
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: tp.c,v 1.3 2004/09/07 13:20:40 jrf Exp $");
|
||||
__RCSID("$NetBSD: tp.c,v 1.4 2006/05/22 20:06:54 uwe Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
int
|
||||
|
@ -75,7 +75,8 @@ tp_init(struct tp *tp, int fd)
|
|||
|
||||
id.type = WSMOUSE_ID_TYPE_UIDSTR;
|
||||
if (ioctl(tp->fd, WSMOUSEIO_GETID, &id) == 0) {
|
||||
(void)strlcpy(tp->id, id.data, MIN(sizeof(tp->id), id.length));
|
||||
(void)strlcpy(tp->id, (const char *)id.data,
|
||||
MIN(sizeof(tp->id), id.length));
|
||||
} else {
|
||||
tp->id[0] = '*';
|
||||
tp->id[1] = '\0';
|
||||
|
|
Loading…
Reference in New Issue