0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 02:01:55 +00:00

Avoid fallthrough warnings

This commit is contained in:
Ondrej Zajicek (work) 2019-07-11 15:36:42 +02:00
parent 6b72ea4c14
commit a92aee467e
5 changed files with 6 additions and 0 deletions

View File

@ -342,6 +342,7 @@ int bvsnprintf(char *buf, int size, const char *fmt, va_list args)
case 'X': case 'X':
flags |= LARGE; flags |= LARGE;
/* fallthrough */
case 'x': case 'x':
base = 16; base = 16;
break; break;

View File

@ -141,6 +141,7 @@ bfd_fill_authentication(struct bfd_proto *p, struct bfd_session *s, struct bfd_c
case BFD_AUTH_METICULOUS_KEYED_MD5: case BFD_AUTH_METICULOUS_KEYED_MD5:
case BFD_AUTH_METICULOUS_KEYED_SHA1: case BFD_AUTH_METICULOUS_KEYED_SHA1:
meticulous = 1; meticulous = 1;
/* fallthrough */
case BFD_AUTH_KEYED_MD5: case BFD_AUTH_KEYED_MD5:
case BFD_AUTH_KEYED_SHA1: case BFD_AUTH_KEYED_SHA1:
@ -230,6 +231,7 @@ bfd_check_authentication(struct bfd_proto *p, struct bfd_session *s, struct bfd_
case BFD_AUTH_METICULOUS_KEYED_MD5: case BFD_AUTH_METICULOUS_KEYED_MD5:
case BFD_AUTH_METICULOUS_KEYED_SHA1: case BFD_AUTH_METICULOUS_KEYED_SHA1:
meticulous = 1; meticulous = 1;
/* fallthrough */
case BFD_AUTH_KEYED_MD5: case BFD_AUTH_KEYED_MD5:
case BFD_AUTH_KEYED_SHA1: case BFD_AUTH_KEYED_SHA1:

View File

@ -347,6 +347,7 @@ ospf_receive_dbdes(struct ospf_packet *pkt, struct ospf_iface *ifa,
ospf_neigh_sm(n, INM_2WAYREC); ospf_neigh_sm(n, INM_2WAYREC);
if (n->state != NEIGHBOR_EXSTART) if (n->state != NEIGHBOR_EXSTART)
return; return;
/* fallthrough */
case NEIGHBOR_EXSTART: case NEIGHBOR_EXSTART:
if ((ifa->type != OSPF_IT_VLINK) && if ((ifa->type != OSPF_IT_VLINK) &&

View File

@ -1203,6 +1203,7 @@ ospf_sh_state(struct proto *P, int verbose, int reachable)
he->domain = 1; /* Abuse domain field to mark the LSA */ he->domain = 1; /* Abuse domain field to mark the LSA */
hex[jx++] = he; hex[jx++] = he;
} }
/* fallthrough */
default: default:
accept = 0; accept = 0;
} }

View File

@ -56,6 +56,7 @@ ospf_pkt_finalize(struct ospf_iface *ifa, struct ospf_packet *pkt, uint *plen)
return; return;
} }
strncpy(auth->password, pass->password, sizeof(auth->password)); strncpy(auth->password, pass->password, sizeof(auth->password));
/* fallthrough */
case OSPF_AUTH_NONE: case OSPF_AUTH_NONE:
{ {