forked from Mirror/frr
quagga: Additional centos 6 -enable-werror fixes
This commit fixes these warnings: 1) bgpd/bgp_nexthop.c - dereferencing pointer 'X' does break strict-aliasing rules 3) ripd/ripd.c - 'ifaddr.prefixlen' may be used uninitialized in this function Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
bed578b8b9
commit
4608cb43b1
|
@ -211,9 +211,9 @@ bgp_connected_add (struct connected *ifc)
|
|||
|
||||
addr = ifc->address;
|
||||
|
||||
p = *(CONNECTED_PREFIX(ifc));
|
||||
if (addr->family == AF_INET)
|
||||
{
|
||||
PREFIX_COPY_IPV4(&p, CONNECTED_PREFIX(ifc));
|
||||
apply_mask_ipv4 ((struct prefix_ipv4 *) &p);
|
||||
|
||||
if (prefix_ipv4_any ((struct prefix_ipv4 *) &p))
|
||||
|
@ -251,7 +251,6 @@ bgp_connected_add (struct connected *ifc)
|
|||
#ifdef HAVE_IPV6
|
||||
else if (addr->family == AF_INET6)
|
||||
{
|
||||
PREFIX_COPY_IPV6(&p, CONNECTED_PREFIX(ifc));
|
||||
apply_mask_ipv6 ((struct prefix_ipv6 *) &p);
|
||||
|
||||
if (IN6_IS_ADDR_UNSPECIFIED (&p.u.prefix6))
|
||||
|
@ -286,9 +285,9 @@ bgp_connected_delete (struct connected *ifc)
|
|||
|
||||
addr = ifc->address;
|
||||
|
||||
p = *(CONNECTED_PREFIX(ifc));
|
||||
if (addr->family == AF_INET)
|
||||
{
|
||||
PREFIX_COPY_IPV4(&p, CONNECTED_PREFIX(ifc));
|
||||
apply_mask_ipv4 ((struct prefix_ipv4 *) &p);
|
||||
|
||||
if (prefix_ipv4_any ((struct prefix_ipv4 *) &p))
|
||||
|
@ -313,7 +312,6 @@ bgp_connected_delete (struct connected *ifc)
|
|||
#ifdef HAVE_IPV6
|
||||
else if (addr->family == AF_INET6)
|
||||
{
|
||||
PREFIX_COPY_IPV6(&p, CONNECTED_PREFIX(ifc));
|
||||
apply_mask_ipv6 ((struct prefix_ipv6 *) &p);
|
||||
|
||||
if (IN6_IS_ADDR_UNSPECIFIED (&p.u.prefix6))
|
||||
|
|
|
@ -1108,7 +1108,8 @@ rip_response_process (struct rip_packet *packet, int size,
|
|||
struct prefix_ipv4 ifaddr;
|
||||
struct prefix_ipv4 ifaddrclass;
|
||||
int subnetted;
|
||||
|
||||
|
||||
memset(&ifaddr, 0, sizeof(ifaddr));
|
||||
/* We don't know yet. */
|
||||
subnetted = -1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue