1
0
Fork 0

fixed compile warnings

This commit is contained in:
Jan Steemann 2014-09-26 12:30:42 +02:00
parent 2ddb342db3
commit 3afadfdefa
4 changed files with 11 additions and 9 deletions

View File

@ -1366,7 +1366,7 @@ void IndexRangeBlock::readEdgeIndex (IndexOrCondition const& ranges) {
TRI_document_collection_t* document = _collection->documentCollection();
std::string key;
TRI_edge_direction_e direction;
TRI_edge_direction_e direction = TRI_EDGE_IN; // must set a default to satisfy compiler
for (auto x: ranges.at(0)) {
if (x._attr == std::string(TRI_VOC_ATTRIBUTE_FROM)) {
@ -2251,10 +2251,9 @@ int AggregateBlock::getOrSkipSome (size_t atLeast,
unique_ptr<AqlItemBlock> res;
if(!skipping){
size_t const curRegs = cur->getNrRegs();
res.reset(new AqlItemBlock(atMost, _varOverview->nrRegs[_depth]));
TRI_ASSERT(curRegs <= res->getNrRegs());
TRI_ASSERT(cur->getNrRegs() <= res->getNrRegs());
inheritRegisters(cur, res.get(), _pos);
}

View File

@ -1603,10 +1603,12 @@ public:
virtual AqlItemBlock* getSome (size_t atLeast, size_t atMost) {
TRI_ASSERT(false);
THROW_ARANGO_EXCEPTION(TRI_ERROR_NOT_IMPLEMENTED);
}
virtual size_t skipSome (size_t atLeast, size_t atMost) {
TRI_ASSERT(false);
THROW_ARANGO_EXCEPTION(TRI_ERROR_NOT_IMPLEMENTED);
}
bool hasMoreForClient (size_t clientId);

View File

@ -1162,7 +1162,7 @@ static v8::Handle<v8::Value> JS_KeySetCas (v8::Arguments const& argv) {
auto h = &(static_cast<UserStructures*>(vocbase->_userStructures)->hashes);
int res;
bool match;
bool match = false;
{
READ_LOCKER(h->lock);
@ -1668,11 +1668,6 @@ void TRI_FreeUserStructuresVocBase (TRI_vocbase_t* vocbase) {
void TRI_InitV8UserStructures (v8::Handle<v8::Context> context) {
v8::HandleScope scope;
v8::Isolate* isolate = v8::Isolate::GetCurrent();
TRI_v8_global_t* v8g = static_cast<TRI_v8_global_t*>(isolate->GetData());
TRI_ASSERT(v8g != nullptr);
TRI_AddGlobalFunctionVocbase(context, "KEYSPACE_CREATE", JS_KeyspaceCreate);
TRI_AddGlobalFunctionVocbase(context, "KEYSPACE_DROP", JS_KeyspaceDrop);
TRI_AddGlobalFunctionVocbase(context, "KEYSPACE_COUNT", JS_KeyspaceCount);

View File

@ -374,9 +374,15 @@ static TRI_shape_t const* FindShape (TRI_shaper_t* shaper,
TRI_shape_t const* result = reinterpret_cast<TRI_shape_t const*>(m);
void* f = TRI_InsertKeyAssociativeSynced(&s->_shapeIds, &sid, (void*) m, false);
if (f != nullptr) {
LOG_ERROR("logic error when inserting shape");
}
TRI_ASSERT(f == nullptr);
f = TRI_InsertElementAssociativeSynced(&s->_shapeDictionary, (void*) m, false);
if (f != nullptr) {
LOG_ERROR("logic error when inserting shape");
}
TRI_ASSERT(f == nullptr);
TRI_Free(TRI_UNKNOWN_MEM_ZONE, shape);