diff --git a/manifest b/manifest index 2cc31c2b11..14fa527626 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\shandling\sof\sa\sfailed\smalloc()\sin\svarious\splaces\s(CVS\s1605) -D 2004-06-16T10:39:52 +C Trivial\smodifications\sto\sprevent\scompiler\swarnings.\s(CVS\s1606) +D 2004-06-16T12:00:29 F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd @@ -26,19 +26,19 @@ F sqlite.def fc4f5734786fe4743cfe2aa98eb2da4b089edb5f F sqlite.pc.in 30552343140c53304c2a658c080fbe810cd09ca2 F src/attach.c 93b8ecec4a8d7b4e9f2479e2327d90c9d01765e8 F src/auth.c 204e1e9c45e64315589bc8b62cba5d9de29b6a3c -F src/btree.c 2852932e900b1b82e105fd651807f199a1d86f12 +F src/btree.c 0cf8a52a57a7eb13d50719114ee1fa353e89d7d3 F src/btree.h 32f96abef464cf8765b23ca669acfe90d191fcc5 F src/build.c 19fc5d0336a3fef973d62b3a1728078a319e4045 F src/date.c 65b483caeb0e4dd663667d2f927caa058168ebff -F src/delete.c 911221aadb35d610c84fadb32e71c52990827e58 +F src/delete.c 1e94ef693e45b441f5c828ea0a064ac339008f8e F src/encode.c a876af473d1d636faa3dca51c7571f2e007eea37 -F src/expr.c 7c19fbc4495f8978439c20528cf3e070df068427 +F src/expr.c 657ca11f63a06aefd78014e6bc51dab6c735cc63 F src/func.c be055fc63f1ae59c6a5dc4901240669f2a21f40c F src/hash.c 440c2f8cb373ee1b4e13a0988489c7cd95d55b6f F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb -F src/insert.c 68c7f3ddd6a7f1e5596d6996da1a2861b3789a3a +F src/insert.c 15575e57917ea2e5702a2b5935583c84139699c3 F src/legacy.c ad23746f15f67e34577621b1875f639c94839e1f -F src/main.c adac42394fb42aa47e3fdc5d9354d21f4bdaf29a +F src/main.c 63c30e17cae13cbe9ccc037507cd03a27fc3d67b F src/md5.c d77a389955759c8329bb357e3d71bac3d6eb710b F src/os.h 1cb5f0293a30288451fe3c0c73815cf208212ed1 F src/os_common.h ba1b7306e16e2091718f2c48db0fe6c1d7a31bb8 @@ -48,7 +48,7 @@ F src/os_unix.c 8832c78dd95c115b1690054354d90321a791950d F src/os_unix.h 1cd6133cf66dea704b8646b70b2dfdcbdd9b3738 F src/os_win.c 337e973ee77797aaab4787e3477a5945fcd97266 F src/os_win.h 004eec47b1780fcaf07420ddc2072294b698d48c -F src/pager.c 72b5ab4fcc60d07d4a078434247bba1e3617d90d +F src/pager.c 453099416c10669365ca70f12f13e67e6ef11000 F src/pager.h bc58d32a9dee464f7268fb68652c130a4216e438 F src/parse.y 097438674976355a10cf177bd97326c548820b86 F src/pragma.c be8ed53611971f8c93f66cd31129af89e6d58997 @@ -224,7 +224,7 @@ F www/support.tcl 1801397edd271cc39a2aadd54e701184b5181248 F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4 -P 7d8edce4c12d075acbc6bac6758aabb2769f983a -R be28934235640c9ed3003a5c5e30f6a4 +P b739ef2a1b8f7cfee4ab3f4c1319c159bd1e2e40 +R 34de51c2b09ded7c20407703316e67d9 U danielk1977 -Z 36276b8c3fee19808c53a65120310e72 +Z 65f56c8d01087ad1b77a565b9ecae0bf diff --git a/manifest.uuid b/manifest.uuid index 9ec986f6d9..09c714014f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -b739ef2a1b8f7cfee4ab3f4c1319c159bd1e2e40 \ No newline at end of file +6001c5e1ced08096bb404e72ff533b7edcc896ec \ No newline at end of file diff --git a/src/btree.c b/src/btree.c index b0f43f5555..dca50cd069 100644 --- a/src/btree.c +++ b/src/btree.c @@ -9,7 +9,7 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btree.c,v 1.170 2004/06/15 11:40:04 danielk1977 Exp $ +** $Id: btree.c,v 1.171 2004/06/16 12:00:29 danielk1977 Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** For a detailed discussion of BTrees, refer to @@ -1346,7 +1346,7 @@ void sqlite3BtreeCursorList(Btree *pBt){ ** are no active cursors, it also releases the read lock. */ int sqlite3BtreeRollback(Btree *pBt){ - int rc; + int rc = SQLITE_OK; MemPage *pPage1; if( pBt->inTrans==TRANS_WRITE ){ rc = sqlite3pager_rollback(pBt->pPager); @@ -1732,30 +1732,31 @@ static int getPayload( }else{ offset -= pCur->info.nLocal; } + ovflSize = pBt->usableSize - 4; if( amt>0 ){ nextPage = get4byte(&aPayload[pCur->info.nLocal]); - } - ovflSize = pBt->usableSize - 4; - while( amt>0 && nextPage ){ - rc = sqlite3pager_get(pBt->pPager, nextPage, (void**)&aPayload); - if( rc!=0 ){ - return rc; - } - nextPage = get4byte(aPayload); - if( offset ovflSize ){ - a = ovflSize - offset; + while( amt>0 && nextPage ){ + rc = sqlite3pager_get(pBt->pPager, nextPage, (void**)&aPayload); + if( rc!=0 ){ + return rc; } - memcpy(pBuf, &aPayload[offset+4], a); - offset = 0; - amt -= a; - pBuf += a; - }else{ - offset -= ovflSize; + nextPage = get4byte(aPayload); + if( offset ovflSize ){ + a = ovflSize - offset; + } + memcpy(pBuf, &aPayload[offset+4], a); + offset = 0; + amt -= a; + pBuf += a; + }else{ + offset -= ovflSize; + } + sqlite3pager_unref(aPayload); } - sqlite3pager_unref(aPayload); } + if( amt>0 ){ return SQLITE_CORRUPT; } @@ -2836,7 +2837,7 @@ static int balance(MemPage*); static int balance_nonroot(MemPage *pPage){ MemPage *pParent; /* The parent of pPage */ Btree *pBt; /* The whole database */ - int nCell; /* Number of cells in aCell[] */ + int nCell = 0; /* Number of cells in aCell[] */ int nOld; /* Number of pages in apOld[] */ int nNew; /* Number of pages in apNew[] */ int nDiv; /* Number of cells in apDiv[] */ @@ -3494,7 +3495,7 @@ int sqlite3BtreeDelete(BtCursor *pCur){ MemPage *pPage = pCur->pPage; unsigned char *pCell; int rc; - Pgno pgnoChild; + Pgno pgnoChild = 0; Btree *pBt = pCur->pBt; assert( pPage->isInit ); diff --git a/src/delete.c b/src/delete.c index b9cc3f05c7..5f326908bc 100644 --- a/src/delete.c +++ b/src/delete.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle DELETE FROM statements. ** -** $Id: delete.c,v 1.73 2004/06/10 10:50:15 danielk1977 Exp $ +** $Id: delete.c,v 1.74 2004/06/16 12:00:49 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -61,7 +61,7 @@ void sqlite3DeleteFrom( Vdbe *v; /* The virtual database engine */ Table *pTab; /* The table from which records will be deleted */ const char *zDb; /* Name of database holding pTab */ - int end, addr; /* A couple addresses of generated code */ + int end, addr = 0; /* A couple addresses of generated code */ int i; /* Loop counter */ WhereInfo *pWInfo; /* Information about the WHERE clause */ Index *pIdx; /* For looping over indices of the table */ diff --git a/src/expr.c b/src/expr.c index d43eb0dbfb..568447bf47 100644 --- a/src/expr.c +++ b/src/expr.c @@ -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.142 2004/06/15 16:51:01 danielk1977 Exp $ +** $Id: expr.c,v 1.143 2004/06/16 12:00:50 danielk1977 Exp $ */ #include "sqliteInt.h" #include @@ -1160,7 +1160,7 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){ case TK_FLOAT: op = OP_Real; break; case TK_STRING: op = OP_String8; break; case TK_BLOB: op = OP_HexBlob; break; - default: break; + default: op = 0; break; } switch( pExpr->op ){ case TK_COLUMN: { diff --git a/src/insert.c b/src/insert.c index 969f768ce2..8dedbbbeeb 100644 --- a/src/insert.c +++ b/src/insert.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle INSERT statements in SQLite. ** -** $Id: insert.c,v 1.110 2004/06/10 10:50:21 danielk1977 Exp $ +** $Id: insert.c,v 1.111 2004/06/16 12:00:54 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -177,17 +177,17 @@ void sqlite3Insert( Vdbe *v; /* Generate code into this virtual machine */ Index *pIdx; /* For looping over indices of the table */ int nColumn; /* Number of columns in the data */ - int base; /* VDBE Cursor number for pTab */ - int iCont, iBreak; /* Beginning and end of the loop over srcTab */ + int base = 0; /* VDBE Cursor number for pTab */ + int iCont=0,iBreak=0; /* Beginning and end of the loop over srcTab */ sqlite *db; /* The main database structure */ int keyColumn = -1; /* Column that is the INTEGER PRIMARY KEY */ int endOfLoop; /* Label for the end of the insertion loop */ int useTempTable; /* Store SELECT results in intermediate table */ - int srcTab; /* Data comes from this temporary cursor if >=0 */ - int iSelectLoop; /* Address of code that implements the SELECT */ - int iCleanup; /* Address of the cleanup code */ - int iInsertBlock; /* Address of the subroutine used to insert data */ - int iCntMem; /* Memory cell used for the row counter */ + int srcTab = 0; /* Data comes from this temporary cursor if >=0 */ + int iSelectLoop = 0; /* Address of code that implements the SELECT */ + int iCleanup = 0; /* Address of the cleanup code */ + int iInsertBlock = 0; /* Address of the subroutine used to insert data */ + int iCntMem = 0; /* Memory cell used for the row counter */ int isView; /* True if attempting to insert into a view */ int row_triggers_exist = 0; /* True if there are FOR EACH ROW triggers */ @@ -735,7 +735,7 @@ void sqlite3GenerateConstraintChecks( int iCur; Index *pIdx; int seenReplace = 0; - int jumpInst1, jumpInst2; + int jumpInst1=0, jumpInst2; int contAddr; int hasTwoRecnos = (isUpdate && recnoChng); diff --git a/src/main.c b/src/main.c index fc44eae380..fa4bcc211e 100644 --- a/src/main.c +++ b/src/main.c @@ -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.223 2004/06/16 10:39:32 danielk1977 Exp $ +** $Id: main.c,v 1.224 2004/06/16 12:00:56 danielk1977 Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -1021,7 +1021,7 @@ prepare_out: if( rc==SQLITE_OK ){ *ppStmt = (sqlite3_stmt*)sParse.pVdbe; }else if( sParse.pVdbe ){ - sqlite3_finalize(sParse.pVdbe); + sqlite3_finalize((sqlite3_stmt*)sParse.pVdbe); } if( zErrMsg ){ diff --git a/src/pager.c b/src/pager.c index 9540fab397..bf8843aae4 100644 --- a/src/pager.c +++ b/src/pager.c @@ -18,7 +18,7 @@ ** file simultaneously, or one process from reading the database while ** another is writing. ** -** @(#) $Id: pager.c,v 1.130 2004/06/16 10:39:39 danielk1977 Exp $ +** @(#) $Id: pager.c,v 1.131 2004/06/16 12:01:01 danielk1977 Exp $ */ #include "os.h" /* Must be first to enable large file support */ #include "sqliteInt.h" @@ -1087,7 +1087,8 @@ int sqlite3pager_open( char *zFullPathname = 0; int nameLen; OsFile fd; - int rc, i; + int rc = SQLITE_OK; + int i; int tempFile = 0; int memDb = 0; int readOnly = 0;