1
0
Fork 0

fixed warnings

This commit is contained in:
Frank Celler 2012-07-14 23:18:33 +02:00
parent 17cf74b080
commit b1aac93853
6 changed files with 31 additions and 24 deletions

View File

@ -68,9 +68,9 @@ typedef struct BitColumn_s {
// -----------------------------------------------------------------------------
static int extendColumns (TRI_bitarray_t*, size_t);
static void printBitarray (TRI_bitarray_t*);
// static void printBitarray (TRI_bitarray_t*);
static void setBitarrayMask (TRI_bitarray_t*, TRI_bitarray_mask_t*, TRI_master_table_position_t*);
static void debugPrintMask (TRI_bitarray_t*, uint64_t);
// static void debugPrintMask (TRI_bitarray_t*, uint64_t);
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup bitarray
@ -345,7 +345,7 @@ int TRI_InsertBitMaskElementBitarray(TRI_bitarray_t* ba, TRI_bitarray_mask_t* ma
////////////////////////////////////////////////////////////////////////////////
int TRI_LookupBitMaskBitarray(TRI_bitarray_t* ba, TRI_bitarray_mask_t* mask, void* resultStorage ) {
int result;
// int result;
uint8_t numBits;
int i_blockNum,j_bitNum,k_colNum;
TRI_master_table_position_t position;
@ -424,7 +424,7 @@ int TRI_LookupBitMaskBitarray(TRI_bitarray_t* ba, TRI_bitarray_mask_t* mask, voi
//debugPrintMask(ba,mask->_ignoreMask);
position._blockNum = i_blockNum;
position._bitNum = j_bitNum;
result = storeElementMasterTable(ba->_masterTable, resultStorage, &position);
/* result = */ storeElementMasterTable(ba->_masterTable, resultStorage, &position);
}
}
@ -617,6 +617,7 @@ int extendColumns(TRI_bitarray_t* ba, size_t newBlocks) {
/// @brief debugging purposes only -- prints a visual representation of the bitarrays
////////////////////////////////////////////////////////////////////////////////
/*
void printBitarray(TRI_bitarray_t* ba) {
int j;
uint64_t bb;
@ -660,7 +661,8 @@ void printBitarray(TRI_bitarray_t* ba) {
printf("\n");
}
}
}
}
*/
////////////////////////////////////////////////////////////////////////////////
/// @brief inserts a bitmask into a bit array
@ -717,6 +719,7 @@ static void setBitarrayMask(TRI_bitarray_t* ba, TRI_bitarray_mask_t* mask, TRI_m
/*
void debugPrintMask(TRI_bitarray_t* ba, uint64_t mask) {
int j;
@ -731,6 +734,7 @@ void debugPrintMask(TRI_bitarray_t* ba, uint64_t mask) {
}
printf("\n\n");
}
*/
////////////////////////////////////////////////////////////////////////////////
/// @}

View File

@ -63,7 +63,7 @@ static void BitarrayIndexResetIterator (TRI_index_iterator_t*, bool)
static int BitarrayIndex_findHelper (BitarrayIndex*, TRI_vector_t*, TRI_index_operator_t*, TRI_index_iterator_t*);
static int generateBitMask (BitarrayIndex*, const BitarrayIndexElement*, TRI_bitarray_mask_t*);
static int generateEqualBitMask (BitarrayIndex*, const TRI_relation_index_operator_t*, TRI_bitarray_mask_t*);
static void debugPrintMask (BitarrayIndex*, uint64_t);
// static void debugPrintMask (BitarrayIndex*, uint64_t);
@ -517,14 +517,16 @@ int BitarrayIndex_findHelper(BitarrayIndex* baIndex,
TRI_index_operator_t* indexOperator,
TRI_index_iterator_t* iterator) {
BitarrayIndexElement element;
// BitarrayIndexElement element;
TRI_bitarray_mask_t mask;
int result;
/*
element.fields = NULL;
element.numFields = 0;
element.collection = NULL;
element.data = NULL;
*/
mask._mask = 0;
mask._ignoreMask = 0;
@ -541,10 +543,12 @@ int BitarrayIndex_findHelper(BitarrayIndex* baIndex,
case TRI_LT_INDEX_OPERATOR:
case TRI_GE_INDEX_OPERATOR:
case TRI_GT_INDEX_OPERATOR: {
TRI_relation_index_operator_t* relationOperator = (TRI_relation_index_operator_t*)(indexOperator);
/* TRI_relation_index_operator_t* relationOperator = (TRI_relation_index_operator_t*) (indexOperator); */
/*
element.fields = relationOperator->_fields;
element.numFields = relationOperator->_numFields;
element.collection = relationOperator->_collection;
*/
break;
}
@ -998,6 +1002,7 @@ int generateEqualBitMask(BitarrayIndex* baIndex, const TRI_relation_index_operat
}
/*
void debugPrintMask(BitarrayIndex* baIndex, uint64_t mask) {
int j;
@ -1012,6 +1017,7 @@ void debugPrintMask(BitarrayIndex* baIndex, uint64_t mask) {
}
printf("\n\n");
}
*/
////////////////////////////////////////////////////////////////////////////////
/// @}

View File

@ -729,7 +729,7 @@ static v8::Handle<v8::Value> ExecuteSkiplistQuery (v8::Arguments const& argv, st
static bool BitarrayFilterExample(TRI_index_iterator_t* indexIterator) {
BitarrayIndexElement* indexElement;
TRI_bitarray_index_t* baIndex;
TRI_doc_mptr_t* doc;
// TRI_doc_mptr_t* doc;
indexElement = (BitarrayIndexElement*) indexIterator->_next(indexIterator);
@ -744,7 +744,7 @@ static bool BitarrayFilterExample(TRI_index_iterator_t* indexIterator) {
return false;
}
doc = (TRI_doc_mptr_t*) indexElement->data;
/* doc = (TRI_doc_mptr_t*) indexElement->data; */
// ..........................................................................
// Now perform any additional filter operations you require on the doc

View File

@ -2304,7 +2304,7 @@ static v8::Handle<v8::Value> EnsureBitarray (v8::Arguments const& argv, bool sup
v8::HandleScope scope;
bool ok;
string errorString;
int errorCode;
// int errorCode;
TRI_index_t* bitarrayIndex = 0;
bool indexCreated;
v8::Handle<v8::Value> theIndex;
@ -2376,7 +2376,7 @@ static v8::Handle<v8::Value> EnsureBitarray (v8::Arguments const& argv, bool sup
if (! argument->IsString() ) {
errorString = "invalid parameter -- expected string parameter";
errorCode = TRI_ERROR_ILLEGAL_OPTION;
// errorCode = TRI_ERROR_ILLEGAL_OPTION;
ok = false;
break;
}
@ -2395,7 +2395,7 @@ static v8::Handle<v8::Value> EnsureBitarray (v8::Arguments const& argv, bool sup
if (! argument->IsArray() ) {
errorString = "invalid parameter -- expected an array (list)";
errorCode = TRI_ERROR_ILLEGAL_OPTION;
// errorCode = TRI_ERROR_ILLEGAL_OPTION;
ok = false;
break;
}
@ -2414,7 +2414,7 @@ static v8::Handle<v8::Value> EnsureBitarray (v8::Arguments const& argv, bool sup
if (value == NULL) {
errorString = "invalid parameter -- expected an array (list)";
errorCode = TRI_ERROR_ILLEGAL_OPTION;
// errorCode = TRI_ERROR_ILLEGAL_OPTION;
ok = false;
break;
}
@ -2426,7 +2426,7 @@ static v8::Handle<v8::Value> EnsureBitarray (v8::Arguments const& argv, bool sup
if (value->_type != TRI_JSON_LIST) {
errorString = "invalid parameter -- expected an array (list)";
errorCode = TRI_ERROR_ILLEGAL_OPTION;
// errorCode = TRI_ERROR_ILLEGAL_OPTION;
ok = false;
break;
}
@ -2445,7 +2445,7 @@ static v8::Handle<v8::Value> EnsureBitarray (v8::Arguments const& argv, bool sup
if (attributes._length != values._length) {
errorString = "invalid parameter -- expected an array (list)";
errorCode = TRI_ERROR_ILLEGAL_OPTION;
// errorCode = TRI_ERROR_ILLEGAL_OPTION;
ok = false;
}
}
@ -2459,7 +2459,7 @@ static v8::Handle<v8::Value> EnsureBitarray (v8::Arguments const& argv, bool sup
if (ok) {
bitarrayIndex = TRI_EnsureBitarrayIndexSimCollection(sim, &attributes, &values, supportUndef, &indexCreated);
if (bitarrayIndex == 0) {
errorCode = TRI_errno();
// errorCode = TRI_errno();
errorString = "index could not be created from Simple Collection";
ok = false;
}
@ -2490,7 +2490,7 @@ static v8::Handle<v8::Value> EnsureBitarray (v8::Arguments const& argv, bool sup
TRI_json_t* json = bitarrayIndex->json(bitarrayIndex, collection->_collection);
if (json == NULL) {
errorCode = TRI_errno();
// errorCode = TRI_errno();
errorString = "out of memory";
ok = false;
}

View File

@ -2646,7 +2646,7 @@ static int BitarrayBasedIndexFromJson (TRI_sim_collection_t* sim,
TRI_json_t* keyValues;
TRI_vector_pointer_t attributes;
TRI_vector_pointer_t values;
bool unique;
// bool unique;
bool supportUndef;
bool created;
size_t fieldCount;
@ -2680,13 +2680,13 @@ static int BitarrayBasedIndexFromJson (TRI_sim_collection_t* sim,
// the bitarray index.
// ...........................................................................
unique = false;
// unique = false;
uniqueIndex = TRI_LookupArrayJson(definition, "unique");
if (uniqueIndex == NULL || uniqueIndex->_type != TRI_JSON_BOOLEAN) {
LOG_ERROR("ignoring index %lu, could not determine if unique or non-unique", (unsigned long) iid);
return TRI_set_errno(TRI_ERROR_BAD_PARAMETER);
}
unique = uniqueIndex->_value._boolean;
// unique = uniqueIndex->_value._boolean;
// ...........................................................................

View File

@ -418,11 +418,8 @@ static const struct mrb_data_type MR_ArangoConnection_Type = {
};
static void InitMRClientConnection (mrb_state* mrb, MRubyClientConnection* connection) {
MR_state_t* mrs;
struct RClass *rcl;
mrs = (MR_state_t*) mrb;
// .............................................................................
// arango client connection
// .............................................................................