aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300/x300_dac_ctrl.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-01-03 13:21:32 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2019-01-07 13:57:55 -0800
commitf1e1a328e9a26eb956d8a2fb015d810bd04d4f96 (patch)
treef977b70255ef1394f2dd72b4222fad36635fa39a /host/lib/usrp/x300/x300_dac_ctrl.cpp
parent40bb17709182f7ce4b3761eb7e809c2be05663d2 (diff)
downloaduhd-f1e1a328e9a26eb956d8a2fb015d810bd04d4f96.tar.gz
uhd-f1e1a328e9a26eb956d8a2fb015d810bd04d4f96.tar.bz2
uhd-f1e1a328e9a26eb956d8a2fb015d810bd04d4f96.zip
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.
Diffstat (limited to 'host/lib/usrp/x300/x300_dac_ctrl.cpp')
-rw-r--r--host/lib/usrp/x300/x300_dac_ctrl.cpp4
1 files changed, 2 insertions, 2 deletions
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<int>(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;
};