aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-07-03 15:43:03 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-07-03 15:49:38 +0200
commit9bb24a1103f0781a6a02118cff498dac26810590 (patch)
treed12b5adbc8e046e2d19f6f42118751eecf8076d2 /Transceiver52M
parentd6dbb1b987afe0dbc86692c8dd5f27e873b1630c (diff)
Transceiver: pullRadioVector(): Move initialization of var to start of function
This will be needed upon forthcoming refactor to support idle frames, which will add a goto return. Otherwise compiler complains: error: jump to label ret_idle [-fpermissive] note: crosses initialization of unsigned int max_toa Change-Id: Icd2793adc7b73a795184639b95fb5da336909b59
Diffstat (limited to 'Transceiver52M')
-rw-r--r--Transceiver52M/Transceiver.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 81b428a..92d4061 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -577,6 +577,7 @@ bool Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi)
int rc;
complex amp;
float toa, max = -1.0, avg = 0.0;
+ unsigned max_toa;
int max_i = -1;
signalVector *burst;
GSM::Time burstTime;
@@ -645,8 +646,8 @@ bool Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi)
return false;
}
- unsigned max_toa = (type == RACH || type == EXT_RACH) ?
- mMaxExpectedDelayAB : mMaxExpectedDelayNB;
+ max_toa = (type == RACH || type == EXT_RACH) ?
+ mMaxExpectedDelayAB : mMaxExpectedDelayNB;
/* Detect normal or RACH bursts */
rc = detectAnyBurst(*burst, mTSC, BURST_THRESH, mSPSRx, type, amp, toa, max_toa);