diff options
author | Martin Anderseck <martin.anderseck@ni.com> | 2021-08-16 15:19:13 +0200 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-08-17 15:10:46 -0500 |
commit | 7788526fbe9fe286be141dba4f387c4bf6a921d4 (patch) | |
tree | 55a559885e4faeb0ef987abbc744e3d56631b5e3 /host | |
parent | 9da2969d967a284370d2106a3b09ad780f8bfcf8 (diff) | |
download | uhd-7788526fbe9fe286be141dba4f387c4bf6a921d4.tar.gz uhd-7788526fbe9fe286be141dba4f387c4bf6a921d4.tar.bz2 uhd-7788526fbe9fe286be141dba4f387c4bf6a921d4.zip |
lib: transport: Mark typecast as intended
Remove warning about potential data loss in VS due to typecast by
marking it as intended.
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/transport/nirio/rpc/rpc_client.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/host/lib/transport/nirio/rpc/rpc_client.cpp b/host/lib/transport/nirio/rpc/rpc_client.cpp index 64494ae6e..661f72e81 100644 --- a/host/lib/transport/nirio/rpc/rpc_client.cpp +++ b/host/lib/transport/nirio/rpc/rpc_client.cpp @@ -6,6 +6,7 @@ // #include <uhd/transport/nirio/rpc/rpc_client.hpp> +#include <uhdlib/utils/narrow.hpp> #include <boost/asio/error.hpp> #include <boost/bind.hpp> #include <boost/format.hpp> @@ -113,7 +114,7 @@ const boost::system::error_code& rpc_client::call(func_id_t func_id, if (_io_service_thread.get()) { _request.header.func_id = func_id; in_args.store(_request.data); - _request.header.func_args_size = _request.data.size(); + _request.header.func_args_size = uhd::narrow_cast<uint32_t>(_request.data.size()); _exec_err.clear(); |