From 2a2ce50abef33c33b8b4b2e1a21fb9054c2a8404 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 28 Jul 2026 15:29:01 +0200 Subject: [PATCH] lib: Fix compiler warning in db_dbsrx.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On modern compilers, this file could cause a warning such as: warning: ‘void operator delete(void*, std::size_t)’ called on pointer ‘’ 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. --- host/lib/usrp/dboard/db_dbsrx.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp index 7c2bad2e8..1780b328d 100644 --- a/host/lib/usrp/dboard/db_dbsrx.cpp +++ b/host/lib/usrp/dboard/db_dbsrx.cpp @@ -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 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 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.