Fix warnings caused by discarding const.
Hairy Eyeball At: peter
This commit is contained in:
parent
3ffc8ab1ac
commit
c4c0c592f0
@ -1791,8 +1791,8 @@ ip6_sprintf(addr)
|
||||
static char ip6buf[8][48];
|
||||
int i;
|
||||
char *cp;
|
||||
u_short *a = (u_short *)addr;
|
||||
u_char *d;
|
||||
const u_short *a = (const u_short *)addr;
|
||||
const u_char *d;
|
||||
int dcolon = 0;
|
||||
|
||||
ip6round = (ip6round + 1) & 7;
|
||||
@ -1821,7 +1821,7 @@ ip6_sprintf(addr)
|
||||
a++;
|
||||
continue;
|
||||
}
|
||||
d = (u_char *)a;
|
||||
d = (const u_char *)a;
|
||||
*cp++ = digits[*d >> 4];
|
||||
*cp++ = digits[*d++ & 0xf];
|
||||
*cp++ = digits[*d >> 4];
|
||||
|
@ -759,7 +759,8 @@ in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam)
|
||||
void
|
||||
in6_pcbnotify(head, dst, fport_arg, src, lport_arg, cmd, notify)
|
||||
struct inpcbhead *head;
|
||||
struct sockaddr *dst, *src;
|
||||
struct sockaddr *dst;
|
||||
const struct sockaddr *src;
|
||||
u_int fport_arg, lport_arg;
|
||||
int cmd;
|
||||
void (*notify) __P((struct inpcb *, int));
|
||||
@ -780,7 +781,7 @@ in6_pcbnotify(head, dst, fport_arg, src, lport_arg, cmd, notify)
|
||||
/*
|
||||
* note that src can be NULL when we get notify by local fragmentation.
|
||||
*/
|
||||
sa6_src = (src == NULL) ? sa6_any : *(struct sockaddr_in6 *)src;
|
||||
sa6_src = (src == NULL) ? sa6_any : *(const struct sockaddr_in6 *)src;
|
||||
flowinfo = sa6_src.sin6_flowinfo;
|
||||
|
||||
/*
|
||||
|
@ -91,7 +91,7 @@ struct inpcb *
|
||||
struct in6_addr *, u_int, struct in6_addr *,
|
||||
u_int, int, struct ifnet *));
|
||||
void in6_pcbnotify __P((struct inpcbhead *, struct sockaddr *,
|
||||
u_int, struct sockaddr *, u_int, int,
|
||||
u_int, const struct sockaddr *, u_int, int,
|
||||
void (*)(struct inpcb *, int)));
|
||||
void in6_rtchange __P((struct inpcb *, int));
|
||||
int in6_setpeeraddr __P((struct socket *so, struct sockaddr **nam));
|
||||
|
@ -649,7 +649,7 @@ add_each_addr(struct socket *so, struct rr_prefix *rpp, struct rp_addr *rap)
|
||||
if (rap->ra_flags.anycast != 0)
|
||||
ifra.ifra_flags |= IN6_IFF_ANYCAST;
|
||||
error = in6_control(so, SIOCAIFADDR_IN6, (caddr_t)&ifra, rpp->rp_ifp,
|
||||
curproc);
|
||||
curthread);
|
||||
if (error != 0) {
|
||||
log(LOG_ERR, "in6_prefix.c: add_each_addr: addition of an addr"
|
||||
"%s/%d failed because in6_control failed for error %d\n",
|
||||
|
@ -279,7 +279,7 @@ rip6_ctlinput(cmd, sa, d)
|
||||
sa6_src = &sa6_any;
|
||||
}
|
||||
|
||||
(void) in6_pcbnotify(&ripcb, sa, 0, (struct sockaddr *)sa6_src,
|
||||
(void) in6_pcbnotify(&ripcb, sa, 0, (const struct sockaddr *)sa6_src,
|
||||
0, cmd, notify);
|
||||
}
|
||||
|
||||
|
@ -453,7 +453,8 @@ udp6_ctlinput(cmd, sa, d)
|
||||
(struct sockaddr *)ip6cp->ip6c_src,
|
||||
uh.uh_sport, cmd, notify);
|
||||
} else
|
||||
(void) in6_pcbnotify(&udb, sa, 0, (struct sockaddr *)sa6_src,
|
||||
(void) in6_pcbnotify(&udb, sa, 0,
|
||||
(const struct sockaddr *)sa6_src,
|
||||
0, cmd, notify);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user