diff options
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r-- | host/lib/rfnoc/ctrl_iface.cpp | 2 | ||||
-rw-r--r-- | host/lib/rfnoc/ddc_block_ctrl_impl.cpp | 6 | ||||
-rw-r--r-- | host/lib/rfnoc/nocscript/expression.cpp | 2 | ||||
-rw-r--r-- | host/lib/rfnoc/nocscript/parser.cpp | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/host/lib/rfnoc/ctrl_iface.cpp b/host/lib/rfnoc/ctrl_iface.cpp index a441ffbc3..377808eef 100644 --- a/host/lib/rfnoc/ctrl_iface.cpp +++ b/host/lib/rfnoc/ctrl_iface.cpp @@ -63,7 +63,7 @@ public: boost::mutex::scoped_lock lock(_mutex); this->send_pkt(addr, data, timestamp); return this->wait_for_ack( - readback, bool(timestamp) ? MASSIVE_TIMEOUT : ACK_TIMEOUT); + readback, bool(timestamp != 0) ? MASSIVE_TIMEOUT : ACK_TIMEOUT); } private: diff --git a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp index 30f465098..d89719c65 100644 --- a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp +++ b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp @@ -169,8 +169,10 @@ public: if (stream_cmd.stream_mode == uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE or stream_cmd.stream_mode == uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_MORE) { - size_t decimation = get_arg<double>("input_rate", chan) - / get_arg<double>("output_rate", chan); + const size_t decimation = + static_cast<size_t>( + get_arg<double>("input_rate", chan) + / get_arg<double>("output_rate", chan)); stream_cmd.num_samps *= decimation; } diff --git a/host/lib/rfnoc/nocscript/expression.cpp b/host/lib/rfnoc/nocscript/expression.cpp index 32065bda1..5e03485be 100644 --- a/host/lib/rfnoc/nocscript/expression.cpp +++ b/host/lib/rfnoc/nocscript/expression.cpp @@ -49,7 +49,7 @@ expression_literal::expression_literal( _bool_val = true; } else { // lexical cast to bool is too picky - _bool_val = bool(std::stoi(_val)); + _bool_val = (std::stoi(_val) != 0); } break; diff --git a/host/lib/rfnoc/nocscript/parser.cpp b/host/lib/rfnoc/nocscript/parser.cpp index 51a544e47..8ef1b7f44 100644 --- a/host/lib/rfnoc/nocscript/parser.cpp +++ b/host/lib/rfnoc/nocscript/parser.cpp @@ -163,7 +163,7 @@ private: P.expr_stack.top()->set_combiner_safe( expression_container::COMBINE_OR); } - } catch (const uhd::syntax_error& e) { + } catch (const uhd::syntax_error&) { P.error = str(boost::format("Operator %s is mixing operator " "types within this container.") % val); |