From b9a22173555224d86bb586861edebbabaf457147 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Tue, 24 Mar 2020 09:47:07 +0100 Subject: [PATCH] fix uninit vars reported by Coverity --- srsue/hdr/stack/mac/mac.h | 2 +- srsue/hdr/stack/upper/nas_common.h | 4 ++-- srsue/test/mac_test.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/srsue/hdr/stack/mac/mac.h b/srsue/hdr/stack/mac/mac.h index 71376bc12..de87331aa 100644 --- a/srsue/hdr/stack/mac/mac.h +++ b/srsue/hdr/stack/mac/mac.h @@ -121,7 +121,7 @@ private: rrc_interface_mac* rrc_h = nullptr; stack_interface_mac* stack_h = nullptr; srslte::log_ref log_h; - mac_interface_phy_lte::mac_phy_cfg_mbsfn_t phy_mbsfn_cfg; + mac_interface_phy_lte::mac_phy_cfg_mbsfn_t phy_mbsfn_cfg = {}; // RNTI search window scheduling int si_window_length = -1, si_window_start = -1; diff --git a/srsue/hdr/stack/upper/nas_common.h b/srsue/hdr/stack/upper/nas_common.h index c15b7ed80..4dd029577 100644 --- a/srsue/hdr/stack/upper/nas_common.h +++ b/srsue/hdr/stack/upper/nas_common.h @@ -25,8 +25,8 @@ namespace srsue { typedef struct { - int airplane_t_on_ms; - int airplane_t_off_ms; + int airplane_t_on_ms = -1; + int airplane_t_off_ms = -1; } nas_sim_args_t; class nas_args_t diff --git a/srsue/test/mac_test.cc b/srsue/test/mac_test.cc index 7b4fede8c..b209cb685 100644 --- a/srsue/test/mac_test.cc +++ b/srsue/test/mac_test.cc @@ -372,7 +372,7 @@ public: } private: - phy_interface_mac_lte* phy_h; + phy_interface_mac_lte* phy_h = nullptr; mac* mac_h = nullptr; };