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

More compiler warning fixes.

FossilOrigin-Name: ed2dda9329ca42e9c0be1986c78b091051e7598f
This commit is contained in:
drh
2011-06-20 19:00:30 +00:00
parent 57489b354d
commit 7fd3392981
7 changed files with 31 additions and 31 deletions

View File

@ -1421,7 +1421,7 @@ static float cellArea(Rtree *pRtree, RtreeCell *p){
float area = 1.0;
int ii;
for(ii=0; ii<(pRtree->nDim*2); ii+=2){
area = area * (DCOORD(p->aCoord[ii+1]) - DCOORD(p->aCoord[ii]));
area = (float)(area * (DCOORD(p->aCoord[ii+1]) - DCOORD(p->aCoord[ii])));
}
return area;
}
@ -1434,7 +1434,7 @@ static float cellMargin(Rtree *pRtree, RtreeCell *p){
float margin = 0.0;
int ii;
for(ii=0; ii<(pRtree->nDim*2); ii+=2){
margin += (DCOORD(p->aCoord[ii+1]) - DCOORD(p->aCoord[ii]));
margin += (float)(DCOORD(p->aCoord[ii+1]) - DCOORD(p->aCoord[ii]));
}
return margin;
}
@ -1519,7 +1519,7 @@ static float cellOverlap(
o = 0.0;
break;
}else{
o = o * (x2-x1);
o = o * (float)(x2-x1);
}
}
overlap += o;
@ -1538,12 +1538,12 @@ static float cellOverlapEnlargement(
int nCell,
int iExclude
){
float before;
float after;
double before;
double after;
before = cellOverlap(pRtree, p, aCell, nCell, iExclude);
cellUnion(pRtree, p, pInsert);
after = cellOverlap(pRtree, p, aCell, nCell, iExclude);
return after-before;
return (float)(after-before);
}
#endif
@ -2488,19 +2488,19 @@ static int Reinsert(
}
aOrder[ii] = ii;
for(iDim=0; iDim<pRtree->nDim; iDim++){
aCenterCoord[iDim] += DCOORD(aCell[ii].aCoord[iDim*2]);
aCenterCoord[iDim] += DCOORD(aCell[ii].aCoord[iDim*2+1]);
aCenterCoord[iDim] += (float)DCOORD(aCell[ii].aCoord[iDim*2]);
aCenterCoord[iDim] += (float)DCOORD(aCell[ii].aCoord[iDim*2+1]);
}
}
for(iDim=0; iDim<pRtree->nDim; iDim++){
aCenterCoord[iDim] = aCenterCoord[iDim]/((float)nCell*2.0);
aCenterCoord[iDim] = (float)(aCenterCoord[iDim]/((float)nCell*2.0));
}
for(ii=0; ii<nCell; ii++){
aDistance[ii] = 0.0;
for(iDim=0; iDim<pRtree->nDim; iDim++){
float coord = DCOORD(aCell[ii].aCoord[iDim*2+1]) -
DCOORD(aCell[ii].aCoord[iDim*2]);
float coord = (float)(DCOORD(aCell[ii].aCoord[iDim*2+1]) -
DCOORD(aCell[ii].aCoord[iDim*2]));
aDistance[ii] += (coord-aCenterCoord[iDim])*(coord-aCenterCoord[iDim]);
}
}
@ -2599,10 +2599,10 @@ static int reinsertNodeContent(Rtree *pRtree, RtreeNode *pNode){
/* Find a node to store this cell in. pNode->iNode currently contains
** the height of the sub-tree headed by the cell.
*/
rc = ChooseLeaf(pRtree, &cell, pNode->iNode, &pInsert);
rc = ChooseLeaf(pRtree, &cell, (int)pNode->iNode, &pInsert);
if( rc==SQLITE_OK ){
int rc2;
rc = rtreeInsertCell(pRtree, pInsert, &cell, pNode->iNode);
rc = rtreeInsertCell(pRtree, pInsert, &cell, (int)pNode->iNode);
rc2 = nodeRelease(pRtree, pInsert);
if( rc==SQLITE_OK ){
rc = rc2;