Skip to content
Browse files

Coverity issues bug fixes

:Detailed Notes:
Fixed uninitialized scalar field
  - include/internal/Callback.h
Fixed uninitialized pointer field
  - src/MojoCall.cpp
  - include/internal/MojoCall.h
Fixed unchecked return value
  - src/ActivityCategory.cpp
  - src/DevelCategory.cpp
  - src/TestCategory.cpp

:Testing Performed:
Compiled locally and tested on official build.

:QA Notes:

:Issues Addressed:
[GF-51356] Activity Manager : Fix Issue From Static Analysis (Coverity)

Open-webOS-DCO-1.0-Signed-off-by: heekwon kang <hk.kang@lge.com>

Change-Id: I069018626c4face88b989737bb39fb1d66faee99
Reviewed-on: https://g2g.palm.com/3905
Reviewed-by: Build Verification
Reviewed-by: Heekwon Kang <hk.kang@lge.com>
Tested-by: Heekwon Kang <hk.kang@lge.com>
Reviewed-by: Alan Levi <alan.levi@lge.com>
  • Loading branch information...
1 parent 1ae41ff commit 99ae47172a7b047458c11f5370c6ba414138a799 @xeon2 xeon2 committed with lgAlan
Showing with 6 additions and 11 deletions.
  1. +0 −1 include/internal/Callback.h
  2. +0 −1 include/internal/MojoCall.h
  3. +2 −1 src/ActivityCategory.cpp
  4. +2 −1 src/DevelCategory.cpp
  5. +0 −6 src/MojoCall.cpp
  6. +2 −1 src/TestCategory.cpp
View
1 include/internal/Callback.h
@@ -48,7 +48,6 @@ class Callback : public boost::enable_shared_from_this<Callback>
protected:
bool m_complete;
- bool m_succeeded;
unsigned m_serial;
View
1 include/internal/MojoCall.h
@@ -51,7 +51,6 @@ class MojoCall : public boost::enable_shared_from_this<MojoCall>
const MojObject& response, MojErr err);
protected:
- MojoCall();
void HandleResponseWrapper(MojServiceMessage *msg, MojObject& response, MojErr err);
View
3 src/ActivityCategory.cpp
@@ -3371,7 +3371,8 @@ ActivityCategoryHandler::LookupActivity(MojServiceMessage *msg, MojObject& paylo
try {
act = m_json->LookupActivity(payload, MojoSubscription::GetBusId(msg));
} catch (const std::exception& except) {
- msg->replyError(MojErrNotFound, except.what());
+ MojErr err = msg->replyError(MojErrNotFound, except.what());
+ MojErrCheck(err);
return MojErrNotFound;
}
View
3 src/DevelCategory.cpp
@@ -457,7 +457,8 @@ DevelCategoryHandler::LookupActivity(MojServiceMessage *msg, MojObject& payload,
try {
act = m_json->LookupActivity(payload, MojoSubscription::GetBusId(msg));
} catch (const std::exception& except) {
- msg->replyError(MojErrNotFound, except.what());
+ MojErr err = msg->replyError(MojErrNotFound, except.what());
+ MojErrCheck(err);
return MojErrNotFound;
}
View
6 src/MojoCall.cpp
@@ -39,12 +39,6 @@ MojoCall::MojoCall(MojService *service,
m_serial = s_serial++;
}
-MojoCall::MojoCall()
- : m_subSerial(0)
-{
- m_serial = s_serial++;
-}
-
MojoCall::~MojoCall()
{
MojLogDebug(s_log, _T("[Call %u] Cleaning up"), m_serial);
View
3 src/TestCategory.cpp
@@ -225,7 +225,8 @@ TestCategoryHandler::LookupActivity(MojServiceMessage *msg, MojObject& payload,
try {
act = m_json->LookupActivity(payload, MojoSubscription::GetBusId(msg));
} catch (const std::exception& except) {
- msg->replyError(MojErrNotFound, except.what());
+ MojErr err = msg->replyError(MojErrNotFound, except.what());
+ MojErrCheck(err);
return MojErrNotFound;
}

0 comments on commit 99ae471

Please sign in to comment.
Something went wrong with that request. Please try again.