aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/ddc_block_ctrl_impl.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-02-15 16:42:34 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2019-02-28 10:24:52 -0800
commitd23df2d9411a0d80e00a6927fff946f2c5f906bc (patch)
tree5647a4f1c984f1852877b59781c08d7a6d6a15bb /host/lib/rfnoc/ddc_block_ctrl_impl.cpp
parent4047f692d454446b10af4f67f4c208ba19b4dbef (diff)
downloaduhd-d23df2d9411a0d80e00a6927fff946f2c5f906bc.tar.gz
uhd-d23df2d9411a0d80e00a6927fff946f2c5f906bc.tar.bz2
uhd-d23df2d9411a0d80e00a6927fff946f2c5f906bc.zip
lib: Fix various type-conversion compiler warnings
This makes more type-conversions explicit, to reduce the number of warnings specifically for MSVC.
Diffstat (limited to 'host/lib/rfnoc/ddc_block_ctrl_impl.cpp')
-rw-r--r--host/lib/rfnoc/ddc_block_ctrl_impl.cpp6
1 files changed, 4 insertions, 2 deletions
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;
}