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 /zebra/zebra_rib.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 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 3 | 
1 files changed, 1 insertions, 2 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index c05d69a2dd..79f6ad484c 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -4082,7 +4082,6 @@ static void _route_entry_dump_nh(const struct route_entry *re,  			 ifp ? ifp->name : "Unknown");  		break;  	case NEXTHOP_TYPE_IPV4: -		/* fallthrough */  	case NEXTHOP_TYPE_IPV4_IFINDEX:  		inet_ntop(AF_INET, &nexthop->gate, nhname, INET6_ADDRSTRLEN);  		break; @@ -5043,7 +5042,7 @@ struct route_table *rib_tables_iter_next(rib_tables_iter_t *iter)  		iter->vrf_id = VRF_DEFAULT;  		iter->afi_safi_ix = -1; -	/* Fall through */ +		fallthrough;  	case RIB_TABLES_ITER_S_ITERATING:  		iter->afi_safi_ix++;  | 
