Fix more harmless compiler warnings in lsm1, seen with MSVC 2015.
FossilOrigin-Name: 0f1307f1f5638c1c4f1ce2b89cdef7ce8b76dc2a38685cd1ca152cde9e8727da
This commit is contained in:
parent
1be5051923
commit
36c68234d6
@ -1017,9 +1017,9 @@ int lsmCheckpointDeserialize(
|
||||
pDb->pEnv, sizeof(FreelistEntry)*nFree, &rc
|
||||
);
|
||||
if( rc==LSM_OK ){
|
||||
int i;
|
||||
for(i=0; i<nFree; i++){
|
||||
FreelistEntry *p = &pNew->freelist.aEntry[i];
|
||||
int j;
|
||||
for(j=0; j<nFree; j++){
|
||||
FreelistEntry *p = &pNew->freelist.aEntry[j];
|
||||
p->iBlk = aCkpt[iIn++];
|
||||
p->iId = ((i64)(aCkpt[iIn])<<32) + aCkpt[iIn+1];
|
||||
iIn += 2;
|
||||
|
@ -2116,10 +2116,10 @@ int lsmFsSortedAppend(
|
||||
if( iPrev==0 ){
|
||||
iApp = findAppendPoint(pFS, pLvl);
|
||||
}else if( fsIsLast(pFS, iPrev) ){
|
||||
int iNext;
|
||||
rc = fsBlockNext(pFS, 0, fsPageToBlock(pFS, iPrev), &iNext);
|
||||
int iNext2;
|
||||
rc = fsBlockNext(pFS, 0, fsPageToBlock(pFS, iPrev), &iNext2);
|
||||
if( rc!=LSM_OK ) return rc;
|
||||
iApp = fsFirstPageOnBlock(pFS, iNext);
|
||||
iApp = fsFirstPageOnBlock(pFS, iNext2);
|
||||
}else{
|
||||
iApp = iPrev + 1;
|
||||
}
|
||||
@ -3257,10 +3257,10 @@ int lsmFsIntegrityCheck(lsm_db *pDb){
|
||||
}
|
||||
|
||||
for(pLevel=pWorker->pLevel; pLevel; pLevel=pLevel->pNext){
|
||||
int i;
|
||||
int j;
|
||||
checkBlocks(pFS, &pLevel->lhs, (pLevel->nRight!=0), nBlock, aUsed);
|
||||
for(i=0; i<pLevel->nRight; i++){
|
||||
checkBlocks(pFS, &pLevel->aRhs[i], 0, nBlock, aUsed);
|
||||
for(j=0; j<pLevel->nRight; j++){
|
||||
checkBlocks(pFS, &pLevel->aRhs[j], 0, nBlock, aUsed);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -890,22 +890,22 @@ static int btreeCursorRestore(
|
||||
}
|
||||
|
||||
do {
|
||||
Page *pPg;
|
||||
rc = lsmFsDbPageGet(pCsr->pFS, pSeg, iLoad, &pPg);
|
||||
assert( rc==LSM_OK || pPg==0 );
|
||||
Page *pPg2;
|
||||
rc = lsmFsDbPageGet(pCsr->pFS, pSeg, iLoad, &pPg2);
|
||||
assert( rc==LSM_OK || pPg2==0 );
|
||||
if( rc==LSM_OK ){
|
||||
u8 *aData; /* Buffer containing page data */
|
||||
int nData; /* Size of aData[] in bytes */
|
||||
int iMin;
|
||||
int iMax;
|
||||
int iCell;
|
||||
int iCell2;
|
||||
|
||||
aData = fsPageData(pPg, &nData);
|
||||
aData = fsPageData(pPg2, &nData);
|
||||
assert( (pageGetFlags(aData, nData) & SEGMENT_BTREE_FLAG) );
|
||||
|
||||
iLoad = (int)pageGetPtr(aData, nData);
|
||||
iCell = pageGetNRec(aData, nData);
|
||||
iMax = iCell-1;
|
||||
iCell2 = pageGetNRec(aData, nData);
|
||||
iMax = iCell2-1;
|
||||
iMin = 0;
|
||||
|
||||
while( iMax>=iMin ){
|
||||
@ -916,7 +916,7 @@ static int btreeCursorRestore(
|
||||
int res; /* (pSeek - pKeyT) */
|
||||
|
||||
rc = pageGetBtreeKey(
|
||||
pSeg, pPg, iTry, &iPtr, &iTopic, &pKey, &nKey, &blob
|
||||
pSeg, pPg2, iTry, &iPtr, &iTopic, &pKey, &nKey, &blob
|
||||
);
|
||||
if( rc!=LSM_OK ) break;
|
||||
|
||||
@ -927,15 +927,15 @@ static int btreeCursorRestore(
|
||||
|
||||
if( res<0 ){
|
||||
iLoad = (int)iPtr;
|
||||
iCell = iTry;
|
||||
iCell2 = iTry;
|
||||
iMax = iTry-1;
|
||||
}else{
|
||||
iMin = iTry+1;
|
||||
}
|
||||
}
|
||||
|
||||
pCsr->aPg[iPg].pPage = pPg;
|
||||
pCsr->aPg[iPg].iCell = iCell;
|
||||
pCsr->aPg[iPg].pPage = pPg2;
|
||||
pCsr->aPg[iPg].iCell = iCell2;
|
||||
iPg++;
|
||||
assert( iPg!=nDepth-1
|
||||
|| lsmFsRedirectPage(pCsr->pFS, pSeg->pRedirect, iLoad)==iLeaf
|
||||
@ -2007,37 +2007,37 @@ static void multiCursorGetKey(
|
||||
if( pCsr->iFree < (nEntry*2) ){
|
||||
FreelistEntry *aEntry = pWorker->freelist.aEntry;
|
||||
int i = nEntry - 1 - (pCsr->iFree / 2);
|
||||
u32 iKey = 0;
|
||||
u32 iKey2 = 0;
|
||||
|
||||
if( (pCsr->iFree % 2) ){
|
||||
eType = LSM_END_DELETE|LSM_SYSTEMKEY;
|
||||
iKey = aEntry[i].iBlk-1;
|
||||
iKey2 = aEntry[i].iBlk-1;
|
||||
}else if( aEntry[i].iId>=0 ){
|
||||
eType = LSM_INSERT|LSM_SYSTEMKEY;
|
||||
iKey = aEntry[i].iBlk;
|
||||
iKey2 = aEntry[i].iBlk;
|
||||
|
||||
/* If the in-memory entry immediately before this one was a
|
||||
** DELETE, and the block number is one greater than the current
|
||||
** block number, mark this entry as an "end-delete-range". */
|
||||
if( i<(nEntry-1) && aEntry[i+1].iBlk==iKey+1 && aEntry[i+1].iId<0 ){
|
||||
if( i<(nEntry-1) && aEntry[i+1].iBlk==iKey2+1 && aEntry[i+1].iId<0 ){
|
||||
eType |= LSM_END_DELETE;
|
||||
}
|
||||
|
||||
}else{
|
||||
eType = LSM_START_DELETE|LSM_SYSTEMKEY;
|
||||
iKey = aEntry[i].iBlk + 1;
|
||||
iKey2 = aEntry[i].iBlk + 1;
|
||||
}
|
||||
|
||||
/* If the in-memory entry immediately after this one is a
|
||||
** DELETE, and the block number is one less than the current
|
||||
** key, mark this entry as an "start-delete-range". */
|
||||
if( i>0 && aEntry[i-1].iBlk==iKey-1 && aEntry[i-1].iId<0 ){
|
||||
if( i>0 && aEntry[i-1].iBlk==iKey2-1 && aEntry[i-1].iId<0 ){
|
||||
eType |= LSM_START_DELETE;
|
||||
}
|
||||
|
||||
pKey = pCsr->pSystemVal;
|
||||
nKey = 4;
|
||||
lsmPutU32(pKey, ~iKey);
|
||||
lsmPutU32(pKey, ~iKey2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -5699,20 +5699,20 @@ static int infoPageDump(
|
||||
LsmString str;
|
||||
int nRec;
|
||||
int iPtr;
|
||||
int flags;
|
||||
int flags2;
|
||||
int iCell;
|
||||
u8 *aData; int nData; /* Page data and size thereof */
|
||||
|
||||
aData = fsPageData(pPg, &nData);
|
||||
nRec = pageGetNRec(aData, nData);
|
||||
iPtr = (int)pageGetPtr(aData, nData);
|
||||
flags = pageGetFlags(aData, nData);
|
||||
flags2 = pageGetFlags(aData, nData);
|
||||
|
||||
lsmStringInit(&str, pDb->pEnv);
|
||||
lsmStringAppendf(&str, "Page : %lld (%d bytes)\n", iPg, nData);
|
||||
lsmStringAppendf(&str, "nRec : %d\n", nRec);
|
||||
lsmStringAppendf(&str, "iPtr : %d\n", iPtr);
|
||||
lsmStringAppendf(&str, "flags: %04x\n", flags);
|
||||
lsmStringAppendf(&str, "flags: %04x\n", flags2);
|
||||
lsmStringAppendf(&str, "\n");
|
||||
|
||||
for(iCell=0; iCell<nRec; iCell++){
|
||||
@ -5735,7 +5735,7 @@ static int infoPageDump(
|
||||
infoCellDump(pDb, pSeg, bIndirect, pPg, iCell, &eType, &iPgPtr,
|
||||
&aKey, &nKey, &aVal, &nVal, &blob
|
||||
);
|
||||
iAbsPtr = iPgPtr + ((flags & SEGMENT_BTREE_FLAG) ? 0 : iPtr);
|
||||
iAbsPtr = iPgPtr + ((flags2 & SEGMENT_BTREE_FLAG) ? 0 : iPtr);
|
||||
|
||||
lsmFlagsToString(eType, zFlags);
|
||||
lsmStringAppendf(&str, "%s %d (%s) ",
|
||||
|
16
manifest
16
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\sharmless\scompiler\swarnings\sseen\swith\sMSVC\sfor\slsm1.
|
||||
D 2017-07-11T16:36:10.699
|
||||
C Fix\smore\sharmless\scompiler\swarnings\sin\slsm1,\sseen\swith\sMSVC\s2015.
|
||||
D 2017-07-11T16:46:41.623
|
||||
F Makefile.in 081e48dfe7f995d57ce1a88ddf4d2917b4349158648a6cd45b42beae30de3a12
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 20850e3e8d4d4791e0531955852d768eb06f24138214870d543abb1a47346fba
|
||||
@ -237,14 +237,14 @@ F ext/lsm1/lsm-test/lsmtest_util.c 241622db5a332a09c8e6e7606b617d288a37b557f7d3b
|
||||
F ext/lsm1/lsm-test/lsmtest_win32.c 5605aac3bf3852dcc2509fb1d097f5f11556418c1cc9cf0fdd09f9af53c97fb4
|
||||
F ext/lsm1/lsm.h 0f6f64ff071471cb87bf98beb8386566f30ea001
|
||||
F ext/lsm1/lsmInt.h 68945f00c4fc97a5c82bd285a15d0baacd0019cf2e0b7d535759f000459462e1
|
||||
F ext/lsm1/lsm_ckpt.c 3f88c5b4f37f033636c13c71c89d02f8104a4a97284b525516718041dfb4e672
|
||||
F ext/lsm1/lsm_file.c 04049405abcd7cb9bec1c21c3a690a64e97d80362d37649733d3871aaab956d9
|
||||
F ext/lsm1/lsm_ckpt.c ac6fb4581983291c2e0be6fbb68f12b26f0c08d606835c05417be1323d0fdd03
|
||||
F ext/lsm1/lsm_file.c d4aee18aeb97d2e91ce30a4b46fa4c7006bca1d5e9f9bb2b7897e30ba8bdf002
|
||||
F ext/lsm1/lsm_log.c a8bf334532109bba05b09a504ee45fc393828b0d034ca61ab45e3940709d9a7c
|
||||
F ext/lsm1/lsm_main.c 15e73ccdafdd44ddeefc29e332079d88ba8f00c12c797b3c2b63d3171b5afce8
|
||||
F ext/lsm1/lsm_mem.c 4c51ea9fa285ee6e35301b33491642d071740a0a
|
||||
F ext/lsm1/lsm_mutex.c 378edf0a2b142b4f7640ee982df06d50b98788ea
|
||||
F ext/lsm1/lsm_shared.c 6b903d1afce9e254b642be7898359b4760afde6fb5740623bae4affff5726ab8
|
||||
F ext/lsm1/lsm_sorted.c ad426f7ed930ff4bd0405fbf77e06b48cdaabd11673cc39870b4cf7e5d92109e
|
||||
F ext/lsm1/lsm_sorted.c 1bdd5668c27e36253d164b180ee3e0c5cf75964786d4777f25ef45c0d37e53a8
|
||||
F ext/lsm1/lsm_str.c 65e361b488c87b10bf3e5c0070b14ffc602cf84f094880bece77bbf6678bca82
|
||||
F ext/lsm1/lsm_tree.c 682679d7ef2b8b6f2fe77aeb532c8d29695bca671c220b0abac77069de5fb9fb
|
||||
F ext/lsm1/lsm_unix.c 57361bcf5b1a1a028f5d66571ee490e9064d2cfb145a2cc9e5ddade467bb551b
|
||||
@ -1631,7 +1631,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 95cd1d9f8baa6be305c9a8bfa26fef2a403f2d5b3b5c9c55382ec04f0bc98d40
|
||||
R e5707d39e2420bcc7332884f2942bda4
|
||||
P cf6da4a52f7f9047e653ef2972e4c0910b29d7182d789a9e30225dc1849e8779
|
||||
R e3b76a73346e93609e0049aa729badac
|
||||
U mistachkin
|
||||
Z 7cd7cb2156c8cf8d5e8c4a5374c20532
|
||||
Z 43b08d17226cf77572e88a78b7952b8a
|
||||
|
@ -1 +1 @@
|
||||
cf6da4a52f7f9047e653ef2972e4c0910b29d7182d789a9e30225dc1849e8779
|
||||
0f1307f1f5638c1c4f1ce2b89cdef7ce8b76dc2a38685cd1ca152cde9e8727da
|
Loading…
Reference in New Issue
Block a user