diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-02-19 14:16:24 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-02-19 17:01:40 -0800 |
commit | 305d0e79e219b427c6425dab0715ed2132d928b8 (patch) | |
tree | 9962f0fd34c1d0488255785cf99243708dec4fb6 /host/examples/tx_waveforms.cpp | |
parent | 21b5f2c6aa88af5488b140da0ef7ed34cc14153f (diff) | |
download | uhd-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/examples/tx_waveforms.cpp')
-rw-r--r-- | host/examples/tx_waveforms.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
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<std::string>(&args)->default_value(""), "single uhd device address args") - ("spb", po::value<uint64_t>(&spb)->default_value(0), "samples per buffer, 0 for default") + ("spb", po::value<size_t>(&spb)->default_value(0), "samples per buffer, 0 for default") ("nsamps", po::value<uint64_t>(&total_num_samps)->default_value(0), "total number of samples to transmit") ("rate", po::value<double>(&rate), "rate of outgoing samples") ("freq", po::value<double>(&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<std::complex<float> > buff(spb); std::vector<std::complex<float> *> buffs(channel_nums.size(), &buff.front()); |