]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a bunch of harmless warnings. (CVS 1749)
authordanielk1977 <danielk1977@noemail.net>
Mon, 28 Jun 2004 01:11:46 +0000 (01:11 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Mon, 28 Jun 2004 01:11:46 +0000 (01:11 +0000)
FossilOrigin-Name: fae7c6e004aa4752fd3db09a42bfdb900861b3c0

manifest
manifest.uuid
src/attach.c
src/btree.c
src/build.c
src/expr.c
src/main.c
src/vdbe.c
src/vdbeaux.c

index 0a2b5fc0d7b0e957ff632345adb4bd120f058ba1..d92ec80d5b05c0d27ffbefc9db585ecd3892706e 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\sseg-fault\scaused\sby\sa\smalloc()\sfailure.\s(CVS\s1748)
-D 2004-06-28T00:17:32
+C Fix\sa\sbunch\sof\sharmless\swarnings.\s(CVS\s1749)
+D 2004-06-28T01:11:46
 F Makefile.in cb7a9889c38723f72b2506c4236ff30a05ff172b
 F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -24,21 +24,21 @@ F spec.template a38492f1c1dd349fc24cb0565e08afc53045304b
 F sqlite.1 83f4a9d37bdf2b7ef079a82d54eaf2e3509ee6ea
 F sqlite.pc.in 30552343140c53304c2a658c080fbe810cd09ca2
 F sqlite3.def 26f4e7b0a3fbaa55701e020fdec429f1594e2866
-F src/attach.c b105aeb8c82fbd097c5067dddde90d5f7fadf8dd
+F src/attach.c 73b16e608fc662e8602639e946582832b6f2902b
 F src/auth.c 60db23b98bb94c8b0178180faaf49dc116674217
-F src/btree.c d485d1b2f00d9957a58dae15ad718da0a8596267
+F src/btree.c ad428c56e42d748a0c1441fbbd93e41df407c31d
 F src/btree.h 934d0ad30b5b419e9291a11da878be349df2277e
-F src/build.c 98466ddf5e3142783d0c628992836c3c382c9233
+F src/build.c 574cdd30922ead0ababc717865aef9948c17701d
 F src/date.c b3e8b2bef1e3f2ce24e5b057203036defb18c3f1
 F src/delete.c e81545e546f6bc87d7508a93a09ca70695265af3
 F src/encode.c a876af473d1d636faa3dca51c7571f2e007eea37
-F src/expr.c db0e1fdcf967f6db6b2d4503cdbdbccde8c61e52
+F src/expr.c d8ee92a9c11113a013f7853acb55453a8e0b2e92
 F src/func.c c38c8bcaf118204baf343711b9e7f5bf804ed9c3
 F src/hash.c 440c2f8cb373ee1b4e13a0988489c7cd95d55b6f
 F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb
 F src/insert.c d99ffe87e1e1397f4233afcd06841d52d6b17b18
 F src/legacy.c ad23746f15f67e34577621b1875f639c94839e1f
-F src/main.c 37b6d15942b6d7b69b92686b32d6bae9d41a3e9b
+F src/main.c 6d27d09c9984d9b68a53b95fc2e327a19cd28851
 F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070
 F src/os.h d1780e0db95cad01f213d48da22ab490eb4fd345
 F src/os_common.h ba1b7306e16e2091718f2c48db0fe6c1d7a31bb8
@@ -73,11 +73,11 @@ F src/update.c b66b1896c9da54678ba3eff2bf0b4d291a95986a
 F src/utf.c a8fb39c94ae4ef6606d5216b6f05d9b86f6901b2
 F src/util.c 43d0289d49f43c66847ebbeddfb85a2a0d1ddd2d
 F src/vacuum.c 353c7f69dbeb6738434d81798465cc0698844640
-F src/vdbe.c 5125bfa9876def934abe4579126fabb31c33fd2a
+F src/vdbe.c 5a381d4a4cd1c5b7325a3f6756bb3d051f81c6e6
 F src/vdbe.h 75b241c02431b9c0f16eaa9cdbb34146c6287f52
 F src/vdbeInt.h d83fd7389838453d8392915c21f432014afc99cf
 F src/vdbeapi.c e92bda928f2fe93a9a77a62bd95642563bbcdea1
-F src/vdbeaux.c 1e3d0e724fdcfc1261da067454f05db778e3ba08
+F src/vdbeaux.c f9b1b3d4d2f1c31f6db1ae1536e17e4eb5454205
 F src/vdbemem.c e8ae1f56ad16d5b01119e8dc1d25e913e06c3128
 F src/where.c 6507074d8ce3f78e7a4cd33f667f11e62020553e
 F test/all.test d591e074013248176402a16a0fb6fc82d241bad5
@@ -229,7 +229,7 @@ F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075
 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
 F www/version3.tcl 563ba3ac02f64da27ab17f3edbe8e56bfd0293fb
 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
-P 9501587944f1009aa0b4fa431bb19e7ec993a077
-R 5975ce31da67586d4994606172856aed
+P e28d42cb5e274b871f54add0e046d6e153060e21
+R 66a75445f0f574c8e7b5d4ad10988339
 U danielk1977
-Z 08353d362da820f90e49ba5ec669d79e
+Z e6fa8ff2dabd246e980e0df72da05b85
index b0ffed5797fd11bfa42c04e848c67a4fb3129ee3..3e9fc8ba94bb9e24cf839fd1ecc63c4c6eaf8699 100644 (file)
@@ -1 +1 @@
-e28d42cb5e274b871f54add0e046d6e153060e21
\ No newline at end of file
+fae7c6e004aa4752fd3db09a42bfdb900861b3c0
\ No newline at end of file
index a8808d47da1f541b7033eab9f4057deca5110a68..f1f85e45d10bcaa13fc6a17512f70a31952bbfa7 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** This file contains code used to implement the ATTACH and DETACH commands.
 **
-** $Id: attach.c,v 1.18 2004/06/26 06:37:07 danielk1977 Exp $
+** $Id: attach.c,v 1.19 2004/06/28 01:11:46 danielk1977 Exp $
 */
 #include "sqliteInt.h"
 
@@ -135,7 +135,7 @@ void sqlite3Detach(Parse *pParse, Token *pDbname){
   int i;
   sqlite *db;
   Vdbe *v;
-  Db *pDb;
+  Db *pDb = 0;
 
   v = sqlite3GetVdbe(pParse);
   sqlite3VdbeAddOp(v, OP_Halt, 0, 0);
index 7b651e60f9d06ab57c92698a5d21589796f26029..64f2062bf96af57c59000a53c13caf8002723f65 100644 (file)
@@ -9,7 +9,7 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** $Id: btree.c,v 1.173 2004/06/26 08:38:25 danielk1977 Exp $
+** $Id: btree.c,v 1.174 2004/06/28 01:11:46 danielk1977 Exp $
 **
 ** This file implements a external (disk-based) database using BTrees.
 ** For a detailed discussion of BTrees, refer to
@@ -443,7 +443,7 @@ static void parseCellPtr(
   }else{
     nPayload = 0;
   }
-  n += getVarint(&pCell[n], &pInfo->nKey);
+  n += getVarint(&pCell[n], (u64 *)&pInfo->nKey);
   pInfo->nHeader = n;
   pInfo->nData = nPayload;
   if( !pPage->intKey ){
index 84f277308ced6176bccb2f9acd0c0d2296367f97..d3efc5d8a92ed8ff6e86ef0db7d5fbbc10ef6424 100644 (file)
@@ -23,7 +23,7 @@
 **     ROLLBACK
 **     PRAGMA
 **
-** $Id: build.c,v 1.234 2004/06/26 14:46:40 drh Exp $
+** $Id: build.c,v 1.235 2004/06/28 01:11:47 danielk1977 Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -231,7 +231,8 @@ void sqlite3UnlinkAndDeleteIndex(sqlite *db, Index *pIndex){
 ** Erase all schema information from the in-memory hash tables of
 ** a sigle database.  This routine is called to reclaim memory
 ** before the closes.  It is also called during a rollback
-** if there were schema changes during the transaction.
+** if there were schema changes during the transaction or if a
+** schema-cookie mismatch occurs.
 **
 ** If iDb<=0 then reset the internal schema tables for all database
 ** files.  If iDb>=2 then reset the internal schema for only the
index d85ea593ac4b4b287b34945ba42b23c5012e29e1..daae43dd8b28f9105a0e359abb4010ca73bd7c4c 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains routines used for analyzing expressions and
 ** for generating VDBE code that evaluates expressions in SQLite.
 **
-** $Id: expr.c,v 1.149 2004/06/23 12:35:15 danielk1977 Exp $
+** $Id: expr.c,v 1.150 2004/06/28 01:11:47 danielk1977 Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -26,6 +26,7 @@ char const *sqlite3AffinityString(char affinity){
     default:
       assert(0);
   }
+  return 0;
 }
 
 
index 2ef573933afa596b99e3626cb07a9d0b3f388559..ba2b5cefb7e33088879b113a7af032cdc70ea93b 100644 (file)
@@ -14,7 +14,7 @@
 ** other files are for internal use by SQLite and should not be
 ** accessed by users of the library.
 **
-** $Id: main.c,v 1.236 2004/06/26 10:02:16 danielk1977 Exp $
+** $Id: main.c,v 1.237 2004/06/28 01:11:47 danielk1977 Exp $
 */
 #include "sqliteInt.h"
 #include "os.h"
@@ -232,7 +232,7 @@ static int sqlite3InitOne(sqlite *db, int iDb, char **pzErrMsg){
   if( rc==SQLITE_OK ){
     int i;
     for(i=0; rc==SQLITE_OK && i<sizeof(meta)/sizeof(meta[0]); i++){
-      rc = sqlite3BtreeGetMeta(db->aDb[iDb].pBt, i+1, &meta[i]);
+      rc = sqlite3BtreeGetMeta(db->aDb[iDb].pBt, i+1, (u32 *)&meta[i]);
     }
     if( rc ){
       sqlite3SetString(pzErrMsg, sqlite3ErrStr(rc), (char*)0);
@@ -923,7 +923,7 @@ static int schemaIsValid(sqlite *db){
     if( pBt==0 ) continue;
     rc = sqlite3BtreeCursor(pBt, MASTER_ROOT, 0, 0, 0, &curTemp);
     if( rc==SQLITE_OK ){
-      rc = sqlite3BtreeGetMeta(pBt, 1, &cookie);
+      rc = sqlite3BtreeGetMeta(pBt, 1, (u32 *)&cookie);
       if( rc==SQLITE_OK && cookie!=db->aDb[iDb].schema_cookie ){
         allOk = 0;
       }
index 6d17f053d800d0ebb330fadde02f8338283f4507..6f2b71b33e95302922c98a917a926631b4b641ba 100644 (file)
@@ -43,7 +43,7 @@
 ** in this file for details.  If in doubt, do not deviate from existing
 ** commenting and indentation practices when changing or adding code.
 **
-** $Id: vdbe.c,v 1.391 2004/06/28 00:17:32 danielk1977 Exp $
+** $Id: vdbe.c,v 1.392 2004/06/28 01:11:47 danielk1977 Exp $
 */
 #include "sqliteInt.h"
 #include "os.h"
@@ -1819,7 +1819,7 @@ case OP_SetNumColumns: {
 */
 case OP_IdxColumn:
 case OP_Column: {
-  int payloadSize;   /* Number of bytes in the record */
+  u32 payloadSize;   /* Number of bytes in the record */
   int p1 = pOp->p1;  /* P1 value of the opcode */
   int p2 = pOp->p2;  /* column number to retrieve */
   Cursor *pC = 0;    /* The VDBE cursor */
@@ -2319,7 +2319,7 @@ case OP_ReadCookie: {
   ** meta[1] to be the schema cookie.  So we have to shift the index
   ** by one in the following statement.
   */
-  rc = sqlite3BtreeGetMeta(db->aDb[pOp->p1].pBt, 1 + pOp->p2, &iMeta);
+  rc = sqlite3BtreeGetMeta(db->aDb[pOp->p1].pBt, 1 + pOp->p2, (u32 *)&iMeta);
   pTos++;
   pTos->i = iMeta;
   pTos->flags = MEM_Int;
@@ -2368,7 +2368,7 @@ case OP_SetCookie: {
 case OP_VerifyCookie: {
   int iMeta;
   assert( pOp->p1>=0 && pOp->p1<db->nDb );
-  rc = sqlite3BtreeGetMeta(db->aDb[pOp->p1].pBt, 1, &iMeta);
+  rc = sqlite3BtreeGetMeta(db->aDb[pOp->p1].pBt, 1, (u32 *)&iMeta);
   if( rc==SQLITE_OK && iMeta!=pOp->p2 ){
     sqlite3SetString(&p->zErrMsg, "database schema has changed", (char*)0);
     rc = SQLITE_SCHEMA;
@@ -2956,7 +2956,7 @@ case OP_NewRecno: {
         if( res ){
           v = 1;
         }else{
-          sqlite3BtreeKeySize(pC->pCursor, (u64*)&v);
+          sqlite3BtreeKeySize(pC->pCursor, &v);
           v = keyToInt(v);
           if( v==0x7fffffffffffffff ){
             pC->useRandomRowid = 1;
@@ -3188,7 +3188,7 @@ case OP_RowKey:
 case OP_RowData: {
   int i = pOp->p1;
   Cursor *pC;
-  int n;
+  u32 n;
 
   pTos++;
   assert( i>=0 && i<p->nCursor );
@@ -3262,7 +3262,7 @@ case OP_Recno: {
     break;
   }else{
     assert( pC->pCursor!=0 );
-    sqlite3BtreeKeySize(pC->pCursor, (u64*)&v);
+    sqlite3BtreeKeySize(pC->pCursor, &v);
     v = keyToInt(v);
   }
   pTos->i = v;
@@ -3292,7 +3292,7 @@ case OP_FullKey: {
   assert( !p->apCsr[i]->pseudoTable );
   pTos++;
   if( (pCrsr = (pC = p->apCsr[i])->pCursor)!=0 ){
-    u64 amt;
+    i64 amt;
     char *z;
 
     sqlite3VdbeCursorMoveto(pC);
index 3ff6c1cd9bebb2abd53fc49ca3282ffb5861e7bc..8bed685871e8dcabb3ebbf05ab208cbeed33b868 100644 (file)
@@ -433,7 +433,6 @@ void sqlite3VdbePrintOp(FILE *pOut, int pc, Op *pOp){
   char *zP3;
   char zPtr[50];
   static const char *zFormat1 = "%4d %-13s %4d %4d %s\n";
-  static const char *zFormat2 = "%4d %-13s %4d %4d %-20s -- %s\n";
   if( pOut==0 ) pOut = stdout;
   zP3 = displayP3(pOp, zPtr, sizeof(zPtr));
   fprintf(pOut, zFormat1,
@@ -1654,7 +1653,7 @@ int sqlite3VdbeIdxRowidLen(int nKey, const u8 *aKey){
 ** Return SQLITE_OK if everything works, or an error code otherwise.
 */
 int sqlite3VdbeIdxRowid(BtCursor *pCur, i64 *rowid){
-  u64 nCellKey;
+  i64 nCellKey;
   int rc;
   u32 szHdr;        /* Size of the header */
   u32 typeRowid;    /* Serial type of the rowid */
@@ -1693,7 +1692,7 @@ int sqlite3VdbeIdxKeyCompare(
   int nKey, const u8 *pKey,   /* The key to compare */
   int *res                    /* Write the comparison result here */
 ){
-  u64 nCellKey;
+  i64 nCellKey;
   int rc;
   BtCursor *pCur = pC->pCursor;
   int lenRowid;