From 708840002eef7104d930e2b25f0d9ca203c5d507 Mon Sep 17 00:00:00 2001 From: Brent Stapleton Date: Mon, 18 Nov 2019 14:39:12 +0530 Subject: uhd: fixing MSVC warnings Small changes to remove various compiler warnings found in MSVC - Adding uhd::narrow_cast to verious spots - wavetable.hpp: all floats literals in the wavetable. - paths_test: unnecessary character escape - replay example: remove unreferenced noc_id - adfXXXX: Fixing qualifiers to match between parent and derived classes - rpc, block_id: Removing unused name in try...catch --- host/include/uhd/rfnoc/traffic_counter.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'host/include') diff --git a/host/include/uhd/rfnoc/traffic_counter.hpp b/host/include/uhd/rfnoc/traffic_counter.hpp index 9a0546f17..b30eff329 100644 --- a/host/include/uhd/rfnoc/traffic_counter.hpp +++ b/host/include/uhd/rfnoc/traffic_counter.hpp @@ -1,5 +1,6 @@ // // Copyright 2018 Ettus Research, a National Instruments Company +// Copyright 2019 Ettus Research, A National Instruments Brand // // SPDX-License-Identifier: GPL-3.0-or-later // @@ -8,6 +9,7 @@ #define INCLUDED_LIBUHD_TRAFFIC_COUNTER_HPP #include +#include #include #include #include @@ -57,7 +59,8 @@ public: for (size_t i = 0; i < std::extent::value; i++) { tree->create(root_path / "traffic_counter" / counters[i]) .set_publisher([this, i, first_counter_offset]() { - return _read_reg_fn(i + first_counter_offset); + return _read_reg_fn( + uhd::narrow_cast(i) + first_counter_offset); }); } } -- cgit v1.2.3