Index: imsg.c
===================================================================
RCS file: /cvs/src/lib/libutil/imsg.c,v
retrieving revision 1.12
diff -u -r1.12 imsg.c
--- imsg.c 5 Dec 2015 13:06:52 -0000 1.12
+++ imsg.c 9 Dec 2015 05:04:05 -0000
@@ -72,7 +72,7 @@
again:
if (getdtablecount() + imsg_fd_overhead +
- (CMSG_SPACE(sizeof(int))-CMSG_SPACE(0))/sizeof(int)
+ (int)((CMSG_SPACE(sizeof(int))-CMSG_SPACE(0))/sizeof(int))
>= getdtablesize()) {
errno = EAGAIN;
free(ifd);
This patch eliminates this warning when compiled with clang on FreeBSD:
/opt2/branches/head2/lib/libopenbsd/imsg.c:78:6: warning: comparison of
integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
>= getdtablesize()) {
^ ~~~~~~~~~~~~~~~
1 warning generated.
See previous discussion: http://marc.info/?l=openbsd-tech&m=144766546202667
I'm submitting this patch to OpenBSD to facilitate sharing of code between
the projects.
--
Craig