diff options
author | Josh Blum | 2011-11-27 01:25:25 -0500 |
---|---|---|
committer | Josh Blum | 2011-11-27 01:25:25 -0500 |
commit | 435dc713e9ea5783729a2205a3c6fb9c9a3380b1 (patch) | |
tree | df60938f73b6a92e0dc807bb3da2e20b00ca25ad | |
parent | ffa9e710f5a23ad83b611e77ed717bdb01ea9d24 (diff) | |
download | gnuradio-435dc713e9ea5783729a2205a3c6fb9c9a3380b1.tar.gz gnuradio-435dc713e9ea5783729a2205a3c6fb9c9a3380b1.tar.bz2 gnuradio-435dc713e9ea5783729a2205a3c6fb9c9a3380b1.zip |
uhd: cleanup some -Wall warnings
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | gr-uhd/examples/tag_sink_demo.h | 5 | ||||
-rw-r--r-- | gr-uhd/examples/tag_source_demo.h | 2 | ||||
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_source.cc | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 17b79c515..8712993e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,7 +63,8 @@ if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) endif() if(CMAKE_COMPILER_IS_GNUCXX) - GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-Wsign-compare HAVE_SIGN_COMPARE) + GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-Wsign-compare HAVE_WARN_SIGN_COMPARE) + GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-Wall HAVE_WARN_ALL) endif(CMAKE_COMPILER_IS_GNUCXX) if(MSVC) @@ -197,7 +198,7 @@ install( ######################################################################## -# Add subdirectories +# Add subdirectories (in order of deps) ######################################################################## add_subdirectory(gruel) add_subdirectory(gnuradio-core) diff --git a/gr-uhd/examples/tag_sink_demo.h b/gr-uhd/examples/tag_sink_demo.h index 524f0ae0f..7d49bd971 100644 --- a/gr-uhd/examples/tag_sink_demo.h +++ b/gr-uhd/examples/tag_sink_demo.h @@ -51,12 +51,13 @@ public: //print all tags BOOST_FOREACH(const gr_tag_t &rx_time_tag, rx_time_tags){ - const uint64_t count = rx_time_tag.offset; + const uint64_t offset = rx_time_tag.offset; const pmt::pmt_t &value = rx_time_tag.value; - std::cout << boost::format("Full seconds %u, Frac seconds %f") + std::cout << boost::format("Full seconds %u, Frac seconds %f, abs sample offset %u") % pmt::pmt_to_uint64(pmt_tuple_ref(value, 0)) % pmt::pmt_to_double(pmt_tuple_ref(value, 1)) + % offset << std::endl; } diff --git a/gr-uhd/examples/tag_source_demo.h b/gr-uhd/examples/tag_source_demo.h index a995762f7..9743c3407 100644 --- a/gr-uhd/examples/tag_source_demo.h +++ b/gr-uhd/examples/tag_source_demo.h @@ -122,7 +122,7 @@ private: const double _samp_rate; const uint64_t _samps_per_burst; const double _cycle_duration; - bool _do_new_burst; uint64_t _samps_left_in_burst; + bool _do_new_burst; }; diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index 953ef6995..51a756908 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -388,11 +388,11 @@ public: while (true){ #ifdef GR_UHD_USE_STREAM_API const size_t bpi = uhd::convert::get_bytes_per_item(_stream_args.cpu_format); - const size_t num_samps = _rx_stream->recv( + _rx_stream->recv( outputs, nbytes/bpi, _metadata, 0.0 ); #else - const size_t num_samps = _dev->get_device()->recv( + _dev->get_device()->recv( outputs, nbytes/_type->size, _metadata, *_type, uhd::device::RECV_MODE_FULL_BUFF, 0.0 ); |