Work around lame warnings in ancient gcc on 32-bit platforms.

Fixes r335979.
This commit is contained in:
Brooks Davis 2018-07-05 17:02:10 +00:00
parent a66d7a8ddc
commit f6293d7296
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336002
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -153,7 +153,7 @@ pcblist_kvm(u_long count_off, u_long gencnt_off, u_long head_off, char **bufp)
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;

View File

@ -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)) {