EOF
case "$OS" in
mirbsd*|openbsd*);; # OpenBSD has many redundant decs in system headers
+ bitrig*) echo "CFLAGS+= -Wredundant-decls" >>$CONFIG_MK
+ ;; # Bitrig spouts many conversion errors with htons
*) echo "CFLAGS+= -Wredundant-decls" >>$CONFIG_MK
echo "CFLAGS+= -Wconversion" >>$CONFIG_MK
;;
memset(&ifr, 0, sizeof(ifr));
strlcpy(ifr.ifr_name, ifp->name, sizeof(ifr.ifr_name));
if (ioctl(ctx->pf_inet_fd, SIOCGIFPRIORITY, &ifr) == 0)
- ifp->metric = ifr.ifr_metric;
+ ifp->metric = (unsigned int)ifr.ifr_metric;
#else
/* We reserve the 100 range for virtual interfaces, if and when
* we can work them out. */
if ((s = socket(domain, type, protocol)) == -1)
return -1;
- if ((flags & O_CLOEXEC) && (xflags = fcntl(s, F_GETFD, 0)) == -1 ||
- fcntl(s, F_SETFD, xflags | FD_CLOEXEC) == -1)
+ if ((flags & O_CLOEXEC) && ((xflags = fcntl(s, F_GETFD, 0)) == -1 ||
+ fcntl(s, F_SETFD, xflags | FD_CLOEXEC) == -1))
goto out;
- if ((flags & O_NONBLOCK) && (xflags = fcntl(s, F_GETFL, 0)) == -1 ||
- fcntl(s, F_SETFL, xflags | O_NONBLOCK) == -1)
+ if ((flags & O_NONBLOCK) && ((xflags = fcntl(s, F_GETFL, 0)) == -1 ||
+ fcntl(s, F_SETFL, xflags | O_NONBLOCK) == -1))
goto out;
return s;
out: