diff --git a/api/tests/server/test_observe_operation.cc b/api/tests/server/test_observe_operation.cc index 0135a57..dba9d56 100644 --- a/api/tests/server/test_observe_operation.cc +++ b/api/tests/server/test_observe_operation.cc @@ -319,7 +319,7 @@ TEST_F(TestObserveWithConnectedSession, AwaServerObserveOperation_Perform_handle { int count; - CallbackHandler1(AwaServerSession * session) : ObserveWaitCondition(session), count(0) {}; + explicit CallbackHandler1(AwaServerSession * session) : ObserveWaitCondition(session), count(0) {}; void callbackHandler(const AwaChangeSet * changeSet) { @@ -418,7 +418,7 @@ TEST_F(TestObserveWithConnectedSession, AwaServerObserveOperation_Perform_handle { int count; - CallbackHandler1(AwaServerSession * session) : ObserveWaitCondition(session), count(0) {}; + explicit CallbackHandler1(AwaServerSession * session) : ObserveWaitCondition(session), count(0) {}; void callbackHandler(const AwaChangeSet * changeSet) { @@ -586,7 +586,7 @@ TEST_F(TestObserveWithConnectedSession, AwaServerObserveOperation_Perform_handle { int count; - CallbackHandler1(AwaServerSession * session) : ObserveWaitCondition(session), count(0) {}; + explicit CallbackHandler1(AwaServerSession * session) : ObserveWaitCondition(session), count(0) {}; void callbackHandler(const AwaChangeSet * changeSet) { @@ -905,7 +905,7 @@ TEST_F(TestObserveWithConnectedSession, AwaServerObserveOperation_Perform_honour { int count; - CallbackHandler1(AwaServerSession * session) : ObserveWaitCondition(session), count(0) {}; + explicit CallbackHandler1(AwaServerSession * session) : ObserveWaitCondition(session), count(0) {}; void callbackHandler(const AwaChangeSet * changeSet) { @@ -954,7 +954,7 @@ TEST_F(TestObserveWithConnectedSession, AwaServerObserveOperation_Perform_cancel { int count; - CallbackHandler1(AwaServerSession * session) : ObserveWaitCondition(session), count(0) {}; + explicit CallbackHandler1(AwaServerSession * session) : ObserveWaitCondition(session), count(0) {}; virtual void callbackHandler(const AwaChangeSet * changeSet) { diff --git a/api/tests/support/process.cc b/api/tests/support/process.cc index fd5e903..7526c57 100644 --- a/api/tests/support/process.cc +++ b/api/tests/support/process.cc @@ -217,7 +217,6 @@ int WaitForIpc(int ipcPort, int timeout /*seconds*/, const char * request, size_ socklen_t fromAddrLen = sizeof(fromAddr); fromAddr.sin_family = AF_INET; - fromAddr.sin_family = SOCK_DGRAM; fromAddr.sin_port = htons(ipcPort); if (inet_aton("127.0.0.1", &fromAddr.sin_addr) == 0) diff --git a/ci/cppcheck.suppress b/ci/cppcheck.suppress index 195e3a2..94d70d2 100644 --- a/ci/cppcheck.suppress +++ b/ci/cppcheck.suppress @@ -1,3 +1,6 @@ +// Suppress all warnings about unmatched suppressions! +unmatchedSuppression:* + // Suppress all warnings from gengetopt-generated files: *:*/*cmdline.c @@ -8,3 +11,10 @@ unusedFunction:api/src/unsupported.c // Suppress all unused function warnings for now. unusedFunction:* +// False positives + +// "Member variable 'CallbackHandler1::count' is not initialized in the constructor." +uninitMemberVar:api/tests/client/test_subscribe_operation.cc +uninitMemberVar:api/tests/server/test_observe_operation.cc +uninitMemberVar:api/tests/server/test_server_events.cc + diff --git a/core/src/common/lwm2m_plaintext.c b/core/src/common/lwm2m_plaintext.c index 37fae66..a82fa9b 100644 --- a/core/src/common/lwm2m_plaintext.c +++ b/core/src/common/lwm2m_plaintext.c @@ -198,7 +198,7 @@ static int PTDeserialiseResource(SerdesContext * serdesContext, Lwm2mTreeNode ** case AwaResourceType_Boolean: if (bufferLen == 1) { - bool temp; + bool temp = false; if (buffer[0] == '0') {