From 0a1b9c2c6715a7a0756f8f7032cdb468e43dded1 Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Thu, 30 May 2019 15:34:47 -0700 Subject: transport: Remove warning for memset in super_recv_packet_handler Should use value initialization for non-trivial classes. --- host/lib/transport/super_recv_packet_handler.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'host') 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() + _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"); -- cgit v1.2.3