diff --git a/src/k2hdkc_node_async.h b/src/k2hdkc_node_async.h index 2cf94e5..a131bc6 100644 --- a/src/k2hdkc_node_async.h +++ b/src/k2hdkc_node_async.h @@ -742,6 +742,9 @@ class SetAllWorker : public Nan::AsyncWorker // work bool result = false; dkcres_type_t rescode = DKC_NORESTYPE; + + // cppcheck-suppress unmatchedSuppression + // cppcheck-suppress knownConditionTrueFalse if(is_pass_set && 0 < expire){ // set value with passphrase and expire, then the operation is separated. K2hdkcComSet* pComObj; @@ -750,12 +753,16 @@ class SetAllWorker : public Nan::AsyncWorker }else{ pComObj = GetPmSlaveK2hdkcComSet(pslaveobj); } + // cppcheck-suppress unmatchedSuppression + // cppcheck-suppress knownConditionTrueFalse if(!pComObj){ this->SetErrorMessage("Internal error: Could not create command object."); return; } // set value to key + // cppcheck-suppress unmatchedSuppression + // cppcheck-suppress knownConditionTrueFalse result = pComObj->CommandSend(reinterpret_cast(strkey.c_str()), strkey.length() + 1, (is_val_set ? reinterpret_cast(strval.c_str()) : NULL), (is_val_set ? strval.length() + 1 : 0), false, (is_pass_set ? strpass.c_str() : NULL), &expire, &rescode); DKC_DELETE(pComObj);