diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-01-08 13:21:00 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-03-04 08:20:04 -0600 |
commit | ecefbdd9ab245c1ef3ea8a8521ea79952f06dbe8 (patch) | |
tree | c64a41d1eccaaa66e201b03a0c37a01f5f393b5f /host/lib/rfnoc | |
parent | a6a6f25404eac9cf9e01585d81fb67e9693d8769 (diff) | |
download | uhd-ecefbdd9ab245c1ef3ea8a8521ea79952f06dbe8.tar.gz uhd-ecefbdd9ab245c1ef3ea8a8521ea79952f06dbe8.tar.bz2 uhd-ecefbdd9ab245c1ef3ea8a8521ea79952f06dbe8.zip |
lib: Fix warnings related to unnecessary lambda captures
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r-- | host/lib/rfnoc/chdr_ctrl_xport.cpp | 3 | ||||
-rw-r--r-- | host/lib/rfnoc/duc_block_control.cpp | 2 | ||||
-rw-r--r-- | host/lib/rfnoc/fir_filter_block_control.cpp | 6 | ||||
-rw-r--r-- | host/lib/rfnoc/graph.cpp | 4 | ||||
-rw-r--r-- | host/lib/rfnoc/radio_control_impl.cpp | 1 | ||||
-rw-r--r-- | host/lib/rfnoc/rfnoc_rx_streamer.cpp | 9 | ||||
-rw-r--r-- | host/lib/rfnoc/rfnoc_tx_streamer.cpp | 9 | ||||
-rw-r--r-- | host/lib/rfnoc/window_block_control.cpp | 2 |
8 files changed, 23 insertions, 13 deletions
diff --git a/host/lib/rfnoc/chdr_ctrl_xport.cpp b/host/lib/rfnoc/chdr_ctrl_xport.cpp index f8b3cf03e..595e0b6dd 100644 --- a/host/lib/rfnoc/chdr_ctrl_xport.cpp +++ b/host/lib/rfnoc/chdr_ctrl_xport.cpp @@ -24,8 +24,7 @@ chdr_ctrl_xport::chdr_ctrl_xport(io_service::sptr io_srv, : _my_epid(my_epid), _recv_packet(pkt_factory.make_generic()), _disconnect(disconnect) { /* Make dumb send pipe */ - send_io_if::send_callback_t send_cb = [this]( - frame_buff::uptr buff, send_link_if* link) { + send_io_if::send_callback_t send_cb = [](frame_buff::uptr buff, send_link_if* link) { link->release_send_buff(std::move(buff)); }; _send_if = io_srv->make_send_client( diff --git a/host/lib/rfnoc/duc_block_control.cpp b/host/lib/rfnoc/duc_block_control.cpp index f78274067..87f6500a2 100644 --- a/host/lib/rfnoc/duc_block_control.cpp +++ b/host/lib/rfnoc/duc_block_control.cpp @@ -318,6 +318,7 @@ private: &interp = *interp, &samp_rate_out = *samp_rate_out, &samp_rate_in = *samp_rate_in]() { + const auto UHD_UNUSED(log_chan) = chan; RFNOC_LOG_TRACE("Calling resolver for `samp_rate_in'@" << chan); if (samp_rate_in.is_valid()) { RFNOC_LOG_TRACE("New samp_rate_in is " << samp_rate_in.get()); @@ -347,6 +348,7 @@ private: &freq = *freq, &samp_rate_out = *samp_rate_out, &samp_rate_in = *samp_rate_in]() { + const auto UHD_UNUSED(log_chan) = chan; RFNOC_LOG_TRACE("Calling resolver for `samp_rate_out'@" << chan); if (samp_rate_out.is_valid()) { // If interp is changed, that will take care of scaling diff --git a/host/lib/rfnoc/fir_filter_block_control.cpp b/host/lib/rfnoc/fir_filter_block_control.cpp index a89e9691d..1de15e237 100644 --- a/host/lib/rfnoc/fir_filter_block_control.cpp +++ b/host/lib/rfnoc/fir_filter_block_control.cpp @@ -73,8 +73,10 @@ private: // Write coefficients [0..num_coeffs-2].. std::vector<uint32_t> coeffs_addr(_max_num_coeffs - 1, REG_FIR_LOAD_COEFF_ADDR); std::vector<uint32_t> coeffs_minus_last(_max_num_coeffs - 1); - std::transform(_coeffs.begin(), _coeffs.end() - 1, coeffs_minus_last.begin(), - [this](int16_t value) -> uint32_t { return static_cast<uint32_t>(value); }); + std::transform(_coeffs.begin(), + _coeffs.end() - 1, + coeffs_minus_last.begin(), + [](int16_t value) -> uint32_t { return static_cast<uint32_t>(value); }); this->regs().multi_poke32(coeffs_addr, coeffs_minus_last); // ...and the final coefficients (num_coeffs-1) diff --git a/host/lib/rfnoc/graph.cpp b/host/lib/rfnoc/graph.cpp index 4041ece5a..92cf9e8bf 100644 --- a/host/lib/rfnoc/graph.cpp +++ b/host/lib/rfnoc/graph.cpp @@ -641,8 +641,8 @@ bool graph_t::_assert_edge_props_consistent(rfnoc_graph_t::edge_descriptor edge) node_ref_t node) { node_accessor_t node_accessor{}; // Create a set of all properties - auto props_set = node_accessor.filter_props( - node, [port, edge_type, node](property_base_t* prop) { + auto props_set = + node_accessor.filter_props(node, [port, edge_type](property_base_t* prop) { return prop->get_src_info().instance == port && prop->get_src_info().type == edge_type; }); diff --git a/host/lib/rfnoc/radio_control_impl.cpp b/host/lib/rfnoc/radio_control_impl.cpp index f1a1bb69a..00cdd12ae 100644 --- a/host/lib/rfnoc/radio_control_impl.cpp +++ b/host/lib/rfnoc/radio_control_impl.cpp @@ -198,6 +198,7 @@ radio_control_impl::radio_control_impl(make_args_ptr make_args) chan, &samp_rate_in = _samp_rate_in.at(chan), &samp_rate_out = _samp_rate_out.at(chan)]() { + const auto UHD_UNUSED(log_chan) = chan; RFNOC_LOG_TRACE("Calling resolver for samp_rate@" << chan); samp_rate_in = coerce_rate(samp_rate_in.get()); samp_rate_out = samp_rate_in.get(); diff --git a/host/lib/rfnoc/rfnoc_rx_streamer.cpp b/host/lib/rfnoc/rfnoc_rx_streamer.cpp index f7459dbfc..7acdf357d 100644 --- a/host/lib/rfnoc/rfnoc_rx_streamer.cpp +++ b/host/lib/rfnoc/rfnoc_rx_streamer.cpp @@ -72,7 +72,8 @@ rfnoc_rx_streamer::rfnoc_rx_streamer(const size_t num_chans, add_property_resolver({&_mtu_in[i]}, std::move(mtu_resolver_out), - [& mtu_in = _mtu_in[i], i, this]() { + [&mtu_in = _mtu_in[i], i, this]() { + const auto UHD_UNUSED(ii) = i; RFNOC_LOG_TRACE("Calling resolver for `mtu_in'@" << i); if (mtu_in.is_valid()) { const size_t mtu = @@ -207,7 +208,8 @@ void rfnoc_rx_streamer::_register_props(const size_t chan, const std::string& ot }); add_property_resolver( - {samp_rate_in}, {}, [& samp_rate_in = *samp_rate_in, chan, this]() { + {samp_rate_in}, {}, [&samp_rate_in = *samp_rate_in, chan, this]() { + const auto UHD_UNUSED(log_chan) = chan; RFNOC_LOG_TRACE("Calling resolver for `samp_rate_in'@" << chan); if (samp_rate_in.is_valid()) { this->set_samp_rate(samp_rate_in.get()); @@ -215,7 +217,8 @@ void rfnoc_rx_streamer::_register_props(const size_t chan, const std::string& ot }); add_property_resolver( - {tick_rate_in}, {}, [& tick_rate_in = *tick_rate_in, chan, this]() { + {tick_rate_in}, {}, [&tick_rate_in = *tick_rate_in, chan, this]() { + const auto UHD_UNUSED(log_chan) = chan; RFNOC_LOG_TRACE("Calling resolver for `tick_rate_in'@" << chan); if (tick_rate_in.is_valid()) { this->set_tick_rate(tick_rate_in.get()); diff --git a/host/lib/rfnoc/rfnoc_tx_streamer.cpp b/host/lib/rfnoc/rfnoc_tx_streamer.cpp index a00b41c75..b4aea202d 100644 --- a/host/lib/rfnoc/rfnoc_tx_streamer.cpp +++ b/host/lib/rfnoc/rfnoc_tx_streamer.cpp @@ -60,7 +60,8 @@ rfnoc_tx_streamer::rfnoc_tx_streamer(const size_t num_chans, add_property_resolver({&_mtu_out[i]}, std::move(mtu_resolver_out), - [& mtu_out = _mtu_out[i], i, this]() { + [&mtu_out = _mtu_out[i], i, this]() { + const auto UHD_UNUSED(ii) = i; RFNOC_LOG_TRACE("Calling resolver for `mtu_out'@" << i); if (mtu_out.is_valid()) { const size_t mtu = @@ -191,7 +192,8 @@ void rfnoc_tx_streamer::_register_props(const size_t chan, const std::string& ot }); add_property_resolver( - {samp_rate_out}, {}, [& samp_rate_out = *samp_rate_out, chan, this]() { + {samp_rate_out}, {}, [&samp_rate_out = *samp_rate_out, chan, this]() { + const auto UHD_UNUSED(log_chan) = chan; RFNOC_LOG_TRACE("Calling resolver for `samp_rate_out'@" << chan); if (samp_rate_out.is_valid()) { this->set_samp_rate(samp_rate_out.get()); @@ -199,7 +201,8 @@ void rfnoc_tx_streamer::_register_props(const size_t chan, const std::string& ot }); add_property_resolver( - {tick_rate_out}, {}, [& tick_rate_out = *tick_rate_out, chan, this]() { + {tick_rate_out}, {}, [&tick_rate_out = *tick_rate_out, chan, this]() { + const auto UHD_UNUSED(log_chan) = chan; RFNOC_LOG_TRACE("Calling resolver for `tick_rate_out'@" << chan); if (tick_rate_out.is_valid()) { this->set_tick_rate(tick_rate_out.get()); diff --git a/host/lib/rfnoc/window_block_control.cpp b/host/lib/rfnoc/window_block_control.cpp index 5d3201838..9acb963d0 100644 --- a/host/lib/rfnoc/window_block_control.cpp +++ b/host/lib/rfnoc/window_block_control.cpp @@ -111,7 +111,7 @@ private: std::transform(_coeffs.at(chan).begin(), _coeffs.at(chan).end() - 1, coeffs_minus_last.begin(), - [this](int16_t value) -> uint32_t { return static_cast<uint32_t>(value); }); + [](int16_t value) -> uint32_t { return static_cast<uint32_t>(value); }); _window_reg_iface.multi_poke32(coeffs_addr, coeffs_minus_last, chan); // ...and the final coefficient (num_coeffs-1) |