Work around lame warnings in ancient gcc on 32-bit platforms.
Fixes r335979.
This commit is contained in:
parent
a66d7a8ddc
commit
f6293d7296
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336002
@ -159,12 +159,12 @@ sotoxsocket(struct socket *so, struct xsocket *xso)
|
|||||||
|
|
||||||
bzero(xso, sizeof *xso);
|
bzero(xso, sizeof *xso);
|
||||||
xso->xso_len = 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_type = so->so_type;
|
||||||
xso->so_options = so->so_options;
|
xso->so_options = so->so_options;
|
||||||
xso->so_linger = so->so_linger;
|
xso->so_linger = so->so_linger;
|
||||||
xso->so_state = so->so_state;
|
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)
|
if (kread((uintptr_t)so->so_proto, &proto, sizeof(proto)) != 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
xso->xso_protocol = proto.pr_protocol;
|
xso->xso_protocol = proto.pr_protocol;
|
||||||
|
@ -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;
|
xu.xu_len = sizeof xu;
|
||||||
KREAD(head_off, &head, sizeof(head));
|
KREAD(head_off, &head, sizeof(head));
|
||||||
LIST_FOREACH(unp, &head, unp_link) {
|
LIST_FOREACH(unp, &head, unp_link) {
|
||||||
xu.xu_unpp = (kvaddr_t)unp;
|
xu.xu_unpp = (kvaddr_t)(long)unp;
|
||||||
KREAD(unp, &unp0, sizeof (*unp));
|
KREAD(unp, &unp0, sizeof (*unp));
|
||||||
unp = &unp0;
|
unp = &unp0;
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ tcpdropall(const char *stack, int state)
|
|||||||
head = getxpcblist("net.inet.tcp.pcblist");
|
head = getxpcblist("net.inet.tcp.pcblist");
|
||||||
|
|
||||||
#define XINP_NEXT(xinp) \
|
#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;
|
for (xinp = XINP_NEXT(head); xinp->xig_len > sizeof *xinp;
|
||||||
xinp = XINP_NEXT(xinp)) {
|
xinp = XINP_NEXT(xinp)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user