From 567dcb4d8894c8ebf13ea9ae7be5f0f490a99eb6 Mon Sep 17 00:00:00 2001 From: Jacob Keeler Date: Fri, 29 Jul 2016 14:25:39 -0400 Subject: Fixed another Coverity issue involving mixed enums (CID 80028) --- .../src/commands/mobile/alert_maneuver_request.cc | 6 ++---- .../application_manager/src/commands/mobile/slider_request.cc | 7 ++++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc b/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc index c33d2e477a..cdeccd86f4 100644 --- a/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc +++ b/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc @@ -175,11 +175,9 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) { if (pending_requests_.IsFinal(event_id)) { bool result = ((mobile_apis::Result::SUCCESS == tts_speak_result_code_ || - mobile_apis::Result::UNSUPPORTED_RESOURCE == - tts_speak_result_code_ || + mobile_apis::Result::UNSUPPORTED_RESOURCE == tts_speak_result_code_ || mobile_apis::Result::INVALID_ENUM == tts_speak_result_code_) && - mobile_apis::Result::SUCCESS == - navi_alert_maneuver_result_code_) || + mobile_apis::Result::SUCCESS == navi_alert_maneuver_result_code_) || (mobile_apis::Result::SUCCESS == tts_speak_result_code_ && mobile_apis::Result::UNSUPPORTED_RESOURCE == navi_alert_maneuver_result_code_); diff --git a/src/components/application_manager/src/commands/mobile/slider_request.cc b/src/components/application_manager/src/commands/mobile/slider_request.cc index cef2bed1fc..c46311c667 100644 --- a/src/components/application_manager/src/commands/mobile/slider_request.cc +++ b/src/components/application_manager/src/commands/mobile/slider_request.cc @@ -130,10 +130,11 @@ void SliderRequest::on_event(const event_engine::Event& event) { //event_id == hmi_apis::FunctionID::UI_Slider: LOG4CXX_INFO(logger_, "Received UI_Slider event"); - const int response_code = - message[strings::params][hmi_response::code].asInt(); + const mobile_apis::Result::eType response_code = + static_cast( + message[strings::params][hmi_response::code].asInt()); smart_objects::SmartObject response_msg_params = message[strings::msg_params]; - if (response_code == hmi_apis::Common_Result::ABORTED && + if (response_code == mobile_apis::Result::ABORTED && message[strings::params][strings::data].keyExists(strings::slider_position)) { //Copy slider_position info to msg_params section response_msg_params[strings::slider_position] = -- cgit v1.2.1