summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-09-23 18:46:58 -0700
committerJosh Blum <josh@joshknows.com>2010-09-23 18:46:58 -0700
commit42576f1ed98735a69a20cc788d09acd82cb69ae8 (patch)
tree3d5d6ce1d479fa0b9e785f17f64e719b20718575 /host/lib
parentaf1882ab65bb1395f75dd7a7fbdcfc8535c32479 (diff)
downloaduhd-42576f1ed98735a69a20cc788d09acd82cb69ae8.tar.gz
uhd-42576f1ed98735a69a20cc788d09acd82cb69ae8.tar.bz2
uhd-42576f1ed98735a69a20cc788d09acd82cb69ae8.zip
usrp1: removed msvc warnings for usrp1 impl code
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/usrp1/dsp_impl.cpp10
-rw-r--r--host/lib/usrp/usrp1/io_impl.cpp4
2 files changed, 6 insertions, 8 deletions
diff --git a/host/lib/usrp/usrp1/dsp_impl.cpp b/host/lib/usrp/usrp1/dsp_impl.cpp
index 573bce21f..e9a5e60a6 100644
--- a/host/lib/usrp/usrp1/dsp_impl.cpp
+++ b/host/lib/usrp/usrp1/dsp_impl.cpp
@@ -107,8 +107,7 @@ void usrp1_impl::rx_dsp_set(const wax::obj &key_, const wax::obj &val){
return;
}
case DSP_PROP_HOST_RATE: {
- unsigned int rate =
- _clock_ctrl->get_master_clock_freq() / val.as<double>();
+ size_t rate = size_t(_clock_ctrl->get_master_clock_freq() / val.as<double>());
if ((rate & 0x01) || (rate < 4) || (rate > 256)) {
std::cerr << "Decimation must be even and between 4 and 256"
@@ -118,7 +117,7 @@ void usrp1_impl::rx_dsp_set(const wax::obj &key_, const wax::obj &val){
_rx_dsp_decim = rate;
//TODO Poll every 100ms. Make it selectable?
- _rx_samps_per_poll_interval = 0.1 * _clock_ctrl->get_master_clock_freq() / rate;
+ _rx_samps_per_poll_interval = size_t(0.1 * _clock_ctrl->get_master_clock_freq() / rate);
_iface->poke32(FR_DECIM_RATE, _rx_dsp_decim/2 - 1);
}
@@ -207,8 +206,7 @@ void usrp1_impl::tx_dsp_set(const wax::obj &key_, const wax::obj &val){
}
case DSP_PROP_HOST_RATE: {
- unsigned int rate =
- _clock_ctrl->get_master_clock_freq() * 2 / val.as<double>();
+ size_t rate = size_t(_clock_ctrl->get_master_clock_freq() * 2 / val.as<double>());
if ((rate & 0x01) || (rate < 8) || (rate > 512)) {
std::cerr << "Interpolation rate must be even and between 8 and 512"
@@ -219,7 +217,7 @@ void usrp1_impl::tx_dsp_set(const wax::obj &key_, const wax::obj &val){
_tx_dsp_interp = rate;
//TODO Poll every 100ms. Make it selectable?
- _tx_samps_per_poll_interval = 0.1 * _clock_ctrl->get_master_clock_freq() * 2 / rate;
+ _tx_samps_per_poll_interval = size_t(0.1 * _clock_ctrl->get_master_clock_freq() * 2 / rate);
_iface->poke32(FR_INTERP_RATE, _tx_dsp_interp / 4 - 1);
return;
diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp
index 146038bd9..73974f2d6 100644
--- a/host/lib/usrp/usrp1/io_impl.cpp
+++ b/host/lib/usrp/usrp1/io_impl.cpp
@@ -184,7 +184,7 @@ bool usrp1_impl::io_impl::get_send_buffs(
));
}
- return buffs[0].get();
+ return buffs[0].get() != NULL;
}
/***********************************************************************
@@ -277,7 +277,7 @@ static bool get_recv_buffs(
){
UHD_ASSERT_THROW(buffs.size() == 1);
buffs[0] = zc_if->get_recv_buff();
- return buffs[0].get();
+ return buffs[0].get() != NULL;
}
size_t usrp1_impl::recv(