diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2023-10-11 00:15:32 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2023-10-12 21:23:18 +0300 |
| commit | 7d67b9ff28d09de58c632f80ef7d330e45e698f6 (patch) | |
| tree | 16c8afc9dc80d70951f83d2f1182ace0edc7ee49 /ospfd/ospf_packet.c | |
| parent | 9bc4d9eaec92589deda092bd867054e25e64be3f (diff) | |
build: add -Wimplicit-fallthrough
Also:
- replace all /* fallthrough */ comments with portable fallthrough;
pseudo keyword to accomodate both gcc and clang
- add missing break; statements as required by older versions of gcc
- cleanup some code to remove unnecessary fallthrough
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ospfd/ospf_packet.c')
| -rw-r--r-- | ospfd/ospf_packet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index b37efa3efa..4bf4ae9597 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -1042,7 +1042,7 @@ static void ospf_db_desc_proc(struct stream *s, struct ospf_interface *oi, /* Neighbour has a more recent LSA, we must request it */ ospf_ls_request_add(nbr, new); - /* fallthru */ + fallthrough; case 0: /* If we have a copy of this LSA, it's either less * recent @@ -1231,7 +1231,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh, through to case ExStart below. */ if (nbr->state != NSM_ExStart) break; - /* fallthru */ + fallthrough; case NSM_ExStart: /* Initial DBD */ if ((IS_SET_DD_ALL(dd->flags) == OSPF_DD_FLAG_ALL) @@ -1641,7 +1641,7 @@ static struct list *ospf_ls_upd_list_lsa(struct ospf_neighbor *nbr, case OSPF_OPAQUE_LINK_LSA: lsa->oi = oi; /* Remember incoming interface for flooding control. */ - /* Fallthrough */ + fallthrough; default: lsa->area = oi->area; break; |
