aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp5
-rw-r--r--host/lib/usrp/b200/b200_io_impl.cpp4
-rw-r--r--host/lib/usrp/common/max287x.hpp12
-rw-r--r--host/lib/usrp/e300/e300_remote_codec_ctrl.cpp2
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp2
5 files changed, 13 insertions, 12 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 6bd49e013..12baa1c14 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -227,7 +227,7 @@ static device_addrs_t b200_find(const device_addr_t &hint)
try {
// Turn the 16-Bit product ID into a string representation
new_addr["product"] = B2XX_STR_NAMES[get_b200_product(handle, mb_eeprom)];
- } catch (const uhd::runtime_error &e) {
+ } catch (const uhd::runtime_error &) {
// No problem if this fails -- this is just device discovery, after all.
new_addr["product"] = "B2??";
}
@@ -258,7 +258,8 @@ static device::sptr b200_make(const device_addr_t &device_addr)
try {
return device::sptr(new b200_impl(device_addr, handle));
}
- catch (const uhd::usb_error &e) {
+ catch (const uhd::usb_error &) {
+ UHD_MSG(status) << "Detected bad USB state; resetting." << std::flush;
libusb::device_handle::sptr dev_handle(libusb::device_handle::get_cached_handle(
boost::static_pointer_cast<libusb::special_handle>(handle)->get_device()
));
diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp
index 4aa1a46af..7fcd04823 100644
--- a/host/lib/usrp/b200/b200_io_impl.cpp
+++ b/host/lib/usrp/b200/b200_io_impl.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2012-2014 Ettus Research LLC
+// Copyright 2012-2015 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -135,7 +135,7 @@ void b200_impl::set_auto_tick_rate(
if (!uhd::math::frequencies_are_equal(_tree->access<double>("/mboards/0/tick_rate").get(), new_rate)) {
_tree->access<double>("/mboards/0/tick_rate").set(new_rate);
}
- } catch (const uhd::value_error &e) {
+ } catch (const uhd::value_error &) {
UHD_MSG(warning)
<< "Cannot automatically determine an appropriate tick rate for these sampling rates." << std::endl
<< "Consider using different sampling rates, or manually specify a suitable master clock rate." << std::endl;
diff --git a/host/lib/usrp/common/max287x.hpp b/host/lib/usrp/common/max287x.hpp
index d084dcfbe..fe5da195c 100644
--- a/host/lib/usrp/common/max287x.hpp
+++ b/host/lib/usrp/common/max287x.hpp
@@ -412,7 +412,7 @@ double max287x<max287x_regs_t>::set_frequency(
(128, max287x_regs_t::RF_DIVIDER_SELECT_DIV128);
//map mode setting to valid integer divider (N) values
- static const uhd::range_t int_n_mode_div_range(16,65536,1);
+ static const uhd::range_t int_n_mode_div_range(16,65535,1);
static const uhd::range_t frac_n_mode_div_range(19,4091,1);
//other ranges and constants from MAX287X datasheets
@@ -486,13 +486,13 @@ double max287x<max287x_regs_t>::set_frequency(
//keep N within int divider requirements
if(is_int_n)
{
- if(N < int_n_mode_div_range.start()) continue;
- if(N > int_n_mode_div_range.stop()) continue;
+ if(N <= int_n_mode_div_range.start()) continue;
+ if(N >= int_n_mode_div_range.stop()) continue;
}
else
{
- if(N < frac_n_mode_div_range.start()) continue;
- if(N > frac_n_mode_div_range.stop()) continue;
+ if(N <= frac_n_mode_div_range.start()) continue;
+ if(N >= frac_n_mode_div_range.stop()) continue;
}
//keep pfd freq low enough to achieve 50kHz BS clock
@@ -772,7 +772,7 @@ void max287x<max287x_regs_t>::commit()
if (changed_regs.find(boost::uint32_t(addr)) != changed_regs.end())
regs.push_back(_regs.get_reg(boost::uint32_t(addr)));
}
- } catch (uhd::runtime_error& e) {
+ } catch (uhd::runtime_error&) {
// No saved state - write all regs
for (int addr = 5; addr >= 0; addr--)
regs.push_back(_regs.get_reg(boost::uint32_t(addr)));
diff --git a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
index be98f4027..17a564f21 100644
--- a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
+++ b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
@@ -242,7 +242,7 @@ public:
UHD_MSG(warning) << "Attempting to set filter on E300 in network mode." << std::endl;
}
- void output_digital_test_tone(bool enb)
+ void output_digital_test_tone(UHD_UNUSED(bool enb))
{
UHD_THROW_INVALID_CODE_PATH();
}
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 2b6768079..f57556a8b 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -749,7 +749,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
////////////////////////////////////////////////////////////////////
// front panel gpio
////////////////////////////////////////////////////////////////////
- mb.fp_gpio = gpio_core_200::make(mb.radio_perifs[0].ctrl, radio::sr_addr(radio::GPIO), radio::RB32_FP_GPIO);
+ mb.fp_gpio = gpio_core_200::make(mb.radio_perifs[0].ctrl, radio::sr_addr(radio::FP_GPIO), radio::RB32_FP_GPIO);
BOOST_FOREACH(const gpio_attr_map_t::value_type attr, gpio_attr_map)
{
_tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / attr.second)