Date: Thu, 5 Jul 2018 17:02:10 +0000 (UTC) From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336002 - in head: usr.bin/netstat usr.sbin/tcpdrop Message-ID: <201807051702.w65H2AXB058831@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brooks Date: Thu Jul 5 17:02:10 2018 New Revision: 336002 URL: https://svnweb.freebsd.org/changeset/base/336002 Log: Work around lame warnings in ancient gcc on 32-bit platforms. Fixes r335979. Modified: head/usr.bin/netstat/inet.c head/usr.bin/netstat/unix.c head/usr.sbin/tcpdrop/tcpdrop.c Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Thu Jul 5 16:43:15 2018 (r336001) +++ head/usr.bin/netstat/inet.c Thu Jul 5 17:02:10 2018 (r336002) @@ -159,12 +159,12 @@ sotoxsocket(struct socket *so, struct xsocket *xso) bzero(xso, sizeof *xso); xso->xso_len = sizeof *xso; - xso->xso_so = (kvaddr_t)so; + xso->xso_so = (kvaddr_t)(long)so; xso->so_type = so->so_type; xso->so_options = so->so_options; xso->so_linger = so->so_linger; xso->so_state = so->so_state; - xso->so_pcb = (kvaddr_t)so->so_pcb; + xso->so_pcb = (kvaddr_t)(long)so->so_pcb; if (kread((uintptr_t)so->so_proto, &proto, sizeof(proto)) != 0) return (-1); xso->xso_protocol = proto.pr_protocol; Modified: head/usr.bin/netstat/unix.c ============================================================================== --- head/usr.bin/netstat/unix.c Thu Jul 5 16:43:15 2018 (r336001) +++ head/usr.bin/netstat/unix.c Thu Jul 5 17:02:10 2018 (r336002) @@ -153,7 +153,7 @@ pcblist_kvm(u_long count_off, u_long gencnt_off, u_lon xu.xu_len = sizeof xu; KREAD(head_off, &head, sizeof(head)); LIST_FOREACH(unp, &head, unp_link) { - xu.xu_unpp = (kvaddr_t)unp; + xu.xu_unpp = (kvaddr_t)(long)unp; KREAD(unp, &unp0, sizeof (*unp)); unp = &unp0; Modified: head/usr.sbin/tcpdrop/tcpdrop.c ============================================================================== --- head/usr.sbin/tcpdrop/tcpdrop.c Thu Jul 5 16:43:15 2018 (r336001) +++ head/usr.sbin/tcpdrop/tcpdrop.c Thu Jul 5 17:02:10 2018 (r336002) @@ -235,7 +235,7 @@ tcpdropall(const char *stack, int state) head = getxpcblist("net.inet.tcp.pcblist"); #define XINP_NEXT(xinp) \ - ((struct xinpgen *)((uintptr_t)(xinp) + (xinp)->xig_len)) + ((struct xinpgen *)(long)((uintptr_t)(xinp) + (xinp)->xig_len)) for (xinp = XINP_NEXT(head); xinp->xig_len > sizeof *xinp; xinp = XINP_NEXT(xinp)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807051702.w65H2AXB058831>