Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cppcheck-1.72 issues. #188

Merged
merged 2 commits into from
Jun 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions api/tests/server/test_observe_operation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down
1 change: 0 additions & 1 deletion api/tests/support/process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions ci/cppcheck.suppress
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Suppress all warnings about unmatched suppressions!
unmatchedSuppression:*

// Suppress all warnings from gengetopt-generated files:
*:*/*cmdline.c

Expand All @@ -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

2 changes: 1 addition & 1 deletion core/src/common/lwm2m_plaintext.c
Original file line number Diff line number Diff line change
Expand Up @@ -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')
{
Expand Down