aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2015-03-27 09:35:29 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2015-03-27 09:35:29 -0700
commit1200721b696751edaceb70a332861f84fb8c16d5 (patch)
tree15a56b1a54b5b059779d00115a9f58af991035ac /host/lib/usrp/dboard
parenta712b026a806cd1c106d62fd9278536fcc0a8b62 (diff)
downloaduhd-1200721b696751edaceb70a332861f84fb8c16d5.tar.gz
uhd-1200721b696751edaceb70a332861f84fb8c16d5.tar.bz2
uhd-1200721b696751edaceb70a332861f84fb8c16d5.zip
Warning fixes
* CMake now not applying C++ flags to C files * GCC 4.4: anti-aliasing rules * MSVC: narrowing, differences in subclass function parameters * Clang: uninitialized variables
Diffstat (limited to 'host/lib/usrp/dboard')
-rw-r--r--host/lib/usrp/dboard/db_tvrx2.cpp14
-rw-r--r--host/lib/usrp/dboard/db_ubx.cpp2
2 files changed, 8 insertions, 8 deletions
diff --git a/host/lib/usrp/dboard/db_tvrx2.cpp b/host/lib/usrp/dboard/db_tvrx2.cpp
index c74c64471..9300483d1 100644
--- a/host/lib/usrp/dboard/db_tvrx2.cpp
+++ b/host/lib/usrp/dboard/db_tvrx2.cpp
@@ -1103,7 +1103,7 @@ tvrx2::~tvrx2(void){
* TDA18272 Register IO Functions
**********************************************************************/
void tvrx2::set_scaled_rf_freq(double rf_freq){
- _tda18272hnm_regs.set_rf_freq(_freq_scalar*rf_freq/1e3);
+ _tda18272hnm_regs.set_rf_freq(boost::uint32_t(_freq_scalar*rf_freq/1e3));
}
double tvrx2::get_scaled_rf_freq(void){
@@ -1320,9 +1320,9 @@ void tvrx2::tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF)
read_reg(0x26, 0x2B);
subband_freqs = get_tda18272_rfcal_result_freq_range(1);
- uRFCal0 = subband_freqs.start();
+ uRFCal0 = boost::uint32_t(subband_freqs.start());
subband_freqs = get_tda18272_rfcal_result_freq_range(4);
- uRFCal1 = subband_freqs.start();
+ uRFCal1 = boost::uint32_t(subband_freqs.start());
if(uRF < uRFCal0)
subband = 0;
@@ -1335,9 +1335,9 @@ void tvrx2::tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF)
else
{
subband_freqs = get_tda18272_rfcal_result_freq_range(7);
- uRFCal0 = subband_freqs.start();
+ uRFCal0 = boost::uint32_t(subband_freqs.start());
subband_freqs = get_tda18272_rfcal_result_freq_range(10);
- uRFCal1 = subband_freqs.start();
+ uRFCal1 = boost::uint32_t(subband_freqs.start());
if(uRF < uRFCal0)
subband = 4;
@@ -1351,7 +1351,7 @@ void tvrx2::tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF)
cal_result = _rfcal_coeffs[subband].cal_number;
subband_freqs = get_tda18272_rfcal_result_freq_range(cal_result);
- uRFCal0 = subband_freqs.start();
+ uRFCal0 = boost::uint32_t(subband_freqs.start());
RF_A1 = _rfcal_coeffs[subband].RF_A1;
RF_B1 = _rfcal_coeffs[subband].RF_B1;
@@ -1721,7 +1721,7 @@ void tvrx2::wait_irq(void){
send_reg(0xA, 0xA);
read_reg(0xA, 0xB);
- irq = (this->get_iface()->read_gpio(dboard_iface::UNIT_RX) & tvrx2_sd_name_to_irq_io[get_subdev_name()]);
+ irq = (this->get_iface()->read_gpio(dboard_iface::UNIT_RX) & tvrx2_sd_name_to_irq_io[get_subdev_name()]) > 0;
UHD_LOGV(often) << boost::format(
"\nTVRX2 (%s): Cleared IRQ, subdev = %d, mask = 0x%x, Status: 0x%x\n") % (get_subdev_name()) % get_subdev_name() % (int(tvrx2_sd_name_to_irq_io[get_subdev_name()])) % irq << std::endl;
diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp
index 5184d2ecb..06bfad7d3 100644
--- a/host/lib/usrp/dboard/db_ubx.cpp
+++ b/host/lib/usrp/dboard/db_ubx.cpp
@@ -191,7 +191,7 @@ protected:
}
//keep pfd freq low enough to achieve 50kHz BS clock
- BS = std::ceil(pfd_freq / 50e3);
+ BS = int(std::ceil(pfd_freq / 50e3));
if(BS <= 1023) break;
}
UHD_ASSERT_THROW(R <= 1023);