From f1e1a328e9a26eb956d8a2fb015d810bd04d4f96 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 3 Jan 2019 13:21:32 -0800 Subject: x300: Fix compiler warnings related to type conversions These compiler warnings mostly pop up on MSVC. Most of them are due to inconsistent usage of size_t, uint{8,16,32}_t, and even int. This commit changes types mostly such that variables have the correct type to begin with, although it also contains a few explicit type-casts. --- host/lib/usrp/x300/x300_dac_ctrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/x300/x300_dac_ctrl.cpp') diff --git a/host/lib/usrp/x300/x300_dac_ctrl.cpp b/host/lib/usrp/x300/x300_dac_ctrl.cpp index d7b3892fd..a9df96002 100644 --- a/host/lib/usrp/x300/x300_dac_ctrl.cpp +++ b/host/lib/usrp/x300/x300_dac_ctrl.cpp @@ -36,7 +36,7 @@ class x300_dac_ctrl_impl : public x300_dac_ctrl { public: x300_dac_ctrl_impl(uhd::spi_iface::sptr iface, const size_t slaveno, const double refclk): - _iface(iface), _slaveno(slaveno), _refclk(refclk) + _iface(iface), _slaveno(static_cast(slaveno)), _refclk(refclk) { //Power up all DAC subsystems write_ad9146_reg(0x01, 0x10); //Up: I DAC, Q DAC, Receiver, Voltage Ref, Clocks @@ -287,7 +287,7 @@ public: private: uhd::spi_iface::sptr _iface; - const size_t _slaveno; + const int _slaveno; const double _refclk; }; -- cgit v1.2.3