From eb44ce6f4bef11659baed3f7e55b54871b6ba043 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 14 Apr 2020 22:38:56 -0700 Subject: rh: Remove compiler warning Adds UHD_UNUSED() to tag variables that is only used in a UHD_LOG_TRACE() macro. Note this would be also be possible by tagging the local functions {rx,tx}_band_to_log as unused, but g++ does not support that specific kind of attribute, at least in the current versions. --- host/lib/usrp/dboard/rhodium/rhodium_radio_control_cpld.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'host') diff --git a/host/lib/usrp/dboard/rhodium/rhodium_radio_control_cpld.cpp b/host/lib/usrp/dboard/rhodium/rhodium_radio_control_cpld.cpp index f4f17e8ab..8316f0a04 100644 --- a/host/lib/usrp/dboard/rhodium/rhodium_radio_control_cpld.cpp +++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_control_cpld.cpp @@ -73,7 +73,8 @@ void rhodium_radio_control_impl::_update_rx_freq_switches(const double freq) { RFNOC_LOG_TRACE("Update all RX freq related switches. f=" << freq << " Hz"); const auto band = _map_freq_to_rx_band(freq); - RFNOC_LOG_TRACE("Selected band " << rx_band_to_log(band)); + const auto UHD_UNUSED(log_band) = rx_band_to_log(band); + RFNOC_LOG_TRACE("Selected band " << log_band); // select values for lowband/highband switches const bool is_lowband = (band == rx_band::RX_BAND_0); @@ -139,7 +140,8 @@ void rhodium_radio_control_impl::_update_tx_freq_switches(const double freq) { RFNOC_LOG_TRACE("Update all TX freq related switches. f=" << freq << " Hz"); const auto band = _map_freq_to_tx_band(freq); - RFNOC_LOG_TRACE("Selected band " << tx_band_to_log(band)); + const auto UHD_UNUSED(log_band) = tx_band_to_log(band); + RFNOC_LOG_TRACE("Selected band " << log_band); // select values for lowband/highband switches const bool is_lowband = (band == tx_band::TX_BAND_0); -- cgit v1.2.3