]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a (harmless) valgrind warning in the rtree extension.
authordan <dan@noemail.net>
Thu, 2 Dec 2010 11:24:58 +0000 (11:24 +0000)
committerdan <dan@noemail.net>
Thu, 2 Dec 2010 11:24:58 +0000 (11:24 +0000)
FossilOrigin-Name: a94b9a395e0be9549d8c28e2b86b995c73c7b671

ext/rtree/rtree.c
manifest
manifest.uuid

index c7e1e9c140628c6e60576a45522d13848f621b3a..5665e6aa8cb55d0d86114ff2dcb305f7879e53e7 100644 (file)
@@ -893,6 +893,7 @@ static int testRtreeCell(Rtree *pRtree, RtreeCursor *pCursor, int *pbEof){
   RtreeCell cell;
   int ii;
   int bRes = 0;
+  int rc = SQLITE_OK;
 
   nodeGetCell(pRtree, pCursor->pNode, pCursor->iCell, &cell);
   for(ii=0; bRes==0 && ii<pCursor->nConstraint; ii++){
@@ -918,12 +919,8 @@ static int testRtreeCell(Rtree *pRtree, RtreeCursor *pCursor, int *pbEof){
         break;
 
       default: {
-        int rc;
         assert( p->op==RTREE_MATCH );
         rc = testRtreeGeom(pRtree, p, &cell, &bRes);
-        if( rc!=SQLITE_OK ){
-          return rc;
-        }
         bRes = !bRes;
         break;
       }
@@ -931,7 +928,7 @@ static int testRtreeCell(Rtree *pRtree, RtreeCursor *pCursor, int *pbEof){
   }
 
   *pbEof = bRes;
-  return SQLITE_OK;
+  return rc;
 }
 
 /* 
@@ -1014,14 +1011,13 @@ static int descendToCell(
     rc = testRtreeCell(pRtree, pCursor, &isEof);
   }
   if( rc!=SQLITE_OK || isEof || iHeight==0 ){
-    *pEof = isEof;
-    return rc;
+    goto descend_to_cell_out;
   }
 
   iRowid = nodeGetRowid(pRtree, pCursor->pNode, pCursor->iCell);
   rc = nodeAcquire(pRtree, iRowid, pCursor->pNode, &pChild);
   if( rc!=SQLITE_OK ){
-    return rc;
+    goto descend_to_cell_out;
   }
 
   nodeRelease(pRtree, pCursor->pNode);
@@ -1031,7 +1027,7 @@ static int descendToCell(
     pCursor->iCell = ii;
     rc = descendToCell(pRtree, pCursor, iHeight-1, &isEof);
     if( rc!=SQLITE_OK ){
-      return rc;
+      goto descend_to_cell_out;
     }
   }
 
@@ -1043,8 +1039,9 @@ static int descendToCell(
     pCursor->iCell = iSavedCell;
   }
 
+descend_to_cell_out:
   *pEof = isEof;
-  return SQLITE_OK;
+  return rc;
 }
 
 /*
index 64c5f7fa6047f466f8d83cbc6496c59515e24e66..c04caf31ac05bf06e32fe8b41cd4c23dcdf83565 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Update\smisc7.test\sto\saccount\sfor\sEQP\schanges.
-D 2010-12-02T06:08:53
+C Fix\sa\s(harmless)\svalgrind\swarning\sin\sthe\srtree\sextension.
+D 2010-12-02T11:24:58
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 4547616ad2286053af6ccccefa242dc925e49bf0
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -80,7 +80,7 @@ F ext/icu/README.txt bf8461d8cdc6b8f514c080e4e10dc3b2bbdfefa9
 F ext/icu/icu.c 850e9a36567bbcce6bd85a4b68243cad8e3c2de2
 F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37
 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
-F ext/rtree/rtree.c e1a2d0fd4b38200bf09d417e4c9400f62c981391
+F ext/rtree/rtree.c 05b293c85403cf39bb5af0e7c010b0cafeab5e47
 F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e
 F ext/rtree/rtree1.test dbd4250ac0ad367a262eb9676f7e3080b0368206
 F ext/rtree/rtree2.test acbb3a4ce0f4fbc2c304d2b4b784cfa161856bba
@@ -893,7 +893,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 6818c6e42faf233afa6b30799c5b425aa42d0783
-R d27973dacf176c8c2e30469ec9d78ab2
+P 917af565ac0c71c14fcba56632e687ed938a856c
+R 43bbc2c83d0d7a219b1743fe660c6fcd
 U dan
-Z 428e203c830e9dddb4981febf0a28597
+Z 8d480d9e765294bce9f398dfb5ca2da5
index 57b7e900c661bfb37de89638cb7ceacc71402ba2..da1605376a160c31780833c6ad2c288e756564a0 100644 (file)
@@ -1 +1 @@
-917af565ac0c71c14fcba56632e687ed938a856c
\ No newline at end of file
+a94b9a395e0be9549d8c28e2b86b995c73c7b671
\ No newline at end of file