summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacobkeeler <jacob.keeler@livioradio.com>2018-09-28 09:44:01 -0400
committerjacobkeeler <jacob.keeler@livioradio.com>2018-09-28 09:44:01 -0400
commit0c32601453970fa16798d3d917b360c0a8ac3c02 (patch)
tree3636c29c2b8e29821878f6ad6878b1a969b30909
parent35defc42777c57412cbf8b793489ab0dac502f4e (diff)
downloadsdl_core-fix/coverity_fixes_5.0.0.tar.gz
Fix uninitialized membersfix/coverity_fixes_5.0.0
CIDs 188281, 188276, 188250, 188245, 188239
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc1
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc7
-rw-r--r--src/components/application_manager/src/system_time/system_time_handler_impl.cc1
-rw-r--r--src/components/include/security_manager/ssl_context.h3
-rw-r--r--src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h2
6 files changed, 10 insertions, 6 deletions
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
index 40249387a7..c24529d720 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
@@ -52,6 +52,7 @@ RCCommandRequest::RCCommandRequest(
params.hmi_capabilities_,
params.policy_handler_)
, is_subscribed(false)
+ , auto_allowed_(false)
, resource_allocation_manager_(params.resource_allocation_manager_)
, interior_data_cache_(params.interior_data_cache_)
, interior_data_manager_(params.interior_data_manager_) {}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h
index 4564858845..1ad1c07b2a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/create_interaction_choice_set_request.h
@@ -128,7 +128,7 @@ class CreateInteractionChoiceSetRequest
int32_t choice_set_id_;
size_t expected_chs_count_;
size_t received_chs_count_;
- bool should_send_warnings;
+ bool should_send_warnings_;
/**
* @brief Flag for stop sending VR commands to HMI, in case one of responses
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
index cd1f95b93c..416f4f2085 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
@@ -63,6 +63,7 @@ CreateInteractionChoiceSetRequest::CreateInteractionChoiceSetRequest(
, choice_set_id_(0)
, expected_chs_count_(0)
, received_chs_count_(0)
+ , should_send_warnings_(false)
, error_from_hmi_(false)
, is_timed_out_(false) {}
@@ -80,7 +81,7 @@ void CreateInteractionChoiceSetRequest::Run() {
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
- should_send_warnings = false;
+
for (uint32_t i = 0;
i < (*message_)[strings::msg_params][strings::choice_set].length();
++i) {
@@ -109,7 +110,7 @@ void CreateInteractionChoiceSetRequest::Run() {
return;
} else if (verification_result_image == Result::WARNINGS ||
verification_result_secondary_image == Result::WARNINGS) {
- should_send_warnings = true;
+ should_send_warnings_ = true;
break;
}
}
@@ -465,7 +466,7 @@ void CreateInteractionChoiceSetRequest::DeleteChoices() {
void CreateInteractionChoiceSetRequest::OnAllHMIResponsesReceived() {
LOG4CXX_AUTO_TRACE(logger_);
- if (!error_from_hmi_ && should_send_warnings) {
+ if (!error_from_hmi_ && should_send_warnings_) {
SendResponse(true, mobile_apis::Result::WARNINGS, kInvalidImageWarningInfo);
} else if (!error_from_hmi_) {
SendResponse(true, mobile_apis::Result::SUCCESS);
diff --git a/src/components/application_manager/src/system_time/system_time_handler_impl.cc b/src/components/application_manager/src/system_time/system_time_handler_impl.cc
index 6ae6d3e901..27f0972c01 100644
--- a/src/components/application_manager/src/system_time/system_time_handler_impl.cc
+++ b/src/components/application_manager/src/system_time/system_time_handler_impl.cc
@@ -46,6 +46,7 @@ SystemTimeHandlerImpl::SystemTimeHandlerImpl(
: event_engine::EventObserver(application_manager.event_dispatcher())
, utc_time_can_be_received_(false)
, awaiting_get_system_time_(false)
+ , last_time_(0)
, system_time_listener_(NULL)
, app_manager_(application_manager) {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/include/security_manager/ssl_context.h b/src/components/include/security_manager/ssl_context.h
index 9d66e1af2f..7d52c72abe 100644
--- a/src/components/include/security_manager/ssl_context.h
+++ b/src/components/include/security_manager/ssl_context.h
@@ -77,7 +77,8 @@ class SSLContext {
};
struct HandshakeContext {
- HandshakeContext() : expected_sn(""), expected_cn("") {}
+ HandshakeContext()
+ : expected_sn(""), expected_cn(""), system_time(time(NULL)) {}
HandshakeContext(const custom_str::CustomString& exp_sn,
const custom_str::CustomString& exp_cn)
diff --git a/src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h b/src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h
index fd90cb0f22..bb60b09a9d 100644
--- a/src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h
+++ b/src/components/transport_manager/include/transport_manager/tcp/platform_specific/linux/platform_specific_network_interface_listener_impl.h
@@ -137,7 +137,7 @@ class PlatformSpecificNetworkInterfaceListener
struct sockaddr_storage address;
EventParam(int interface_index, unsigned int interface_flags = 0)
- : if_index(interface_index), flags(interface_flags) {}
+ : if_index(interface_index), flags(interface_flags), address() {}
};
// parent class which we will notify the events to