diff options
| author | Martin Braun <martin.braun@ettus.com> | 2020-04-14 22:32:18 -0700 | 
|---|---|---|
| committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-04-17 14:36:44 -0500 | 
| commit | 6dc3968765b72024afde82dc9e44cc5211c5451e (patch) | |
| tree | 776f2abf41838c4eb220815c18efeed11ef0d8ef /host | |
| parent | 18e41b32ffa9046287d7cb1d438ad1343a50fd71 (diff) | |
| download | uhd-6dc3968765b72024afde82dc9e44cc5211c5451e.tar.gz uhd-6dc3968765b72024afde82dc9e44cc5211c5451e.tar.bz2 uhd-6dc3968765b72024afde82dc9e44cc5211c5451e.zip | |
lib: rfnoc: Fix "unused" warnings for non-trace log levels
When the compile log level is higher than TRACE, the UHD_LOG_TRACE()
macros get removed, which can lead to unused variables. This modifies
UHD to avoid those warnings, with no functional changes.
Diffstat (limited to 'host')
| -rw-r--r-- | host/lib/rfnoc/mgmt_portal.cpp | 3 | ||||
| -rw-r--r-- | host/lib/rfnoc/rfnoc_graph.cpp | 12 | 
2 files changed, 6 insertions, 9 deletions
| diff --git a/host/lib/rfnoc/mgmt_portal.cpp b/host/lib/rfnoc/mgmt_portal.cpp index 1c6e2c608..971c9837a 100644 --- a/host/lib/rfnoc/mgmt_portal.cpp +++ b/host/lib/rfnoc/mgmt_portal.cpp @@ -249,7 +249,6 @@ public:              throw uhd::lookup_error(                  "initialize_endpoint(): Cannot reach node with specified address.");          } -        const node_addr_t& node_addr = _node_addr_map.at(lookup_node);          // Add/update the entry in the stream endpoint ID map          _epid_addr_map[epid] = addr;          UHD_LOG_DEBUG("RFNOC::MGMT", @@ -258,7 +257,7 @@ public:          UHD_LOG_TRACE("RFNOC::MGMT",              (boost::format(                   "Stream endpoint with EPID=%d can be reached by taking the path: %s") -                % epid % to_string(node_addr))); +                % epid % to_string(_node_addr_map.at(lookup_node))));      }      virtual bool is_endpoint_registered(const sep_id_t& epid) const diff --git a/host/lib/rfnoc/rfnoc_graph.cpp b/host/lib/rfnoc/rfnoc_graph.cpp index f5a462bad..6304fa467 100644 --- a/host/lib/rfnoc/rfnoc_graph.cpp +++ b/host/lib/rfnoc/rfnoc_graph.cpp @@ -564,7 +564,10 @@ private:           * state before we construct their block controller, and so that we don't           * reset any setting that the block controller writes           */ -        _flush_and_reset_mboard(mb_idx, mb_cz, num_blocks, first_block_port); +        UHD_LOG_TRACE(LOG_ID, +            std::string("Flushing and resetting blocks on mboard ") +                + std::to_string(mb_idx)); +        _flush_and_reset_mboard(mb_cz, num_blocks, first_block_port);          // Make a map to count the number of each block we have          std::unordered_map<std::string, uint16_t> block_count_map; @@ -785,15 +788,10 @@ private:      }      //! Flush and reset each connected port on the mboard -    void _flush_and_reset_mboard(size_t mb_idx, -        detail::client_zero::sptr mb_cz, +    void _flush_and_reset_mboard(detail::client_zero::sptr mb_cz,          const size_t num_blocks,          const size_t first_block_port)      { -        UHD_LOG_TRACE(LOG_ID, -            std::string("Flushing and resetting blocks on mboard ") -                + std::to_string(mb_idx)); -          if (!mb_cz->complete_flush_all_blocks()) {              UHD_LOG_WARNING(LOG_ID, "One or more blocks timed out during flush!");          } | 
