Fix compiler warnings on GCC and MSVC and fix a C89-ism that
broke the build for MSVC. FossilOrigin-Name: b451c0f97f0abe78ebe6c62ff489ec1ad8a1f767
This commit is contained in:
parent
06801f6ff0
commit
4e245a4c35
@ -3139,7 +3139,7 @@ static int fts3SyncMethod(sqlite3_vtab *pVtab){
|
||||
** as it would also be required by a crisis-merge that used the same input
|
||||
** segments.
|
||||
*/
|
||||
const int nMinMerge = 64; /* Minimum amount of incr-merge work to do */
|
||||
const u32 nMinMerge = 64; /* Minimum amount of incr-merge work to do */
|
||||
|
||||
Fts3Table *p = (Fts3Table*)pVtab;
|
||||
int rc = sqlite3Fts3PendingTermsFlush(p);
|
||||
@ -3152,7 +3152,7 @@ static int fts3SyncMethod(sqlite3_vtab *pVtab){
|
||||
assert( rc==SQLITE_OK || mxLevel==0 );
|
||||
A = p->nLeafAdd * mxLevel;
|
||||
A += (A/2);
|
||||
if( A>nMinMerge ) rc = sqlite3Fts3Incrmerge(p, A, 8);
|
||||
if( A>(int)nMinMerge ) rc = sqlite3Fts3Incrmerge(p, A, 8);
|
||||
}
|
||||
sqlite3Fts3SegmentsClose(p);
|
||||
return rc;
|
||||
|
@ -3986,7 +3986,7 @@ static int fts3IncrmergeLoad(
|
||||
int nHeight = (int)aRoot[0];
|
||||
NodeWriter *pNode;
|
||||
|
||||
pWriter->nLeafEst = ((iEnd - iStart) + 1) / FTS_MAX_APPENDABLE_HEIGHT;
|
||||
pWriter->nLeafEst = (int)((iEnd - iStart) + 1)/FTS_MAX_APPENDABLE_HEIGHT;
|
||||
pWriter->iStart = iStart;
|
||||
pWriter->iEnd = iEnd;
|
||||
pWriter->iAbsLevel = iAbsLevel;
|
||||
@ -4005,8 +4005,8 @@ static int fts3IncrmergeLoad(
|
||||
}
|
||||
|
||||
for(i=nHeight; i>=0 && rc==SQLITE_OK; i--){
|
||||
pNode = &pWriter->aNodeWriter[i];
|
||||
NodeReader reader;
|
||||
pNode = &pWriter->aNodeWriter[i];
|
||||
|
||||
rc = nodeReaderInit(&reader, pNode->block.a, pNode->block.n);
|
||||
while( reader.aNode && rc==SQLITE_OK ) rc = nodeReaderNext(&reader);
|
||||
@ -4102,7 +4102,7 @@ static int fts3IncrmergeWriter(
|
||||
){
|
||||
int rc; /* Return Code */
|
||||
int i; /* Iterator variable */
|
||||
int nLeafEst; /* Blocks allocated for leaf nodes */
|
||||
int nLeafEst = 0; /* Blocks allocated for leaf nodes */
|
||||
sqlite3_stmt *pLeafEst = 0; /* SQL used to determine nLeafEst */
|
||||
sqlite3_stmt *pFirstBlock = 0; /* SQL used to determine first block */
|
||||
|
||||
@ -4855,7 +4855,8 @@ static u64 fts3ChecksumIndex(
|
||||
}else{
|
||||
iPos += (iVal - 2);
|
||||
cksum = cksum ^ fts3ChecksumEntry(
|
||||
csr.zTerm, csr.nTerm, iLangid, iIndex, iDocid, iCol, iPos
|
||||
csr.zTerm, csr.nTerm, iLangid, iIndex, iDocid,
|
||||
(int)iCol, (int)iPos
|
||||
);
|
||||
}
|
||||
}
|
||||
|
18
manifest
18
manifest
@ -1,5 +1,5 @@
|
||||
C Merge\sfts4-incr-merge\swith\strunk.
|
||||
D 2012-03-29T15:11:32.438
|
||||
C Fix\scompiler\swarnings\son\sGCC\sand\sMSVC\sand\sfix\sa\sC89-ism\sthat\nbroke\sthe\sbuild\sfor\sMSVC.
|
||||
D 2012-03-30T00:00:36.020
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 2f37e468503dbe79d35c9f6dffcf3fae1ae9ec20
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -63,7 +63,7 @@ F ext/fts3/README.content fdc666a70d5257a64fee209f97cf89e0e6e32b51
|
||||
F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a
|
||||
F ext/fts3/README.tokenizers 998756696647400de63d5ba60e9655036cb966e9
|
||||
F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
|
||||
F ext/fts3/fts3.c f41f52a24f1a9d7f94291a0e17027e0c28e4f54b
|
||||
F ext/fts3/fts3.c 111626ce72b0df93f509ebd14ce31804fed24be0
|
||||
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
|
||||
F ext/fts3/fts3Int.h 5fd2ec4e47faf17bf4a508d6b8ec5fc0f2c80bff
|
||||
F ext/fts3/fts3_aux.c 5205182bd8f372782597888156404766edf5781e
|
||||
@ -78,7 +78,7 @@ F ext/fts3/fts3_test.c 6b7cc68aef4efb084e1449f7d20c4b20d3bdf6b4
|
||||
F ext/fts3/fts3_tokenizer.c 3da7254a9881f7e270ab28e2004e0d22b3212bce
|
||||
F ext/fts3/fts3_tokenizer.h 66dec98e365854b6cd2d54f1a96bb6d428fc5a68
|
||||
F ext/fts3/fts3_tokenizer1.c 5c98225a53705e5ee34824087478cf477bdb7004
|
||||
F ext/fts3/fts3_write.c ceb65d6a85f44c7dd1d96f12d04e20f75884bfe3
|
||||
F ext/fts3/fts3_write.c 545c3e2add64c27b2b03f9c79619ac5e47043252
|
||||
F ext/fts3/fts3speed.tcl b54caf6a18d38174f1a6e84219950d85e98bb1e9
|
||||
F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100
|
||||
F ext/fts3/tool/fts3view.c 6cfc5b67a5f0e09c0d698f9fd012c784bfaa9197
|
||||
@ -135,7 +135,7 @@ F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac
|
||||
F src/ctime.c a9c26822515f81ec21588cbb482ca6724be02e33
|
||||
F src/date.c 067a81c9942c497aafd2c260e13add8a7d0c7dd4
|
||||
F src/delete.c 4c20ea4f6213b3bc1c6a510586864b679946e05e
|
||||
F src/expr.c 1c351f385950a40b0283328eb925641a3aa50a84
|
||||
F src/expr.c 7e40ea9f6899e31134be3c1b88b8347cf9ec40d7
|
||||
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
|
||||
F src/fkey.c 657212460bf5cfd3ae607d12ea62092844c227b5
|
||||
F src/func.c c6b3c94320253a35bda43fb69cc292618e3285d6
|
||||
@ -999,7 +999,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
|
||||
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
|
||||
P 0bacb879e18026f2a8e22fe3e4bc8d27de5c4416 66c4aaadda433c9d479a25c27cdff84560088402
|
||||
R 44c1548cf550b784321f894b0b9c8ec7
|
||||
U dan
|
||||
Z 991a128a11b720bb56ac07d77a5267e5
|
||||
P 4d6de3e9bef3487f2d89167939ab2c42872d05b3
|
||||
R 6a2a98746d07ae9d5d747d484bebf83b
|
||||
U drh
|
||||
Z 63420a987b6627df7e88c714721af80a
|
||||
|
@ -1 +1 @@
|
||||
4d6de3e9bef3487f2d89167939ab2c42872d05b3
|
||||
b451c0f97f0abe78ebe6c62ff489ec1ad8a1f767
|
@ -2599,11 +2599,11 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
|
||||
** loading.
|
||||
*/
|
||||
if( (pDef->flags & (SQLITE_FUNC_LENGTH|SQLITE_FUNC_TYPEOF))!=0 ){
|
||||
u8 op;
|
||||
u8 exprOp;
|
||||
assert( nFarg==1 );
|
||||
assert( pFarg->a[0].pExpr!=0 );
|
||||
op = pFarg->a[0].pExpr->op;
|
||||
if( op==TK_COLUMN || op==TK_AGG_COLUMN ){
|
||||
exprOp = pFarg->a[0].pExpr->op;
|
||||
if( exprOp==TK_COLUMN || exprOp==TK_AGG_COLUMN ){
|
||||
assert( SQLITE_FUNC_LENGTH==OPFLAG_LENGTHARG );
|
||||
assert( SQLITE_FUNC_TYPEOF==OPFLAG_TYPEOFARG );
|
||||
testcase( pDef->flags==SQLITE_FUNC_LENGTH );
|
||||
|
Loading…
x
Reference in New Issue
Block a user