forked from Mirror/frr
*: fix GCC 7 switch/case fallthrough warnings
Need a comment on these. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
888efdbb5e
commit
acd738fc7f
|
@ -1764,6 +1764,7 @@ aspath_reconcile_as4 ( struct aspath *aspath, struct aspath *as4path)
|
|||
" across 2/4 ASN boundary somewhere, broken..");
|
||||
hops = seg->length;
|
||||
}
|
||||
/* fallthru */
|
||||
case AS_SEQUENCE:
|
||||
cpasns = MIN(seg->length, hops);
|
||||
hops -= seg->length;
|
||||
|
|
|
@ -350,6 +350,7 @@ bgp_timer_set (struct peer *peer)
|
|||
BGP_TIMER_OFF (peer->t_gr_restart);
|
||||
BGP_TIMER_OFF (peer->t_gr_stale);
|
||||
BGP_TIMER_OFF (peer->t_pmax_restart);
|
||||
/* fallthru */
|
||||
case Clearing:
|
||||
BGP_TIMER_OFF (peer->t_start);
|
||||
BGP_TIMER_OFF (peer->t_connect);
|
||||
|
|
|
@ -399,6 +399,7 @@ main (int argc, char **argv)
|
|||
case 'l':
|
||||
bgp_address = optarg;
|
||||
/* listenon implies -n */
|
||||
/* fallthru */
|
||||
case 'n':
|
||||
no_fib_flag = 1;
|
||||
break;
|
||||
|
|
|
@ -403,6 +403,7 @@ command_complete (struct graph *graph,
|
|||
trace_matcher ("trivial_match\n");
|
||||
if (exact_match_exists && !last_token)
|
||||
break;
|
||||
/* fallthru */
|
||||
case exact_match:
|
||||
trace_matcher ("exact_match\n");
|
||||
if (last_token)
|
||||
|
|
11
lib/jhash.c
11
lib/jhash.c
|
@ -74,24 +74,34 @@ jhash (const void *key, u_int32_t length, u_int32_t initval)
|
|||
{
|
||||
case 11:
|
||||
c += ((u_int32_t) k[10] << 24);
|
||||
/* fallthru */
|
||||
case 10:
|
||||
c += ((u_int32_t) k[9] << 16);
|
||||
/* fallthru */
|
||||
case 9:
|
||||
c += ((u_int32_t) k[8] << 8);
|
||||
/* fallthru */
|
||||
case 8:
|
||||
b += ((u_int32_t) k[7] << 24);
|
||||
/* fallthru */
|
||||
case 7:
|
||||
b += ((u_int32_t) k[6] << 16);
|
||||
/* fallthru */
|
||||
case 6:
|
||||
b += ((u_int32_t) k[5] << 8);
|
||||
/* fallthru */
|
||||
case 5:
|
||||
b += k[4];
|
||||
/* fallthru */
|
||||
case 4:
|
||||
a += ((u_int32_t) k[3] << 24);
|
||||
/* fallthru */
|
||||
case 3:
|
||||
a += ((u_int32_t) k[2] << 16);
|
||||
/* fallthru */
|
||||
case 2:
|
||||
a += ((u_int32_t) k[1] << 8);
|
||||
/* fallthru */
|
||||
case 1:
|
||||
a += k[0];
|
||||
};
|
||||
|
@ -129,6 +139,7 @@ jhash2 (const u_int32_t *k, u_int32_t length, u_int32_t initval)
|
|||
{
|
||||
case 2:
|
||||
b += k[1];
|
||||
/* fallthru */
|
||||
case 1:
|
||||
a += k[0];
|
||||
};
|
||||
|
|
|
@ -331,14 +331,14 @@ work_queue_run (struct thread *thread)
|
|||
{
|
||||
item->ran--;
|
||||
work_queue_item_requeue (wq, node);
|
||||
/* If a single node is being used with a meta-queue (e.g., zebra),
|
||||
* update the next node as we don't want to exit the thread and
|
||||
* reschedule it after every node. By definition, WQ_REQUEUE is
|
||||
* meant to continue the processing; the yield logic will kick in
|
||||
* to terminate the thread when time has exceeded.
|
||||
*/
|
||||
if (nnode == NULL)
|
||||
nnode = node;
|
||||
/* If a single node is being used with a meta-queue (e.g., zebra),
|
||||
* update the next node as we don't want to exit the thread and
|
||||
* reschedule it after every node. By definition, WQ_REQUEUE is
|
||||
* meant to continue the processing; the yield logic will kick in
|
||||
* to terminate the thread when time has exceeded.
|
||||
*/
|
||||
if (nnode == NULL)
|
||||
nnode = node;
|
||||
break;
|
||||
}
|
||||
case WQ_RETRY_NOW:
|
||||
|
@ -348,7 +348,7 @@ work_queue_run (struct thread *thread)
|
|||
if (wq->spec.errorfunc)
|
||||
wq->spec.errorfunc (wq, item);
|
||||
}
|
||||
/* fall through here is deliberate */
|
||||
/* fallthru */
|
||||
case WQ_SUCCESS:
|
||||
default:
|
||||
{
|
||||
|
|
|
@ -244,6 +244,7 @@ int nhrp_ext_reply(struct zbuf *zb, struct nhrp_packet_header *hdr, struct inter
|
|||
default:
|
||||
if (type & NHRP_EXTENSION_FLAG_COMPULSORY)
|
||||
goto err;
|
||||
/* fallthru */
|
||||
case NHRP_EXTENSION_FORWARD_TRANSIT_NHS:
|
||||
case NHRP_EXTENSION_REVERSE_TRANSIT_NHS:
|
||||
/* Supported compulsory extensions, and any
|
||||
|
|
|
@ -133,7 +133,7 @@ static void nhrp_peer_ifp_notify(struct notifier_block *n, unsigned long cmd)
|
|||
nhrp_vc_notify_add(p->vc, &p->vc_notifier, nhrp_peer_vc_notify);
|
||||
__nhrp_peer_check(p);
|
||||
}
|
||||
/* Fall-through to post config update */
|
||||
/* fallthru */ /* to post config update */
|
||||
case NOTIFY_INTERFACE_ADDRESS_CHANGED:
|
||||
notifier_call(&p->notifier_list, NOTIFY_PEER_IFCONFIG_CHANGED);
|
||||
break;
|
||||
|
@ -693,6 +693,7 @@ static void nhrp_peer_forward(struct nhrp_peer *p, struct nhrp_packet_parser *pp
|
|||
/* FIXME: RFC says to just copy, but not
|
||||
* append our selves to the transit NHS list */
|
||||
goto err;
|
||||
/* fallthru */
|
||||
case NHRP_EXTENSION_RESPONDER_ADDRESS:
|
||||
/* Supported compulsory extensions, and any
|
||||
* non-compulsory that is not explicitly handled,
|
||||
|
@ -855,6 +856,7 @@ void nhrp_peer_recv(struct nhrp_peer *p, struct zbuf *zb)
|
|||
/* FIXME: send error-indication */
|
||||
}
|
||||
}
|
||||
/* fallthru */ /* FIXME: double check, is this correct? */
|
||||
case NHRP_ROUTE_OFF_NBMA:
|
||||
if (packet_types[hdr->type].handler) {
|
||||
packet_types[hdr->type].handler(&pp);
|
||||
|
|
|
@ -392,7 +392,7 @@ ospf6_dbdesc_recv_master (struct ospf6_header *oh,
|
|||
return;
|
||||
}
|
||||
/* else fall through to ExStart */
|
||||
|
||||
/* fallthru */
|
||||
case OSPF6_NEIGHBOR_EXSTART:
|
||||
/* if neighbor obeys us as our slave, schedule negotiation_done
|
||||
and process LSA Headers. Otherwise, ignore this message */
|
||||
|
@ -600,7 +600,7 @@ ospf6_dbdesc_recv_slave (struct ospf6_header *oh,
|
|||
return;
|
||||
}
|
||||
/* else fall through to ExStart */
|
||||
|
||||
/* fallthru */
|
||||
case OSPF6_NEIGHBOR_EXSTART:
|
||||
/* If the neighbor is Master, act as Slave. Schedule negotiation_done
|
||||
and process LSA Headers. Otherwise, ignore this message */
|
||||
|
|
|
@ -493,6 +493,7 @@ ospfv3GeneralGroup (struct variable *v, oid *name, size_t *length,
|
|||
if (ospf6)
|
||||
return SNMP_INTEGER (ospf6->ref_bandwidth);
|
||||
/* Otherwise, like for "not implemented". */
|
||||
/* fallthru */
|
||||
case OSPFv3RESTARTSUPPORT:
|
||||
case OSPFv3RESTARTINTERVAL:
|
||||
case OSPFv3RESTARTSTRICTLSACHECKING:
|
||||
|
|
|
@ -1033,6 +1033,7 @@ ospf_vl_set_params (struct ospf_vl_data *vl_data, struct vertex *v)
|
|||
case LSA_LINK_TYPE_VIRTUALLINK:
|
||||
if (IS_DEBUG_OSPF_EVENT)
|
||||
zlog_debug ("found back link through VL");
|
||||
/* fallthru */
|
||||
case LSA_LINK_TYPE_TRANSIT:
|
||||
case LSA_LINK_TYPE_POINTOPOINT:
|
||||
if (!IPV4_ADDR_SAME (&vl_data->peer_addr,
|
||||
|
|
|
@ -113,6 +113,7 @@ nsm_timer_set (struct ospf_neighbor *nbr)
|
|||
case NSM_Down:
|
||||
OSPF_NSM_TIMER_OFF (nbr->t_inactivity);
|
||||
OSPF_NSM_TIMER_OFF (nbr->t_hello_reply);
|
||||
/* fallthru */
|
||||
case NSM_Attempt:
|
||||
case NSM_Init:
|
||||
case NSM_TwoWay:
|
||||
|
|
|
@ -1152,6 +1152,7 @@ ospf_db_desc_proc (struct stream *s, struct ospf_interface *oi,
|
|||
case -1:
|
||||
/* Neighbour has a more recent LSA, we must request it */
|
||||
ospf_ls_request_add (nbr, new);
|
||||
/* fallthru */
|
||||
case 0:
|
||||
/* If we have a copy of this LSA, it's either less recent
|
||||
* and we're requesting it from neighbour (the case above), or
|
||||
|
@ -1327,6 +1328,7 @@ ospf_db_desc (struct ip *iph, struct ospf_header *ospfh,
|
|||
through to case ExStart below. */
|
||||
if (nbr->state != NSM_ExStart)
|
||||
break;
|
||||
/* fallthru */
|
||||
case NSM_ExStart:
|
||||
/* Initial DBD */
|
||||
if ((IS_SET_DD_ALL (dd->flags) == OSPF_DD_FLAG_ALL) &&
|
||||
|
|
Loading…
Reference in a new issue