Skip to content

Commit 3754fa7

Browse files
rds: 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 Reviewed-by: Håkon Bugge <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
1 parent 5af5a02 commit 3754fa7

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

net/rds/tcp_connect.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ void rds_tcp_state_change(struct sock *sk)
7878
case TCP_CLOSE_WAIT:
7979
case TCP_CLOSE:
8080
rds_conn_path_drop(cp, false);
81+
break;
8182
default:
8283
break;
8384
}

net/rds/threads.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ void rds_send_worker(struct work_struct *work)
208208
case -ENOMEM:
209209
rds_stats_inc(s_send_delayed_retry);
210210
queue_delayed_work(rds_wq, &cp->cp_send_w, 2);
211+
break;
211212
default:
212213
break;
213214
}
@@ -232,6 +233,7 @@ void rds_recv_worker(struct work_struct *work)
232233
case -ENOMEM:
233234
rds_stats_inc(s_recv_delayed_retry);
234235
queue_delayed_work(rds_wq, &cp->cp_recv_w, 2);
236+
break;
235237
default:
236238
break;
237239
}

0 commit comments

Comments
 (0)