diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-07-08 10:18:50 +0200 |
---|---|---|
committer | michael-west <michael.west@ettus.com> | 2020-07-16 13:44:42 -0700 |
commit | ad2f8d447b759287c8a2d92c460e2fc058ad33eb (patch) | |
tree | bcfdf3bf9dbe9329c97c7485b18d2ad6219b98d2 | |
parent | ad9361: Remove compiler warning (diff) | |
download | uhd-ad2f8d447b759287c8a2d92c460e2fc058ad33eb.tar.xz uhd-ad2f8d447b759287c8a2d92c460e2fc058ad33eb.zip |
rh: Remove compiler warnings
- Remove warnings related to functions only used in TRACE log statements
- Fix a catch statement that caught by value
-rw-r--r-- | host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_cpld.cpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_cpld.cpp b/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_cpld.cpp index d270c116a..18ffbae11 100644 --- a/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_cpld.cpp +++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_cpld.cpp @@ -72,7 +72,8 @@ void rhodium_radio_ctrl_impl::_update_rx_freq_switches(const double freq) UHD_LOG_TRACE( unique_id(), "Update all RX freq related switches. f=" << freq << " Hz, "); const auto band = _map_freq_to_rx_band(freq); - UHD_LOG_TRACE(unique_id(), "Selected band " << rx_band_to_log(band)); + const auto UHD_UNUSED(log_band) = rx_band_to_log(band); + UHD_LOG_TRACE(unique_id(), "Selected band " << log_band); // select values for lowband/highband switches const bool is_lowband = (band == rx_band::RX_BAND_0); @@ -141,7 +142,8 @@ void rhodium_radio_ctrl_impl::_update_tx_freq_switches(const double freq) const auto band = _map_freq_to_tx_band(freq); - UHD_LOG_TRACE(unique_id(), "Selected band " << tx_band_to_log(band)); + const auto UHD_UNUSED(log_band) = tx_band_to_log(band); + UHD_LOG_TRACE(unique_id(), "Selected band " << log_band); // select values for lowband/highband switches const bool is_lowband = (band == tx_band::TX_BAND_0); diff --git a/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp index 9c5bfd7fa..6bca87768 100644 --- a/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp +++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_impl.cpp @@ -280,7 +280,7 @@ double rhodium_radio_ctrl_impl::set_rx_frequency(const double freq, const size_t } double rhodium_radio_ctrl_impl::set_rx_bandwidth( - const double bandwidth, const size_t chan) + const double UHD_UNUSED(bandwidth), const size_t chan) { UHD_LOG_TRACE(unique_id(), "set_rx_bandwidth(bandwidth=" << bandwidth << ", chan=" << chan << ")"); @@ -290,7 +290,7 @@ double rhodium_radio_ctrl_impl::set_rx_bandwidth( } double rhodium_radio_ctrl_impl::set_tx_bandwidth( - const double bandwidth, const size_t chan) + const double UHD_UNUSED(bandwidth), const size_t chan) { UHD_LOG_TRACE(unique_id(), "set_tx_bandwidth(bandwidth=" << bandwidth << ", chan=" << chan << ")"); @@ -636,7 +636,7 @@ void rhodium_radio_ctrl_impl::set_rpc_client( if (!std::isnormal(identify_duration)) { identify_duration = DEFAULT_IDENTIFY_DURATION; } - } catch (std::invalid_argument) { + } catch (const std::invalid_argument&) { identify_duration = DEFAULT_IDENTIFY_DURATION; } |