<p>Stefan Sperling has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11781">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">add missing 'break' in switch statement<br><br>Coverity points out that abis_nm_rcvmsg_sw() contains a switch<br>statement with suspicious looking missing break statements.<br><br>It is unclear to me if the code intends to process some<br>types of messages in more than one state, or of all messages<br>which affect a particular state already appear in the state's<br>corresponding switch block.<br><br>Can someone else tell what is supposed to happen here?<br><br>If this code is falling through intentionally, I will suggest<br>a patch adding /* fallthrough */ comments for clarity.<br><br>Change-Id: I1ea4221fadf30074156e9d17d94a5cb065242584<br>Related: CID#57703<br>---<br>M src/osmo-bsc/abis_nm.c<br>1 file changed, 2 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/81/11781/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c</span><br><span>index f75470d..2950b5b 100644</span><br><span>--- a/src/osmo-bsc/abis_nm.c</span><br><span>+++ b/src/osmo-bsc/abis_nm.c</span><br><span>@@ -1409,6 +1409,7 @@</span><br><span>                    abis_nm_queue_send_next(sign_link->trx->bts);</span><br><span>                  break;</span><br><span>               }</span><br><span style="color: hsl(120, 100%, 40%);">+             break;</span><br><span>       case SW_STATE_WAIT_ACTACK:</span><br><span>           switch (foh->msg_type) {</span><br><span>          case NM_MT_ACTIVATE_SW_ACK:</span><br><span>@@ -1433,6 +1434,7 @@</span><br><span>                  abis_nm_queue_send_next(sign_link->trx->bts);</span><br><span>                  break;</span><br><span>               }</span><br><span style="color: hsl(120, 100%, 40%);">+             break;</span><br><span>       case SW_STATE_NONE:</span><br><span>          switch (foh->msg_type) {</span><br><span>          case NM_MT_ACTIVATE_SW_ACK:</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11781">change 11781</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11781"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I1ea4221fadf30074156e9d17d94a5cb065242584 </div>
<div style="display:none"> Gerrit-Change-Number: 11781 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Stefan Sperling <ssperling@sysmocom.de> </div>