Skip to content

Commit 6518e3f

Browse files
net: netrom: Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: KSPP#115 Signed-off-by: Gustavo A. R. Silva <[email protected]>
1 parent 731d5f4 commit 6518e3f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/netrom/nr_route.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ static int __must_check nr_add_node(ax25_address *nr, const char *mnemonic,
266266
fallthrough;
267267
case 2:
268268
re_sort_routes(nr_node, 0, 1);
269+
break;
269270
case 1:
270271
break;
271272
}
@@ -359,6 +360,7 @@ static int nr_del_node(ax25_address *callsign, ax25_address *neighbour, struct n
359360
fallthrough;
360361
case 1:
361362
nr_node->routes[1] = nr_node->routes[2];
363+
fallthrough;
362364
case 2:
363365
break;
364366
}
@@ -482,6 +484,7 @@ static int nr_dec_obs(void)
482484
fallthrough;
483485
case 1:
484486
s->routes[1] = s->routes[2];
487+
break;
485488
case 2:
486489
break;
487490
}
@@ -529,6 +532,7 @@ void nr_rt_device_down(struct net_device *dev)
529532
fallthrough;
530533
case 1:
531534
t->routes[1] = t->routes[2];
535+
break;
532536
case 2:
533537
break;
534538
}

0 commit comments

Comments
 (0)