mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
lib: Fix compiler warning in db_dbsrx.cpp
On modern compilers, this file could cause a warning such as: warning: ‘void operator delete(void*, std::size_t)’ called on pointer ‘<unknown>’ with nonzero offset [8, 9223372036854775800] [-Wfree-nonheap-object] A minor refactoring avoids the warning, even though it was unlikely a real issue in the first place.
This commit is contained in:
parent
e416bffa95
commit
2a2ce50abe
@ -267,10 +267,10 @@ double dbsrx::set_lo_freq(double target_freq)
|
||||
int R = 0, N = 0, r = 0, m = 0;
|
||||
bool update_filter_settings = false;
|
||||
// choose refclock
|
||||
std::vector<double> clock_rates =
|
||||
this->get_iface()->get_clock_rates(dboard_iface::UNIT_RX);
|
||||
const double max_clock_rate = uhd::sorted(clock_rates).back();
|
||||
for (auto ref_clock_it : uhd::reversed(uhd::sorted(clock_rates))) {
|
||||
const std::vector<double> clock_rates =
|
||||
uhd::sorted(this->get_iface()->get_clock_rates(dboard_iface::UNIT_RX));
|
||||
const double max_clock_rate = clock_rates.back();
|
||||
for (auto ref_clock_it : uhd::reversed(clock_rates)) {
|
||||
ref_clock = ref_clock_it;
|
||||
// USRP1 feeds the DBSRX clock from a FPGA GPIO line.
|
||||
// make sure that this clock does not exceed rate limit.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user