aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-02-27 15:45:59 -0800
committerJosh Blum <josh@joshknows.com>2012-02-28 13:20:58 -0800
commitdfaf1f930ce0ff7219c0d10fc0156cba0e46950a (patch)
treee0d67976fca62f07d43f9bf7003b85a9b8fdaabb
parent2033713db5ca6224bc769747420458287eecc506 (diff)
downloaduhd-dfaf1f930ce0ff7219c0d10fc0156cba0e46950a.tar.gz
uhd-dfaf1f930ce0ff7219c0d10fc0156cba0e46950a.tar.bz2
uhd-dfaf1f930ce0ff7219c0d10fc0156cba0e46950a.zip
uhd: fixed some compile warnings for msvc
-rw-r--r--host/examples/network_relay.cpp4
-rw-r--r--host/lib/types/time_spec.cpp2
-rw-r--r--host/lib/usrp/b100/b100_impl.cpp2
-rw-r--r--host/lib/usrp/dboard/db_dbsrx2.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/host/examples/network_relay.cpp b/host/examples/network_relay.cpp
index 8909c7530..a7fdb7e2e 100644
--- a/host/examples/network_relay.cpp
+++ b/host/examples/network_relay.cpp
@@ -36,10 +36,10 @@ boost::mutex spawn_mutex;
#if defined(UHD_PLATFORM_MACOS) || defined(UHD_PLATFORM_BSD)
//limit buffer resize on macos or it will error
- const size_t rx_dsp_buff_size = 1e6;
+ const size_t rx_dsp_buff_size = size_t(1e6);
#elif defined(UHD_PLATFORM_LINUX) || defined(UHD_PLATFORM_WIN32)
//set to half-a-second of buffering at max rate
- const size_t rx_dsp_buff_size = 50e6;
+ const size_t rx_dsp_buff_size = size_t(50e6);
#endif
const size_t tx_dsp_buff_size = (1 << 20);
diff --git a/host/lib/types/time_spec.cpp b/host/lib/types/time_spec.cpp
index 14b9c988a..ec939e52e 100644
--- a/host/lib/types/time_spec.cpp
+++ b/host/lib/types/time_spec.cpp
@@ -49,7 +49,7 @@ time_spec_t time_spec_t::get_system_time(void){
LARGE_INTEGER counts, freq;
QueryPerformanceCounter(&counts);
QueryPerformanceFrequency(&freq);
- return time_spec_t::from_ticks(counts.QuadPart, freq.QuadPart);
+ return time_spec_t::from_ticks(counts.QuadPart, double(freq.QuadPart));
}
#endif /* HAVE_QUERY_PERFORMANCE_COUNTER */
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index 8b55494c5..7d5ebfa49 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -214,7 +214,7 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
_fpga_ctrl->peek32(0);
}
//try reset once in the case of failure
- catch(const uhd::exception &e){
+ catch(const uhd::exception &){
if (initialization_count > 1) throw;
UHD_MSG(warning) <<
"The control endpoint was left in a bad state.\n"
diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp
index 954d7083d..01eec133f 100644
--- a/host/lib/usrp/dboard/db_dbsrx2.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx2.cpp
@@ -253,7 +253,7 @@ double dbsrx2::set_lo_freq(double target_freq){
N = (target_freq*R*ext_div)/(ref_freq); //actual spec range is (19, 251)
intdiv = int(std::floor(N)); // if (intdiv < 19 or intdiv > 251) continue;
- fracdiv = std::floor((N - intdiv)*double(1 << 20));
+ fracdiv = boost::math::iround((N - intdiv)*double(1 << 20));
//calculate the actual freq from the values above
N = double(intdiv) + double(fracdiv)/double(1 << 20);