Change in osmo-bsc[master]: add missing 'break' in switch statement

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Nov 18 20:44:57 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11781 )

Change subject: add missing 'break' in switch statement
......................................................................

add missing 'break' in switch statement

Coverity points out that abis_nm_rcvmsg_sw() contains a switch
statement with suspicious looking missing break statements.

It is unclear to me if the code intends to process some
types of messages in more than one state, or of all messages
which affect a particular state already appear in the state's
corresponding switch block.

Can someone else tell what is supposed to happen here?

If this code is falling through intentionally, I will suggest
a patch adding /* fallthrough */ comments for clarity.

Change-Id: I1ea4221fadf30074156e9d17d94a5cb065242584
Related: CID#57703
Related: CID#57704
---
M src/osmo-bsc/abis_nm.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index 8f5a514..c1a26ac 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -1463,6 +1463,7 @@
 			abis_nm_queue_send_next(sign_link->trx->bts);
 			break;
 		}
+		break;
 	case SW_STATE_WAIT_ACTACK:
 		switch (foh->msg_type) {
 		case NM_MT_ACTIVATE_SW_ACK:
@@ -1487,6 +1488,7 @@
 			abis_nm_queue_send_next(sign_link->trx->bts);
 			break;
 		}
+		break;
 	case SW_STATE_NONE:
 		switch (foh->msg_type) {
 		case NM_MT_ACTIVATE_SW_ACK:

-- 
To view, visit https://gerrit.osmocom.org/11781
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1ea4221fadf30074156e9d17d94a5cb065242584
Gerrit-Change-Number: 11781
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181118/22010ebb/attachment.html>


More information about the gerrit-log mailing list