diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-03-11 09:46:29 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-03-11 09:46:29 -0800 |
commit | 94230735279c721424ef001a799c780dc937a091 (patch) | |
tree | c476b516144b76730cc18788cba2b0c712a917b2 | |
parent | 165fd400e995c9652c2dfe85c2fd589b750a2620 (diff) | |
parent | ccc8acb743aaab6cd3e926d5901fa3fa4114a469 (diff) | |
download | uhd-94230735279c721424ef001a799c780dc937a091.tar.gz uhd-94230735279c721424ef001a799c780dc937a091.tar.bz2 uhd-94230735279c721424ef001a799c780dc937a091.zip |
Merge branch 'maint'
-rw-r--r-- | host/examples/txrx_loopback_to_file.cpp | 2 | ||||
-rw-r--r-- | host/include/uhd/deprecated.hpp | 1 | ||||
-rw-r--r-- | host/include/uhd/types/ref_vector.hpp | 1 | ||||
-rw-r--r-- | host/lib/transport/nirio/nirio_driver_iface_win.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/e300/e300_sysfs_hooks.cpp | 5 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/n200_image_loader.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_image_loader.cpp | 2 |
8 files changed, 13 insertions, 8 deletions
diff --git a/host/examples/txrx_loopback_to_file.cpp b/host/examples/txrx_loopback_to_file.cpp index 7dc3bd9c2..eb2cd72a3 100644 --- a/host/examples/txrx_loopback_to_file.cpp +++ b/host/examples/txrx_loopback_to_file.cpp @@ -149,7 +149,7 @@ template<typename samp_type> void recv_to_file( stream_cmd.time_spec = uhd::time_spec_t(settling_time); rx_stream->issue_stream_cmd(stream_cmd); - while(not stop_signal_called and (num_requested_samples != num_total_samps or num_requested_samples == 0)){ + while(not stop_signal_called and (num_requested_samples > num_total_samps or num_requested_samples == 0)){ size_t num_rx_samps = rx_stream->recv(buff_ptrs, samps_per_buff, md, timeout); timeout = 0.1f; //small timeout for subsequent recv diff --git a/host/include/uhd/deprecated.hpp b/host/include/uhd/deprecated.hpp index 95cce58e9..ab24600bf 100644 --- a/host/include/uhd/deprecated.hpp +++ b/host/include/uhd/deprecated.hpp @@ -23,6 +23,7 @@ #define INCLUDED_UHD_TYPES_OTW_TYPE_HPP #include <uhd/config.hpp> +#include <cstddef> namespace uhd{ diff --git a/host/include/uhd/types/ref_vector.hpp b/host/include/uhd/types/ref_vector.hpp index bbfb5434d..61a82cee8 100644 --- a/host/include/uhd/types/ref_vector.hpp +++ b/host/include/uhd/types/ref_vector.hpp @@ -19,6 +19,7 @@ #define INCLUDED_UHD_TYPES_REF_VECTOR_HPP #include <uhd/config.hpp> +#include <cstddef> namespace uhd{ diff --git a/host/lib/transport/nirio/nirio_driver_iface_win.cpp b/host/lib/transport/nirio/nirio_driver_iface_win.cpp index 717923176..c8484e953 100644 --- a/host/lib/transport/nirio/nirio_driver_iface_win.cpp +++ b/host/lib/transport/nirio/nirio_driver_iface_win.cpp @@ -1,5 +1,5 @@ // -// Copyright 2013,2015 Ettus Research LLC +// Copyright 2013,2015-2016 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 @@ -66,7 +66,7 @@ nirio_status rio_ioctl( read_buf, static_cast<DWORD>(read_buf_len), &outLen, &zeroedOverlapped ))) { - int_fast32_t lastError = GetLastError(); + UHD_UNUSED(int_fast32_t lastError) = GetLastError(); return NiRio_Status_SoftwareFault; } diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 386732cdf..565ce681a 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -349,7 +349,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s handle = dev_handle; break; } - } catch (const uhd::exception &e) { continue; } + } catch (const uhd::exception&) { continue; } } UHD_ASSERT_THROW(handle.get() != NULL); //better be found diff --git a/host/lib/usrp/e300/e300_sysfs_hooks.cpp b/host/lib/usrp/e300/e300_sysfs_hooks.cpp index ee2ac21d7..7bd1d6d7e 100644 --- a/host/lib/usrp/e300/e300_sysfs_hooks.cpp +++ b/host/lib/usrp/e300/e300_sysfs_hooks.cpp @@ -65,10 +65,11 @@ std::string e300_get_sysfs_attr(const std::string &node, const std::string &attr dev = udev_device_new_from_syspath(udev, path); retstring = udev_device_get_sysattr_value(dev, attr.c_str()); - if (retstring.size()) - break; udev_device_unref(dev); + + if (retstring.size()) + break; } udev_enumerate_unref(enumerate); diff --git a/host/lib/usrp/usrp2/n200_image_loader.cpp b/host/lib/usrp/usrp2/n200_image_loader.cpp index 29bec8b4a..d6acfe39d 100644 --- a/host/lib/usrp/usrp2/n200_image_loader.cpp +++ b/host/lib/usrp/usrp2/n200_image_loader.cpp @@ -1,5 +1,5 @@ // -// Copyright 2015 Ettus Research LLC +// Copyright 2015-2016 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 @@ -201,7 +201,7 @@ static UHD_INLINE bool n200_response_matches(const n200_fw_update_data_t *pkt_in n200_fw_update_id_t pkt_code, size_t len){ return (len > offsetof(n200_fw_update_data_t, data) and - ntohl(pkt_in->id) == pkt_code); + ntohl(pkt_in->id) == (unsigned)pkt_code); } static uhd::device_addr_t n200_find(const image_loader::image_loader_args_t &image_loader_args){ diff --git a/host/lib/usrp/x300/x300_image_loader.cpp b/host/lib/usrp/x300/x300_image_loader.cpp index 9ec8a2e13..e8a1b5269 100644 --- a/host/lib/usrp/x300/x300_image_loader.cpp +++ b/host/lib/usrp/x300/x300_image_loader.cpp @@ -365,6 +365,7 @@ static void x300_ethernet_load(x300_session_t &session){ } else std::cout << "successful." << std::endl; } + std::cout << str(boost::format("Power-cycle the USRP %s to use the new image.") % session.dev_addr.get("product", "")) << std::endl; } static void x300_pcie_load(x300_session_t &session){ @@ -382,6 +383,7 @@ static void x300_pcie_load(x300_session_t &session){ niusrprio::nirio_status_to_exception(status, "NI-RIO reported the following error:"); } else std::cout << "successful." << std::endl; + std::cout << str(boost::format("Power-cycle the USRP %s to use the new image.") % session.dev_addr.get("product", "")) << std::endl; } static bool x300_image_loader(const image_loader::image_loader_args_t &image_loader_args){ |