diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-01-03 13:25:35 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-07 13:57:55 -0800 |
commit | 5bba40ed740a831537b8986528abf38f8f1cc448 (patch) | |
tree | a798e0c49088962e877f3b5e6d87aea0482af13c /host/lib/usrp/b200/b200_impl.cpp | |
parent | f1e1a328e9a26eb956d8a2fb015d810bd04d4f96 (diff) | |
download | uhd-5bba40ed740a831537b8986528abf38f8f1cc448.tar.gz uhd-5bba40ed740a831537b8986528abf38f8f1cc448.tar.bz2 uhd-5bba40ed740a831537b8986528abf38f8f1cc448.zip |
b200: 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/b200/b200_impl.cpp')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index d87f70273..1be8c263b 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -1262,9 +1262,9 @@ void b200_impl::update_atrs(void) const bool enb_rx = bool(perif.rx_streamer.lock()); const bool enb_tx = bool(perif.tx_streamer.lock()); const bool is_rx2 = perif.ant_rx2; - const size_t rxonly = (enb_rx)? ((is_rx2)? STATE_RX1_RX2 : STATE_RX1_TXRX) : STATE_OFF; - const size_t txonly = (enb_tx)? (STATE_TX1_TXRX) : STATE_OFF; - size_t fd = STATE_OFF; + const uint32_t rxonly = (enb_rx)? ((is_rx2)? STATE_RX1_RX2 : STATE_RX1_TXRX) : STATE_OFF; + const uint32_t txonly = (enb_tx)? (STATE_TX1_TXRX) : STATE_OFF; + uint32_t fd = STATE_OFF; if (enb_rx and enb_tx) fd = STATE_FDX1_TXRX; if (enb_rx and not enb_tx) fd = rxonly; if (not enb_rx and enb_tx) fd = txonly; @@ -1280,9 +1280,9 @@ void b200_impl::update_atrs(void) const bool enb_rx = bool(perif.rx_streamer.lock()); const bool enb_tx = bool(perif.tx_streamer.lock()); const bool is_rx2 = perif.ant_rx2; - const size_t rxonly = (enb_rx)? ((is_rx2)? STATE_RX2_RX2 : STATE_RX2_TXRX) : STATE_OFF; - const size_t txonly = (enb_tx)? (STATE_TX2_TXRX) : STATE_OFF; - size_t fd = STATE_OFF; + const uint32_t rxonly = (enb_rx)? ((is_rx2)? STATE_RX2_RX2 : STATE_RX2_TXRX) : STATE_OFF; + const uint32_t txonly = (enb_tx)? (STATE_TX2_TXRX) : STATE_OFF; + uint32_t fd = STATE_OFF; if (enb_rx and enb_tx) fd = STATE_FDX2_TXRX; if (enb_rx and not enb_tx) fd = rxonly; if (not enb_rx and enb_tx) fd = txonly; |