Change in ...osmo-trx[master]: Transceiver: pullRadioVector(): Move initialization of var to start o...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Sun Jul 7 14:48:33 UTC 2019


pespin has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-trx/+/14663 )

Change subject: Transceiver: pullRadioVector(): Move initialization of var to start of function
......................................................................

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
---
M Transceiver52M/Transceiver.cpp
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



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

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/14663
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Icd2793adc7b73a795184639b95fb5da336909b59
Gerrit-Change-Number: 14663
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190707/0f84f255/attachment.htm>


More information about the gerrit-log mailing list