1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix a few minor and harmless clang warnings in FTS3 and RTREE.

FossilOrigin-Name: b3324f6cc27c3bfb32b12eacace2fc731c2dd644
This commit is contained in:
drh
2011-10-14 22:57:03 +00:00
parent b07028f71c
commit 086e4913b5
5 changed files with 27 additions and 17 deletions

View File

@ -1268,7 +1268,8 @@ static int rtreeFilter(
rc = SQLITE_NOMEM;
}else{
memset(pCsr->aConstraint, 0, sizeof(RtreeConstraint)*argc);
assert( (idxStr==0 && argc==0) || (int)strlen(idxStr)==argc*2 );
assert( (idxStr==0 && argc==0)
|| (idxStr && (int)strlen(idxStr)==argc*2) );
for(ii=0; ii<argc; ii++){
RtreeConstraint *p = &pCsr->aConstraint[ii];
p->op = idxStr[ii*2];
@ -1569,7 +1570,9 @@ static int ChooseLeaf(
float fMinGrowth = 0.0;
float fMinArea = 0.0;
#if VARIANT_RSTARTREE_CHOOSESUBTREE
float fMinOverlap = 0.0;
#endif
int nCell = NCELL(pNode);
RtreeCell cell;
@ -1616,6 +1619,7 @@ static int ChooseLeaf(
|| (overlap==fMinOverlap && growth==fMinGrowth && area<fMinArea)
){
bBest = 1;
fMinOverlap = overlap;
}
#else
if( iCell==0||growth<fMinGrowth||(growth==fMinGrowth && area<fMinArea) ){
@ -1623,7 +1627,6 @@ static int ChooseLeaf(
}
#endif
if( bBest ){
fMinOverlap = overlap;
fMinGrowth = growth;
fMinArea = area;
iBest = cell.iRowid;