aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
diff options
context:
space:
mode:
Diffstat (limited to 'host/utils')
-rw-r--r--host/utils/nirio_programmer.cpp6
-rw-r--r--host/utils/octoclock_firmware_burner.cpp2
-rw-r--r--host/utils/uhd_usrp_probe.cpp6
-rw-r--r--host/utils/usrp_n2xx_simple_net_burner.cpp4
-rw-r--r--host/utils/usrp_x3xx_fpga_burner.cpp2
5 files changed, 8 insertions, 12 deletions
diff --git a/host/utils/nirio_programmer.cpp b/host/utils/nirio_programmer.cpp
index 43ec1ff43..c8c5e72d3 100644
--- a/host/utils/nirio_programmer.cpp
+++ b/host/utils/nirio_programmer.cpp
@@ -173,7 +173,7 @@ int main(int argc, char *argv[])
ss >> peek_addr;
niriok_scoped_addr_space(dev_proxy, peek_tokens[0]=="c"?BUS_INTERFACE:FPGA, status);
- uint32_t reg_val;
+ uint32_t reg_val = 0;
if (peek_tokens[0]=="z") {
nirio_status_chain(dev_proxy->poke((uint32_t)0x60000 + peek_addr, (uint32_t)0), status);
do {
@@ -190,7 +190,7 @@ int main(int argc, char *argv[])
//Display attributes
if (vm.count("stats")){
printf("[Interface %u]\n", interface_num);
- uint32_t attr_val;
+ uint32_t attr_val = 0;
nirio_status_chain(dev_proxy->get_attribute(RIO_IS_FPGA_PROGRAMMED, attr_val), status);
printf("* Is FPGA Programmed? = %s\n", (attr_val==1)?"YES":"NO");
@@ -208,7 +208,7 @@ int main(int argc, char *argv[])
}
printf("* FPGA Bitstream Checksum = %s\n", checksum.c_str());
- uint32_t reg_val;
+ uint32_t reg_val = 0;
nirio_status_chain(dev_proxy->set_attribute(RIO_ADDRESS_SPACE, BUS_INTERFACE), status);
nirio_status_chain(dev_proxy->peek(0, reg_val), status);
printf("* Chinch Signature = %x\n", reg_val);
diff --git a/host/utils/octoclock_firmware_burner.cpp b/host/utils/octoclock_firmware_burner.cpp
index 0a48caabd..d624095e6 100644
--- a/host/utils/octoclock_firmware_burner.cpp
+++ b/host/utils/octoclock_firmware_burner.cpp
@@ -123,7 +123,7 @@ device_addrs_t bootloader_find(const std::string &ip_addr){
void read_firmware(){
std::ifstream firmware_file(firmware_path.c_str(), std::ios::binary);
firmware_file.seekg(0, std::ios::end);
- firmware_size = firmware_file.tellg();
+ firmware_size = size_t(firmware_file.tellg());
if(firmware_size > MAX_FIRMWARE_SIZE){
firmware_file.close();
throw uhd::runtime_error(str(boost::format("Firmware file too large: %d > %d")
diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp
index ea346b4c9..a03646cc0 100644
--- a/host/utils/uhd_usrp_probe.cpp
+++ b/host/utils/uhd_usrp_probe.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2011 Ettus Research LLC
+// Copyright 2010-2011,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
@@ -35,10 +35,6 @@
namespace po = boost::program_options;
using namespace uhd;
-static std::string indent(size_t level){
- return (level)? (indent(level-1) + " ") : "";
-}
-
static std::string make_border(const std::string &text){
std::stringstream ss;
ss << boost::format(" _____________________________________________________") << std::endl;
diff --git a/host/utils/usrp_n2xx_simple_net_burner.cpp b/host/utils/usrp_n2xx_simple_net_burner.cpp
index b06e67bb2..642e9a407 100644
--- a/host/utils/usrp_n2xx_simple_net_burner.cpp
+++ b/host/utils/usrp_n2xx_simple_net_burner.cpp
@@ -262,7 +262,7 @@ int read_fpga_image(std::string& fpga_path){
//Check size of given image
std::ifstream fpga_file(fpga_path.c_str(), std::ios::binary);
fpga_file.seekg(0, std::ios::end);
- int fpga_image_size = fpga_file.tellg();
+ size_t fpga_image_size = size_t(fpga_file.tellg());
if(fpga_image_size > FPGA_IMAGE_SIZE_BYTES){
throw std::runtime_error(str(boost::format("FPGA image is too large. %d > %d")
% fpga_image_size % FPGA_IMAGE_SIZE_BYTES));
@@ -297,7 +297,7 @@ int read_fw_image(std::string& fw_path){
//Check size of given image
std::ifstream fw_file(fw_path.c_str(), std::ios::binary);
fw_file.seekg(0, std::ios::end);
- int fw_image_size = fw_file.tellg();
+ size_t fw_image_size = size_t(fw_file.tellg());
if(fw_image_size > FW_IMAGE_SIZE_BYTES){
throw std::runtime_error(str(boost::format("Firmware image is too large. %d > %d")
% fw_image_size % FW_IMAGE_SIZE_BYTES));
diff --git a/host/utils/usrp_x3xx_fpga_burner.cpp b/host/utils/usrp_x3xx_fpga_burner.cpp
index abd5815e8..e32e4d636 100644
--- a/host/utils/usrp_x3xx_fpga_burner.cpp
+++ b/host/utils/usrp_x3xx_fpga_burner.cpp
@@ -487,7 +487,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
if(vm.count("addr")){
udp_simple::sptr udp_transport = udp_simple::make_connected(ip_addr, BOOST_STRINGIZE(X300_FPGA_PROG_UDP_PORT));
- ethernet_burn(udp_transport, fpga_path, vm.count("verify"));
+ ethernet_burn(udp_transport, fpga_path, (vm.count("verify") > 0));
if(vm.count("configure")){
if(configure_fpga(udp_transport, ip_addr)) std::cout << "Successfully configured FPGA!" << std::endl;