]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
More compiler warning fixes.
authordrh <drh@noemail.net>
Mon, 20 Jun 2011 19:00:30 +0000 (19:00 +0000)
committerdrh <drh@noemail.net>
Mon, 20 Jun 2011 19:00:30 +0000 (19:00 +0000)
FossilOrigin-Name: ed2dda9329ca42e9c0be1986c78b091051e7598f

ext/fts3/fts3.c
ext/fts3/fts3Int.h
ext/fts3/fts3_write.c
ext/rtree/rtree.c
manifest
manifest.uuid
src/tclsqlite.c

index fb77bfba0168924058bffbaa60b555e18eccf130..05564f7849cdb775d57dd9c25c9c6d55ce3c51a2 100644 (file)
@@ -4354,8 +4354,8 @@ int sqlite3Fts3EvalPhraseStats(
   if( pExpr->bDeferred && pExpr->pParent->eType!=FTSQUERY_NEAR ){
     assert( pCsr->nDoc>0 );
     for(iCol=0; iCol<pTab->nColumn; iCol++){
-      aiOut[iCol*3 + 1] = pCsr->nDoc;
-      aiOut[iCol*3 + 2] = pCsr->nDoc;
+      aiOut[iCol*3 + 1] = (u32)pCsr->nDoc;
+      aiOut[iCol*3 + 2] = (u32)pCsr->nDoc;
     }
   }else{
     rc = fts3EvalGatherStats(pCsr, pExpr);
index acdaf3d5bb093450d83c0794d60ed881d3bbc3aa..1664379609164ccdc0e74dc906e4e6cad58ce63f 100644 (file)
@@ -249,7 +249,7 @@ struct Fts3Cursor {
   u8 bDesc;                       /* True to sort in descending order */
   int eEvalmode;                  /* An FTS3_EVAL_XX constant */
   int nRowAvg;                    /* Average size of database rows, in pages */
-  int nDoc;                       /* Documents in table */
+  sqlite3_int64 nDoc;             /* Documents in table */
 
   int isMatchinfoNeeded;          /* True when aMatchinfo[] needs filling in */
   u32 *aMatchinfo;                /* Information about most recent match */
index da84d6ca615ffdb7875fa3da445b3d9c27ae6773..36f2249e12b06f4e2c480c57ce1a452059d18e3a 100644 (file)
@@ -1323,7 +1323,7 @@ int sqlite3Fts3MsrOvfl(
     if( !fts3SegReaderIsPending(pReader) 
      && !fts3SegReaderIsRootOnly(pReader) 
     ){
-      int jj;
+      sqlite3_int64 jj;
       for(jj=pReader->iStartBlock; jj<=pReader->iLeafEndBlock; jj++){
         int nBlob;
         rc = sqlite3Fts3ReadBlock(p, jj, 0, &nBlob, 0);
index 915b07f166a4013de24fc6cf1af2cb4c697ccdc0..2375069e3e609090edcb6582a44353264bae9dab 100644 (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;
index 759693be1c299afa363235e2ad9ce12a0f022955..3183aad3c072502e64423e6170870392532deff3 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\scompiler\swarnings\sin\slemon\sby\sremoving\ssome\sof\sthe\scode\sadded\sby\nRyan\sGordon\sin\s[1e8b842039cc0].
-D 2011-06-20T18:27:23.761
+C More\scompiler\swarning\sfixes.
+D 2011-06-20T19:00:30.991
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in c1d7a7f4fd8da6b1815032efca950e3d5125407e
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -62,9 +62,9 @@ F ext/fts2/mkfts2amal.tcl 974d5d438cb3f7c4a652639262f82418c1e4cff0
 F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a
 F ext/fts3/README.tokenizers 998756696647400de63d5ba60e9655036cb966e9
 F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
-F ext/fts3/fts3.c e9c4b571212229ace32dc98e5e69e619efd3e2c2
+F ext/fts3/fts3.c f63086fc75c3b70025f2917d211c1b5ea0d41113
 F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
-F ext/fts3/fts3Int.h 8ece4390eb44e7179bb05c59d40f447663f5c077
+F ext/fts3/fts3Int.h fa493ccbad78a2c99ad1c984f651c0c202e68536
 F ext/fts3/fts3_aux.c 0ebfa7b86cf8ff6a0861605fcc63b83ec1b70691
 F ext/fts3/fts3_expr.c 23791de01b3a5d313d76e02befd2601d4096bc2b
 F ext/fts3/fts3_hash.c aad95afa01cf2a5ffaa448e4b0ab043880cd1efb
@@ -77,14 +77,14 @@ F ext/fts3/fts3_test.c c0aae3219df989d3e827d07846097adf8cb09945
 F ext/fts3/fts3_tokenizer.c 6089986ebcfc19d4b7aabd2b92773368efa4354f
 F ext/fts3/fts3_tokenizer.h 13ffd9fcb397fec32a05ef5cd9e0fa659bf3dbd3
 F ext/fts3/fts3_tokenizer1.c 0dde8f307b8045565cf63797ba9acfaff1c50c68
-F ext/fts3/fts3_write.c 5774a7ee9632355ebf1ec4b7a5071fc9ab9eb956
+F ext/fts3/fts3_write.c 194829c8fd024a448fc899e5ff02a8ed06595529
 F ext/fts3/fts3speed.tcl b54caf6a18d38174f1a6e84219950d85e98bb1e9
 F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100
 F ext/icu/README.txt bf8461d8cdc6b8f514c080e4e10dc3b2bbdfefa9
 F ext/icu/icu.c eb9ae1d79046bd7871aa97ee6da51eb770134b5a
 F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37
 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
-F ext/rtree/rtree.c 19ed115ba75b8e0815f572cfaa7f864b89523a90
+F ext/rtree/rtree.c b431c54d1ed05f04f2987e8a4fbb931acb40c312
 F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e
 F ext/rtree/rtree1.test 28e1b8da4da98093ce3210187434dd760a8d89d8
 F ext/rtree/rtree2.test acbb3a4ce0f4fbc2c304d2b4b784cfa161856bba
@@ -187,7 +187,7 @@ F src/sqliteInt.h 7b7ec2394b94fc4516930cd9dae37af0f9312215
 F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d
 F src/status.c 7ac64842c86cec2fc1a1d0e5c16d3beb8ad332bf
 F src/table.c 2cd62736f845d82200acfa1287e33feb3c15d62e
-F src/tclsqlite.c c124d55e3e7d156c0fcc62c7f9906de8451547dc
+F src/tclsqlite.c 5db825be61708b1a2b3f8f6e185e9b753829acef
 F src/test1.c efca486a25fb894988e7a82e84579a4e57388a02
 F src/test2.c 80d323d11e909cf0eb1b6fbb4ac22276483bcf31
 F src/test3.c 124ff9735fb6bb7d41de180d6bac90e7b1509432
@@ -946,7 +946,7 @@ F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
 F tool/symbols.sh bc2a3709940d47c8ac8e0a1fdf17ec801f015a00
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
 F tool/warnings.sh 347d974d143cf132f953b565fbc03026f19fcb4d
-P f69ed286ffb3f62f5cb5c1f7df55fa4d2468b472
-R 85fd773d96f76df373ae8654723885fd
+P 76b18b2be072b9ea242df4c9535059f7b43f564b
+R 78c1df97ed01817ae07c84e5770b39c1
 U drh
-Z 8273f766e9b20e2bd5443eed5877e83e
+Z 0807b7361b2e2ddd7ca414b20f006eb7
index ab322380b7577e3d64d4849a3779742ccb007994..398fbf956a850d6476dbcef3f42ceccea86fa8f8 100644 (file)
@@ -1 +1 @@
-76b18b2be072b9ea242df4c9535059f7b43f564b
\ No newline at end of file
+ed2dda9329ca42e9c0be1986c78b091051e7598f
\ No newline at end of file
index 0e712f7d3fddd27743e47c5cfcc53ae1b98e42e4..ad4d27a1263cf69b0ff5d6e050cd2bd0400e070d 100644 (file)
@@ -761,7 +761,7 @@ static void tclSqlFunc(sqlite3_context *context, int argc, sqlite3_value**argv){
         case SQLITE_INTEGER: {
           sqlite_int64 v = sqlite3_value_int64(pIn);
           if( v>=-2147483647 && v<=2147483647 ){
-            pVal = Tcl_NewIntObj(v);
+            pVal = Tcl_NewIntObj((int)v);
           }else{
             pVal = Tcl_NewWideIntObj(v);
           }
@@ -1441,7 +1441,7 @@ static Tcl_Obj *dbEvalColumnValue(DbEvalContext *p, int iCol){
     case SQLITE_INTEGER: {
       sqlite_int64 v = sqlite3_column_int64(pStmt, iCol);
       if( v>=-2147483647 && v<=2147483647 ){
-        return Tcl_NewIntObj(v);
+        return Tcl_NewIntObj((int)v);
       }else{
         return Tcl_NewWideIntObj(v);
       }
@@ -2367,7 +2367,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
       }
       if( zNull && len>0 ){
         pDb->zNull = Tcl_Alloc( len + 1 );
-        strncpy(pDb->zNull, zNull, len);
+        memcpy(pDb->zNull, zNull, len);
         pDb->zNull[len] = '\0';
       }else{
         pDb->zNull = 0;