From 305d0e79e219b427c6425dab0715ed2132d928b8 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 19 Feb 2018 14:16:24 -0800 Subject: examples: Fix some minor compiler warnings All warnings reported by MSVC. Mostly related to narrowing conversions. --- host/examples/tx_waveforms.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'host/examples/tx_waveforms.cpp') diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp index 385110d7c..04cd8f3b4 100644 --- a/host/examples/tx_waveforms.cpp +++ b/host/examples/tx_waveforms.cpp @@ -37,7 +37,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //variables to be set by po std::string args, wave_type, ant, subdev, ref, pps, otw, channel_list; - uint64_t total_num_samps, spb; + uint64_t total_num_samps; + size_t spb; double rate, freq, gain, wave_freq, bw; float ampl; @@ -46,7 +47,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ desc.add_options() ("help", "help message") ("args", po::value(&args)->default_value(""), "single uhd device address args") - ("spb", po::value(&spb)->default_value(0), "samples per buffer, 0 for default") + ("spb", po::value(&spb)->default_value(0), "samples per buffer, 0 for default") ("nsamps", po::value(&total_num_samps)->default_value(0), "total number of samples to transmit") ("rate", po::value(&rate), "rate of outgoing samples") ("freq", po::value(&freq), "RF center frequency in Hz") @@ -166,7 +167,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ uhd::tx_streamer::sptr tx_stream = usrp->get_tx_stream(stream_args); //allocate a buffer which we re-use for each channel - if (spb == 0) spb = tx_stream->get_max_num_samps()*10; + if (spb == 0) { + spb = tx_stream->get_max_num_samps()*10; + } std::vector > buff(spb); std::vector *> buffs(channel_nums.size(), &buff.front()); -- cgit v1.2.3