mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 02:09:28 +00:00
fix warnings.
This commit is contained in:
parent
c7b2b94bf1
commit
949620ddc1
@ -126,7 +126,7 @@ void morkProbeMap::rehash_old_map(morkEnv* ev, morkMapScratch* ioScratch)
|
||||
mork_u1* k = keys + (i * keySize);
|
||||
while ( !this->ProbeMapIsKeyNil(ev, k) )
|
||||
{
|
||||
if ( ++i >= slots ) // advanced past end? need to wrap around now?
|
||||
if ( ++i >= (mork_pos)slots ) // advanced past end? need to wrap around now?
|
||||
i = 0; // wrap around to first slot in map's hash table
|
||||
|
||||
if ( i == startPos ) // no void slots were found anywhere in map?
|
||||
@ -284,7 +284,7 @@ morkProbeMap::find_key_pos(morkEnv* ev, const void* inAppKey,
|
||||
mork_test outTest = this->MapTest(ev, k + (i * size), inAppKey);
|
||||
while ( outTest == morkTest_kMiss )
|
||||
{
|
||||
if ( ++i >= slots ) // advancing goes beyond end? need to wrap around now?
|
||||
if ( ++i >= (mork_pos)slots ) // advancing goes beyond end? need to wrap around now?
|
||||
i = 0; // wrap around to first slot in map's hash table
|
||||
|
||||
if ( i == startPos ) // no void slots were found anywhere in map?
|
||||
@ -980,7 +980,7 @@ mork_bool morkProbeMapIter::IterFirst(morkEnv* ev,
|
||||
mork_count slots = map->sMap_Slots; // total number of key buckets
|
||||
mork_pos here = 0; // first hash bucket
|
||||
|
||||
while ( here < slots )
|
||||
while ( here < (mork_pos)slots )
|
||||
{
|
||||
if ( !map->ProbeMapIsKeyNil(ev, k + (here * size)) )
|
||||
{
|
||||
@ -1020,7 +1020,7 @@ mork_bool morkProbeMapIter::IterNext(morkEnv* ev,
|
||||
mork_num size = map->sMap_KeySize; // number of bytes in each key
|
||||
mork_count slots = map->sMap_Slots; // total number of key buckets
|
||||
|
||||
while ( here < slots )
|
||||
while ( here < (mork_pos)slots )
|
||||
{
|
||||
if ( !map->ProbeMapIsKeyNil(ev, k + (here * size)) )
|
||||
{
|
||||
@ -1051,7 +1051,7 @@ mork_bool morkProbeMapIter::IterHere(morkEnv* ev,
|
||||
{
|
||||
mork_pos here = (mork_pos) sProbeMapIter_HereIx;
|
||||
mork_count slots = map->sMap_Slots; // total number of key buckets
|
||||
if ( sProbeMapIter_HereIx >= 0 && here < slots )
|
||||
if ( sProbeMapIter_HereIx >= 0 && (here < (mork_pos)slots))
|
||||
{
|
||||
mork_u1* k = map->sMap_Keys; // key array, each of size sMap_KeySize
|
||||
mork_num size = map->sMap_KeySize; // number of bytes in each key
|
||||
|
@ -781,7 +781,7 @@ void morkRow::CutColumn(morkEnv* ev, mdb_column inColumn)
|
||||
{
|
||||
mork_fill last = fill - 1; // index of last cell in row
|
||||
|
||||
if ( pos < last ) // need to move cells following cut cell?
|
||||
if ( pos < (mork_pos)last ) // need to move cells following cut cell?
|
||||
{
|
||||
morkCell* lastCell = mRow_Cells + last;
|
||||
mork_count after = last - pos; // cell count after cut cell
|
||||
|
@ -282,7 +282,7 @@ morkSorting::ArrayHasOid(morkEnv* ev, const mdbOid* inOid)
|
||||
MORK_USED_1(ev);
|
||||
mork_count count = mSorting_RowArray.mArray_Fill;
|
||||
mork_pos pos = -1;
|
||||
while ( ++pos < count )
|
||||
while ( ++pos < (mork_pos)count )
|
||||
{
|
||||
morkRow* row = (morkRow*) mSorting_RowArray.At(pos);
|
||||
MORK_ASSERT(row);
|
||||
|
@ -185,7 +185,7 @@ morkSortingRowCursor::NextRow(morkEnv* ev, mdbOid* outOid, mdb_pos* outPos)
|
||||
else
|
||||
++pos;
|
||||
|
||||
if ( pos < array->mArray_Fill )
|
||||
if ( pos < (mork_pos)(array->mArray_Fill))
|
||||
{
|
||||
mCursor_Pos = pos; // update for next time
|
||||
morkRow* row = (morkRow*) array->At(pos);
|
||||
|
@ -435,7 +435,7 @@ morkTable::ArrayHasOid(morkEnv* ev, const mdbOid* inOid)
|
||||
MORK_USED_1(ev);
|
||||
mork_count count = mTable_RowArray.mArray_Fill;
|
||||
mork_pos pos = -1;
|
||||
while ( ++pos < count )
|
||||
while ( ++pos < (mork_pos)count )
|
||||
{
|
||||
morkRow* row = (morkRow*) mTable_RowArray.At(pos);
|
||||
MORK_ASSERT(row);
|
||||
@ -471,7 +471,7 @@ void morkTable::build_row_map(morkEnv* ev)
|
||||
mTable_RowMap = map; // put strong ref here
|
||||
count = mTable_RowArray.mArray_Fill;
|
||||
mork_pos pos = -1;
|
||||
while ( ++pos < count )
|
||||
while ( ++pos < (mork_pos)count )
|
||||
{
|
||||
morkRow* row = (morkRow*) mTable_RowArray.At(pos);
|
||||
if ( row && row->IsRow() )
|
||||
@ -494,7 +494,7 @@ morkRow* morkTable::find_member_row(morkEnv* ev, morkRow* ioRow)
|
||||
{
|
||||
mork_count count = mTable_RowArray.mArray_Fill;
|
||||
mork_pos pos = -1;
|
||||
while ( ++pos < count )
|
||||
while ( ++pos < (mork_pos)count )
|
||||
{
|
||||
morkRow* row = (morkRow*) mTable_RowArray.At(pos);
|
||||
if ( row == ioRow )
|
||||
|
@ -200,7 +200,7 @@ morkTableRowCursor::NextRow(morkEnv* ev, mdbOid* outOid, mdb_pos* outPos)
|
||||
else
|
||||
++pos;
|
||||
|
||||
if ( pos < array->mArray_Fill )
|
||||
if ( pos < (mork_pos)(array->mArray_Fill) )
|
||||
{
|
||||
mCursor_Pos = pos; // update for next time
|
||||
morkRow* row = (morkRow*) array->At(pos);
|
||||
|
Loading…
x
Reference in New Issue
Block a user