diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2014-07-01 01:43:42 -0700 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2014-07-01 01:43:42 -0700 |
commit | f710cf194a9f5045287061805f2933d178df914e (patch) | |
tree | fda88f7830b92da487ba3db7b624fa4f08c6ac4a | |
parent | 64ee0139bca3f0d594ba69068b25bc591cd1dfe3 (diff) |
cppcheck annotations
cppcheck 1.65 warns about uninitialized variables in the "retry function" code
blocks. These are false positives because the code is only reached after
initializing them and/or restoring unitialized variables would not matter.
Have to add inline suppressions to get rid of the warnings.
-rwxr-xr-x | src/sysync/customimplds.cpp | 2 | ||||
-rw-r--r-- | src/sysync/localengineds.cpp | 11 | ||||
-rw-r--r-- | src/sysync/stdlogicds.cpp | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/sysync/customimplds.cpp b/src/sysync/customimplds.cpp index d0ee9d4..b8b75d0 100755 --- a/src/sysync/customimplds.cpp +++ b/src/sysync/customimplds.cpp @@ -2846,7 +2846,9 @@ bool TCustomImplDS::implProcessItem( aux->fRemoteID = remoteID ? remoteID : ""; aux->fRemoteIDSet = remoteID != NULL; aux->fSop = sop; + // cppcheck-suppress uninitvar aux->fRemoteHasLatestData = remoteHasLatestData; + // cppcheck-suppress uninitvar aux->fOp = op; aStatusCommand.setStatusCode(LOCERR_AGAIN); diff --git a/src/sysync/localengineds.cpp b/src/sysync/localengineds.cpp index 048e1b6..862fef7 100644 --- a/src/sysync/localengineds.cpp +++ b/src/sysync/localengineds.cpp @@ -5121,7 +5121,9 @@ bool TLocalEngineDS::engProcessSyncOpItem( aux = new SyncOpItemAux; } aItemP->aux = aux; + // cppcheck-suppress uninitvar aux->remoteTypeP = remoteTypeP; + // cppcheck-suppress uninitvar aux->localTypeP = localTypeP; aux->fmt = fmt; aux->syncitemP = syncitemP; @@ -5525,16 +5527,23 @@ bool TLocalEngineDS::engProcessRemoteItemAsServer( aSyncItemP->setAux(TSyncItem::LOCAL_ENGINE, aux); } + // cppcheck-suppress uninitvar aux->fConflictingItemP = conflictingItemP; + // cppcheck-suppress uninitvar aux->fEchoItemP = echoItemP; + // cppcheck-suppress uninitvar aux->fDelItemP = delitemP; aux->fMatchingItemP = matchingItemP; + // cppcheck-suppress uninitvar aux->fChangedIncoming = changedincoming; + // cppcheck-suppress uninitvar aux->fChangedExisting = changedexisting; + // cppcheck-suppress uninitvar aux->fRemainsVisible = remainsvisible; aux->fSyncOp = syncop; aux->fItemTypeID = itemtypeid; aux->fRemoteID = remoteid; + // cppcheck-suppress uninitvar aux->fOp = op; aux->fCurrentSyncOp = fCurrentSyncOp; @@ -6546,9 +6555,11 @@ bool TLocalEngineDS::engProcessRemoteItemAsClient( aSyncItemP->setAux(TSyncItem::LOCAL_ENGINE, aux); } + // cppcheck-suppress uninitvar aux->fRemainsVisible = remainsvisible; aux->fSyncOp = syncop; aux->fRemoteID = remoteid; + // cppcheck-suppress uninitvar aux->fOp = op; aux->fCurrentSyncOp = fCurrentSyncOp; diff --git a/src/sysync/stdlogicds.cpp b/src/sysync/stdlogicds.cpp index 10ea51f..6279406 100644 --- a/src/sysync/stdlogicds.cpp +++ b/src/sysync/stdlogicds.cpp @@ -1275,6 +1275,7 @@ bool TStdLogicDS::logicProcessRemoteItem( aux->fShouldBeVisible = shouldbevisible; aux->fVisibleInSyncset = aVisibleInSyncset; aux->fSyncItemP = syncitemP; + // cppcheck-suppress uninitvar aux->fOp = op; aStatusCommand.setStatusCode(LOCERR_AGAIN); return false; |