<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/24913">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">handover_test: fix ts_str may be uninitialized<br><br>Fix for:<br>  handover_test.c: In function 'res_ind':<br>  handover_test.c:1094:30: error: 'ts_str' may be used uninitialized in this function [-Werror=maybe-uninitialized]<br>       char subslot_val = ts_str[lchan->nr];<br><br>Fixes: f76424 ("RES IND: add test_resource_indication.ho_vty")<br>Change-Id: I398ba24b945bad96896eeb5ddbaff9c48bacf8ab<br>---<br>M tests/handover/handover_test.c<br>1 file changed, 2 insertions(+), 2 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/13/24913/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c</span><br><span>index 8d316ca..2c97f78 100644</span><br><span>--- a/tests/handover/handover_test.c</span><br><span>+++ b/tests/handover/handover_test.c</span><br><span>@@ -1077,7 +1077,7 @@</span><br><span> </span><br><span>     level = 0xff;</span><br><span>        for (i = 0; i < ARRAY_SIZE(trx->ts); i++) {</span><br><span style="color: hsl(0, 100%, 40%);">-               const char *ts_str;</span><br><span style="color: hsl(120, 100%, 40%);">+           const char *ts_str = NULL;</span><br><span>           struct gsm_lchan *lchan;</span><br><span>             size_t given_subslots = 0;</span><br><span>           struct gsm_bts_trx_ts *ts = &trx->ts[i];</span><br><span>@@ -1090,7 +1090,7 @@</span><br><span>              ts_for_n_lchans(lchan, ts, ts->max_lchans_possible) {</span><br><span>                     int chan_nr;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-                        if (lchan->nr < given_subslots) {</span><br><span style="color: hsl(120, 100%, 40%);">+                       if (lchan->nr < given_subslots && ts_str) {</span><br><span>                            char subslot_val = ts_str[lchan->nr];</span><br><span>                             switch (subslot_val) {</span><br><span>                               case '-':</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/24913">change 24913</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/+/24913"/><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: I398ba24b945bad96896eeb5ddbaff9c48bacf8ab </div>
<div style="display:none"> Gerrit-Change-Number: 24913 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>