diff options
author | Alex Williams <alex.williams@ni.com> | 2019-05-30 15:34:47 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-06-07 10:35:00 -0700 |
commit | 0a1b9c2c6715a7a0756f8f7032cdb468e43dded1 (patch) | |
tree | 1186fbe104c226a8a3853048315ea8e3fbcc73a8 | |
parent | b4c3ddac75ea99d45c16988edf15d2291c4109bd (diff) | |
download | uhd-0a1b9c2c6715a7a0756f8f7032cdb468e43dded1.tar.gz uhd-0a1b9c2c6715a7a0756f8f7032cdb468e43dded1.tar.bz2 uhd-0a1b9c2c6715a7a0756f8f7032cdb468e43dded1.zip |
transport: Remove warning for memset in super_recv_packet_handler
Should use value initialization for non-trivial classes.
-rw-r--r-- | host/lib/transport/super_recv_packet_handler.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/transport/super_recv_packet_handler.hpp b/host/lib/transport/super_recv_packet_handler.hpp index 342d273a6..579b1de8d 100644 --- a/host/lib/transport/super_recv_packet_handler.hpp +++ b/host/lib/transport/super_recv_packet_handler.hpp @@ -435,7 +435,7 @@ private: } // extract packet info - memset(&info.ifpi, 0, sizeof(vrt::if_packet_info_t)); + info.ifpi = {}; info.ifpi.num_packet_words32 = num_packet_words32 - _header_offset_words32; info.vrt_hdr = buff->cast<const uint32_t*>() + _header_offset_words32; _vrt_unpacker(info.vrt_hdr, info.ifpi); @@ -684,9 +684,9 @@ private: curr_info.metadata.time_spec = prev_info.metadata.time_spec + time_spec_t::from_ticks( - prev_info[index].ifpi.num_payload_words32 * sizeof(uint32_t) - / _bytes_per_otw_item, - _samp_rate); + prev_info[index].ifpi.num_payload_words32 * sizeof(uint32_t) + / _bytes_per_otw_item, + _samp_rate); curr_info.metadata.out_of_sequence = true; curr_info.metadata.error_code = rx_metadata_t::ERROR_CODE_OVERFLOW; UHD_LOG_FASTPATH("D"); |