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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Stefan Sperling gerrit-no-reply at lists.osmocom.org
Thu Nov 15 14:41:08 UTC 2018


Stefan Sperling has uploaded this change for review. ( 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
---
M src/osmo-bsc/abis_nm.c
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/81/11781/1

diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index f75470d..2950b5b 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -1409,6 +1409,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:
@@ -1433,6 +1434,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: newchange
Gerrit-Change-Id: I1ea4221fadf30074156e9d17d94a5cb065242584
Gerrit-Change-Number: 11781
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181115/4bcac5a1/attachment.htm>


More information about the gerrit-log mailing list