aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-02-19 14:16:24 -0800
committerMartin Braun <martin.braun@ettus.com>2018-02-19 17:01:40 -0800
commit305d0e79e219b427c6425dab0715ed2132d928b8 (patch)
tree9962f0fd34c1d0488255785cf99243708dec4fb6 /host/utils
parent21b5f2c6aa88af5488b140da0ef7ed34cc14153f (diff)
downloaduhd-305d0e79e219b427c6425dab0715ed2132d928b8.tar.gz
uhd-305d0e79e219b427c6425dab0715ed2132d928b8.tar.bz2
uhd-305d0e79e219b427c6425dab0715ed2132d928b8.zip
examples: Fix some minor compiler warnings
All warnings reported by MSVC. Mostly related to narrowing conversions.
Diffstat (limited to 'host/utils')
-rw-r--r--host/utils/converter_benchmark.cpp4
-rw-r--r--host/utils/query_gpsdo_sensors.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/host/utils/converter_benchmark.cpp b/host/utils/converter_benchmark.cpp
index 017a4ff4c..aa3985fd1 100644
--- a/host/utils/converter_benchmark.cpp
+++ b/host/utils/converter_benchmark.cpp
@@ -330,7 +330,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[])
std::cout << "Invalid argument: --seed-mode must be either 'incremental' or 'random'." << std::endl;
}
- bool debug_mode = bool(vm.count("debug-converter"));
+ bool debug_mode = vm.count("debug-converter") > 0;
if (debug_mode) {
iterations = 1;
}
@@ -347,7 +347,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[])
if (priorities == "default" or priorities.empty()) {
try {
conv_list[prio] = get_converter(converter_id, prio)(); // Can throw a uhd::key_error
- } catch(const uhd::key_error &e) {
+ } catch(const uhd::key_error &) {
std::cout << "No converters found." << std::endl;
return EXIT_FAILURE;
}
diff --git a/host/utils/query_gpsdo_sensors.cpp b/host/utils/query_gpsdo_sensors.cpp
index b839cd499..7b3c6f057 100644
--- a/host/utils/query_gpsdo_sensors.cpp
+++ b/host/utils/query_gpsdo_sensors.cpp
@@ -52,7 +52,7 @@ int query_clock_sensors(const std::string &args) {
std::cout << boost::format("%s\n%s\n") % gga_string.to_pp_string() % rmc_string.to_pp_string();
std::cout << boost::format("\nPrinting GPS servo status:\n");
std::cout << boost::format("%s\n\n") % servo_string.to_pp_string();
- } catch (uhd::lookup_error &e) {
+ } catch (const uhd::lookup_error &) {
std::cout << "NMEA strings not implemented for this device." << std::endl;
}
std::cout << boost::format("GPS Epoch time: %.5f seconds\n") % clock->get_sensor("gps_time").to_real();