Subject: bin/6991: regress/sys/kern/unfdpass fails to compile
To: None <gnats-bugs@gnats.netbsd.org>
From: Wolfgang Helbig <helbig@Informatik.BA-Stuttgart.DE>
List: netbsd-bugs
Date: 02/12/1999 12:22:19
>Number: 6991
>Category: bin
>Synopsis: regress/sys/kern/unfdpass fails to compile
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 12 03:35:01 1999
>Last-Modified:
>Originator: Wolfgang Helbig
>Organization:
>Release: NetBSD-current Feb 11 1999
>Environment:
System: NetBSD rvc1 1.3I NetBSD 1.3I (RVC1) #7: Thu Feb 11 22:00:49 CET 1999 helbig@rvc1:/usr/src/sys/arch/i386/compile/RVC1 i386
>Description:
all ===> regress/sys/kern/unfdpass
cc -O2 -Werror -c /usr/src/regress/sys/kern/unfdpass/unfdpass.c
cc1: warnings being treated as errors
/usr/src/regress/sys/kern/unfdpass/unfdpass.c: In function `main':
/usr/src/regress/sys/kern/unfdpass/unfdpass.c:193: warning: comparison of distinct pointer types lacks a cast
*** Error code 1
Stop.
>How-To-Repeat:
>Fix:
A patch to sys/sys/socket.h:
--- socket.h.old Thu Feb 11 13:26:00 1999
+++ socket.h Fri Feb 12 12:13:20 1999
@@ -349,7 +349,7 @@
/* given pointer to struct cmsghdr, return pointer to next cmsghdr */
#define CMSG_NXTHDR(mhdr, cmsg) \
(((caddr_t)(cmsg) + (cmsg)->cmsg_len + sizeof(struct cmsghdr) > \
- (mhdr)->msg_control + (mhdr)->msg_controllen) ? \
+ (caddr_t)((mhdr)->msg_control) + (mhdr)->msg_controllen) ? \
(struct cmsghdr *)NULL : \
(struct cmsghdr *)((caddr_t)(cmsg) + ALIGN((cmsg)->cmsg_len)))
>Audit-Trail:
>Unformatted: