mirror of https://gitee.com/bigwinds/arangodb
pacify cppcheck
This commit is contained in:
parent
46df140751
commit
d65662fb62
|
@ -51,8 +51,7 @@ class ApplicationAgency : virtual public arangodb::rest::ApplicationFeature {
|
|||
|
||||
public:
|
||||
|
||||
ApplicationAgency(ApplicationEndpointServer*);
|
||||
|
||||
explicit ApplicationAgency(ApplicationEndpointServer*);
|
||||
|
||||
~ApplicationAgency();
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ struct AgencyTransaction {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief shortcut to create a transaction with one operation
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
AgencyTransaction(AgencyOperation operation) {
|
||||
explicit AgencyTransaction(AgencyOperation const& operation) {
|
||||
operations.push_back(operation);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -375,11 +375,10 @@ bool ApplicationCluster::open() {
|
|||
AgencyComm comm;
|
||||
AgencyCommResult result;
|
||||
|
||||
bool success;
|
||||
do {
|
||||
AgencyCommLocker locker("Current", "WRITE");
|
||||
|
||||
success = locker.successful();
|
||||
bool success = locker.successful();
|
||||
if (success) {
|
||||
VPackBuilder builder;
|
||||
try {
|
||||
|
|
|
@ -670,6 +670,7 @@ int createDocumentOnCoordinator(
|
|||
}
|
||||
|
||||
responseCode = res.answer_code;
|
||||
TRI_ASSERT(res.answer != nullptr);
|
||||
auto parsedResult = res.answer->toVelocyPack(&VPackOptions::Defaults);
|
||||
resultBody.swap(parsedResult);
|
||||
return TRI_ERROR_NO_ERROR;
|
||||
|
@ -701,6 +702,7 @@ int createDocumentOnCoordinator(
|
|||
}
|
||||
resultMap.emplace(res.shardID, tmpBuilder);
|
||||
} else {
|
||||
TRI_ASSERT(res.answer != nullptr);
|
||||
resultMap.emplace(res.shardID,
|
||||
res.answer->toVelocyPack(&VPackOptions::Defaults));
|
||||
auto resultHeaders = res.answer->headers();
|
||||
|
@ -1243,7 +1245,7 @@ int getFilteredDocumentsOnCoordinator(
|
|||
size_t resCount = TRI_LengthArrayJson(documents);
|
||||
for (size_t k = 0; k < resCount; ++k) {
|
||||
try {
|
||||
TRI_json_t* element = TRI_LookupArrayJson(documents, k);
|
||||
TRI_json_t const* element = TRI_LookupArrayJson(documents, k);
|
||||
std::string id = arangodb::basics::JsonHelper::checkAndGetStringValue(
|
||||
element, TRI_VOC_ATTRIBUTE_ID);
|
||||
auto tmpBuilder = basics::JsonHelper::toVelocyPack(element);
|
||||
|
|
|
@ -562,6 +562,8 @@ class KeySpace {
|
|||
}
|
||||
}
|
||||
|
||||
TRI_ASSERT(dest != nullptr);
|
||||
|
||||
if (!TRI_IsArrayJson(dest->json)) {
|
||||
TRI_V8_THROW_EXCEPTION(TRI_ERROR_INTERNAL);
|
||||
}
|
||||
|
|
|
@ -2620,6 +2620,7 @@ static void MapGetVocBase(v8::Local<v8::String> const name,
|
|||
|
||||
if (collection != nullptr && collection->_cid == 0) {
|
||||
delete collection;
|
||||
collection = nullptr;
|
||||
TRI_V8_RETURN(v8::Handle<v8::Value>());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue