<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/20496">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gsm_08_08: fix unreachable code in parse_powercap()<br><br>The function parse_powercap() contains a nested switch case statement<br>that is used to populate the variables lu and pwr_lev. Those variables<br>are used at the bottom of the function later. Unfortunately the (outer)<br>switch case that consumes the pdisc variable does not put a break; at<br>the end of its only case "GSM48_PDISC_MM", which eventually causes a<br>fall through to the default case, which simply returns. Since this can<br>not be intended, lets add a break to make the bottom code reachable in<br>case lu and pwr_lev are successfully populated.<br><br>Change-Id: I48331cca784d8fa3a5904f2c4cf1555622b319e8<br>Fixes: CID#214886<br>---<br>M src/osmo-bsc/gsm_08_08.c<br>1 file changed, 1 insertion(+), 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/96/20496/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c</span><br><span>index f3214c7..b7c7448 100644</span><br><span>--- a/src/osmo-bsc/gsm_08_08.c</span><br><span>+++ b/src/osmo-bsc/gsm_08_08.c</span><br><span>@@ -343,6 +343,7 @@</span><br><span>                       /* No power cap in other messages */</span><br><span>                         return;</span><br><span>              }</span><br><span style="color: hsl(120, 100%, 40%);">+             break;</span><br><span>       /* FIXME: pwr_lev in Paging Response? */</span><br><span>     default:</span><br><span>             /* No power cap in other messages */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/20496">change 20496</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/c/osmo-bsc/+/20496"/><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-Change-Id: I48331cca784d8fa3a5904f2c4cf1555622b319e8 </div>
<div style="display:none"> Gerrit-Change-Number: 20496 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>