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
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 @@
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 @@
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);