mobile: fix -Wmaybe-uninitialized in gsm48_rr_tx_meas_rep()master
commit04ea6f9cab3d9d5120c77f88b500bad526564c0a
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>
Wed, 12 Jun 2024 12:05:09 +0000 (12 19:05 +0700)
committerfixeria <vyanitskiy@sysmocom.de>
Sat, 15 Jun 2024 05:19:38 +0000 (15 05:19 +0000)
tree7c8b51587a604d46d16afa25057799ea6179689f
parentc310fcfef7f10d026fbfb9569c2a2b46c6984186
mobile: fix -Wmaybe-uninitialized in gsm48_rr_tx_meas_rep()

This is very unlikely to happen, because we set strongest to 127,
but anyway we don't want to see those warnings:

gsm48_rr.c: In function ‘gsm48_rr_tx_meas_rep.isra’:
gsm48_rr.c:3714:74: warning: ‘strongest_i’ may be used uninitialized [-Wmaybe-uninitialized]
 3714 |                                 if (rrmeas->nc_rxlev_dbm[i] == strongest && i <= strongest_i)
      |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
gsm48_rr.c:3696:31: note: ‘strongest_i’ was declared here
 3696 |                 int i, index, strongest_i;
      |                               ^~~~~~~~~~~

Change-Id: I111438633ed48e16f7c43fc1b7a23ae6753a404d
src/host/layer23/src/mobile/gsm48_rr.c