diff --git a/tests/mock_tests/portsorch_ut.cpp b/tests/mock_tests/portsorch_ut.cpp index 0f5d5929ab..999aba00ff 100644 --- a/tests/mock_tests/portsorch_ut.cpp +++ b/tests/mock_tests/portsorch_ut.cpp @@ -656,6 +656,7 @@ namespace portsorch_test mockReply->element[2] = (redisReply *)calloc(sizeof(redisReply), 1); mockReply->element[2]->type = REDIS_REPLY_STRING; sai_port_oper_status_notification_t port_oper_status; + memset(&port_oper_status, 0, sizeof(port_oper_status)); port_oper_status.port_state = oper_status; port_oper_status.port_id = port.m_port_id; std::string data = sai_serialize_port_oper_status_ntf(1, &port_oper_status); diff --git a/tests/mock_tests/switchorch_ut.cpp b/tests/mock_tests/switchorch_ut.cpp index b123207909..a1e8b218e4 100644 --- a/tests/mock_tests/switchorch_ut.cpp +++ b/tests/mock_tests/switchorch_ut.cpp @@ -292,7 +292,9 @@ namespace switchorch_test initSwitchOrch(); sai_timespec_t timestamp = {.tv_sec = 1701160447, .tv_nsec = 538710245}; - sai_switch_health_data_t data = {.data_type = SAI_HEALTH_DATA_TYPE_GENERAL}; + sai_switch_health_data_t data; + memset(&data, 0, sizeof(data)); + data.data_type = SAI_HEALTH_DATA_TYPE_GENERAL; vector data_from_sai({100, 101, 115, 99, 114, 105, 112, 116, 105, 245, 111, 110, 245, 10, 123, 125, 100, 100}); sai_u8_list_t description; description.list = data_from_sai.data();