aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/cores
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/cores')
-rw-r--r--host/lib/usrp/cores/i2c_core_100_wb32.cpp4
-rw-r--r--host/lib/usrp/cores/radio_ctrl_core_3000.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/usrp/cores/i2c_core_100_wb32.cpp b/host/lib/usrp/cores/i2c_core_100_wb32.cpp
index a85cdea42..530267f6c 100644
--- a/host/lib/usrp/cores/i2c_core_100_wb32.cpp
+++ b/host/lib/usrp/cores/i2c_core_100_wb32.cpp
@@ -70,7 +70,7 @@ public:
void set_clock_rate(const double rate)
{
static const boost::uint32_t i2c_datarate = 400000;
- boost::uint16_t prescaler = rate / (i2c_datarate*5) - 1;
+ boost::uint16_t prescaler = boost::uint16_t(rate / (i2c_datarate*5) - 1);
_iface->poke32(REG_I2C_PRESCALER_LO, prescaler & 0xFF);
_iface->poke32(REG_I2C_PRESCALER_HI, (prescaler >> 8) & 0xFF);
}
@@ -127,7 +127,7 @@ public:
//the default implementation calls read i2c once per byte
byte_vector_t read_eeprom(boost::uint16_t addr, boost::uint16_t offset, size_t num_bytes)
{
- this->write_i2c(addr, byte_vector_t(1, offset));
+ this->write_i2c(addr, byte_vector_t(1, boost::uint8_t(offset)));
return this->read_i2c(addr, num_bytes);
}
diff --git a/host/lib/usrp/cores/radio_ctrl_core_3000.cpp b/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
index 6357102fb..1c9b5c4fa 100644
--- a/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
+++ b/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
@@ -190,7 +190,7 @@ private:
try
{
UHD_ASSERT_THROW(bool(buff));
- UHD_ASSERT_THROW(bool(buff->size()));
+ UHD_ASSERT_THROW(buff->size() > 0);
}
catch(const std::exception &ex)
{