summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-05-18 18:03:27 -0700
committerJosh Blum <josh@joshknows.com>2010-05-18 18:03:27 -0700
commitbea1c582491d71bf90e240be345a32ba77028460 (patch)
treec3e3ea480c5a4da7c4b9b55e241e62be7eda7928 /host
parent21e9cf4bece884ced5b7294e012be971e941c511 (diff)
downloaduhd-bea1c582491d71bf90e240be345a32ba77028460.tar.gz
uhd-bea1c582491d71bf90e240be345a32ba77028460.tar.bz2
uhd-bea1c582491d71bf90e240be345a32ba77028460.zip
tweaks to remove warning is msvc
Diffstat (limited to 'host')
-rw-r--r--host/examples/tx_timed_samples.cpp2
-rw-r--r--host/lib/transport/vrt_packet_handler.hpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/host/examples/tx_timed_samples.cpp b/host/examples/tx_timed_samples.cpp
index 6dee69cd5..e9e0c785e 100644
--- a/host/examples/tx_timed_samples.cpp
+++ b/host/examples/tx_timed_samples.cpp
@@ -41,7 +41,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
("nsamps", po::value<size_t>(&total_num_samps)->default_value(1000), "total number of samples to transmit")
("txrate", po::value<double>(&tx_rate)->default_value(100e6/16), "rate of outgoing samples")
("freq", po::value<double>(&freq)->default_value(0), "rf center frequency in Hz")
- ("ampl", po::value<float>(&ampl)->default_value(0.3), "amplitude of each sample")
+ ("ampl", po::value<float>(&ampl)->default_value(float(0.3)), "amplitude of each sample")
;
po::variables_map vm;
po::store(po::parse_command_line(argc, argv, desc), vm);
diff --git a/host/lib/transport/vrt_packet_handler.hpp b/host/lib/transport/vrt_packet_handler.hpp
index c857db1c4..5b73c82bf 100644
--- a/host/lib/transport/vrt_packet_handler.hpp
+++ b/host/lib/transport/vrt_packet_handler.hpp
@@ -28,6 +28,7 @@
#include <uhd/transport/zero_copy.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/function.hpp>
+#include <stdexcept>
#include <iostream>
namespace vrt_packet_handler{
@@ -209,6 +210,8 @@ namespace vrt_packet_handler{
}
return total_num_samps;
}
+
+ default: throw std::runtime_error("unknown recv mode");
}//switch(recv_mode)
}
@@ -350,6 +353,8 @@ namespace vrt_packet_handler{
}
return total_num_samps;
}
+
+ default: throw std::runtime_error("unknown send mode");
}//switch(send_mode)
}