Removed a few compiler warnings under MSVC. (CVS 6825)
FossilOrigin-Name: f01a9fc375d77c67602a9f6be6a674beb516233f
This commit is contained in:
parent
9ed7a9953e
commit
36840fdddb
18
manifest
18
manifest
@ -1,5 +1,5 @@
|
||||
C Remove\sthe\spriorNewRowid\sfield\sfrom\sthe\ssqlite3\sstructure.\s\sUse\sthe\nlast_insert_rowid\sas\sthe\sinitial\svalue\swhen\ssearching\sfor\sa\snew\srandom\nrowid\sin\sthe\sOP_NewRowid\sopcode.\s(CVS\s6824)
|
||||
D 2009-06-26T15:14:55
|
||||
C Removed\sa\sfew\scompiler\swarnings\sunder\sMSVC.\s(CVS\s6825)
|
||||
D 2009-06-26T16:32:13
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in 8b8fb7823264331210cddf103831816c286ba446
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -106,7 +106,7 @@ F src/auth.c 98db07c2088455797678eb1031f42d4d94d18a71
|
||||
F src/backup.c ff50af53184a5fd7bdee4d620b5dabef74717c79
|
||||
F src/bitvec.c 0ef0651714728055d43de7a4cdd95e703fac0119
|
||||
F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c
|
||||
F src/btree.c c049fb18101d9c70bbf35d51def0da588dee9773
|
||||
F src/btree.c 617d674eb77060f7fd6a05d27d72946c901191c8
|
||||
F src/btree.h f70b694e8c163227369a66863b01fbff9009f323
|
||||
F src/btreeInt.h 55346bc14b939ad41b297942e8b1b581e960fb99
|
||||
F src/build.c 813f6bdab5e4fb5ff94a5340c199a4930da9d66e
|
||||
@ -203,11 +203,11 @@ F src/update.c b58db45e40f11082281d6f94137cd3b5657771d9
|
||||
F src/utf.c 9541d28f40441812c0b40f00334372a0542c00ff
|
||||
F src/util.c 861d5b5c58be4921f0a254489ea94cb15f550ef8
|
||||
F src/vacuum.c 0e14f371ea3326c6b8cfba257286d798cd20db59
|
||||
F src/vdbe.c e16028ce7912f9b4d9fc61de16aa79a40d156408
|
||||
F src/vdbe.c dfd508c9f6c183f0f39535dee51d9f0bc9420088
|
||||
F src/vdbe.h 35a648bc3279a120da24f34d9a25213ec15daf8a
|
||||
F src/vdbeInt.h 831c254a6eef237ef4664c8381a0137586567007
|
||||
F src/vdbeapi.c 0ab8ada7260b32031ca97f338caecf0812460624
|
||||
F src/vdbeaux.c 338d4b4323d9153d918d890e72b02f796ba20663
|
||||
F src/vdbeaux.c 3773217a73f93fb292d264b3b1da98c179a0f2f0
|
||||
F src/vdbeblob.c c25d7e7bc6d5917feeb17270bd275fa771f26e5c
|
||||
F src/vdbemem.c 1618f685d19b4bcc96e40b3c478487bafd2ae246
|
||||
F src/vtab.c 98fbffc5efe68d8107511dec0a650efc7daa9446
|
||||
@ -737,7 +737,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
|
||||
P d8c8145c9d28d014eb9218b3f1312b957ccc72b7
|
||||
R b613a9e2d1e2527d50aacbf4a4df984d
|
||||
U drh
|
||||
Z 0ac77250d84f1a18186fb1470ccac0a3
|
||||
P 96729b2d499f029bfaec6648a592e8ec697d9521
|
||||
R fc4b7c1a6225b0393bf8a20671e309c4
|
||||
U shane
|
||||
Z 4b1a0e3f6dd4fd54dd886da2d6eabcca
|
||||
|
@ -1 +1 @@
|
||||
96729b2d499f029bfaec6648a592e8ec697d9521
|
||||
f01a9fc375d77c67602a9f6be6a674beb516233f
|
12
src/btree.c
12
src/btree.c
@ -9,7 +9,7 @@
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** $Id: btree.c,v 1.644 2009/06/25 16:11:05 danielk1977 Exp $
|
||||
** $Id: btree.c,v 1.645 2009/06/26 16:32:13 shane Exp $
|
||||
**
|
||||
** This file implements a external (disk-based) database using BTrees.
|
||||
** See the header comment on "btreeInt.h" for additional information.
|
||||
@ -1015,7 +1015,7 @@ static int freeSpace(MemPage *pPage, int start, int size){
|
||||
put2byte(&data[addr], start);
|
||||
put2byte(&data[start], pbegin);
|
||||
put2byte(&data[start+2], size);
|
||||
pPage->nFree += (u16)size;
|
||||
pPage->nFree = pPage->nFree + (u16)size;
|
||||
|
||||
/* Coalesce adjacent free blocks */
|
||||
addr = pPage->hdrOffset + 1;
|
||||
@ -5112,7 +5112,7 @@ static int insertCell(
|
||||
return SQLITE_CORRUPT_BKPT;
|
||||
}
|
||||
pPage->nCell++;
|
||||
pPage->nFree -= (2 + sz);
|
||||
pPage->nFree = pPage->nFree - (u16)(2 + sz);
|
||||
memcpy(&data[idx+nSkip], pCell+nSkip, sz-nSkip);
|
||||
if( iChild ){
|
||||
put4byte(&data[idx], iChild);
|
||||
@ -5441,7 +5441,7 @@ static int balance_nonroot(
|
||||
int i, j, k; /* Loop counters */
|
||||
int nxDiv; /* Next divider slot in pParent->aCell[] */
|
||||
int rc = SQLITE_OK; /* The return code */
|
||||
int leafCorrection; /* 4 if pPage is a leaf. 0 if not */
|
||||
u16 leafCorrection; /* 4 if pPage is a leaf. 0 if not */
|
||||
int leafData; /* True if pPage is a leaf of a LEAFDATA tree */
|
||||
int usableSpace; /* Bytes in pPage beyond the header */
|
||||
int pageFlags; /* Value of pPage->aData[0] */
|
||||
@ -5610,7 +5610,7 @@ static int balance_nonroot(
|
||||
nCell++;
|
||||
}
|
||||
if( i<nOld-1 && !leafData){
|
||||
u16 sz = szNew[i];
|
||||
u16 sz = (u16)szNew[i];
|
||||
u8 *pTemp;
|
||||
assert( nCell<nMaxCells );
|
||||
szCell[nCell] = sz;
|
||||
@ -5621,7 +5621,7 @@ static int balance_nonroot(
|
||||
memcpy(pTemp, apDiv[i], sz);
|
||||
apCell[nCell] = pTemp+leafCorrection;
|
||||
assert( leafCorrection==0 || leafCorrection==4 );
|
||||
szCell[nCell] -= (u16)leafCorrection;
|
||||
szCell[nCell] = szCell[nCell] - leafCorrection;
|
||||
if( !pOld->leaf ){
|
||||
assert( leafCorrection==0 );
|
||||
assert( pOld->hdrOffset==0 );
|
||||
|
14
src/vdbe.c
14
src/vdbe.c
@ -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.865 2009/06/26 15:14:55 drh Exp $
|
||||
** $Id: vdbe.c,v 1.866 2009/06/26 16:32:13 shane Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "vdbeInt.h"
|
||||
@ -848,7 +848,7 @@ case OP_HaltIfNull: { /* in3 */
|
||||
case OP_Halt: {
|
||||
p->rc = pOp->p1;
|
||||
p->pc = pc;
|
||||
p->errorAction = pOp->p2;
|
||||
p->errorAction = (u8)pOp->p2;
|
||||
if( pOp->p4.z ){
|
||||
sqlite3SetString(&p->zErrMsg, db, "%s", pOp->p4.z);
|
||||
}
|
||||
@ -2025,6 +2025,7 @@ case OP_Column: {
|
||||
assert( pOp->p3>0 && pOp->p3<=p->nMem );
|
||||
pDest = &p->aMem[pOp->p3];
|
||||
MemSetTypeFlag(pDest, MEM_Null);
|
||||
zRec = 0;
|
||||
|
||||
/* This block sets the variable payloadSize to be the total number of
|
||||
** bytes in the record.
|
||||
@ -2043,12 +2044,11 @@ case OP_Column: {
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
assert( pC->pVtabCursor==0 );
|
||||
#endif
|
||||
if( pC->pCursor!=0 ){
|
||||
pCrsr = pC->pCursor;
|
||||
if( pCrsr!=0 ){
|
||||
/* The record is stored in a B-Tree */
|
||||
rc = sqlite3VdbeCursorMoveto(pC);
|
||||
if( rc ) goto abort_due_to_error;
|
||||
zRec = 0;
|
||||
pCrsr = pC->pCursor;
|
||||
if( pC->nullRow ){
|
||||
payloadSize = 0;
|
||||
}else if( pC->cacheStatus==p->cacheCtr ){
|
||||
@ -2064,15 +2064,12 @@ case OP_Column: {
|
||||
}else{
|
||||
sqlite3BtreeDataSize(pCrsr, &payloadSize);
|
||||
}
|
||||
nField = pC->nField;
|
||||
}else if( pC->pseudoTable ){
|
||||
/* The record is the sole entry of a pseudo-table */
|
||||
payloadSize = pC->nData;
|
||||
zRec = pC->pData;
|
||||
pC->cacheStatus = CACHE_STALE;
|
||||
assert( payloadSize==0 || zRec!=0 );
|
||||
nField = pC->nField;
|
||||
pCrsr = 0;
|
||||
}else{
|
||||
/* Consider the row to be NULL */
|
||||
payloadSize = 0;
|
||||
@ -2088,6 +2085,7 @@ case OP_Column: {
|
||||
goto too_big;
|
||||
}
|
||||
|
||||
nField = pC->nField;
|
||||
assert( p2<nField );
|
||||
|
||||
/* Read and parse the table header. Store the results of the parse
|
||||
|
@ -14,7 +14,7 @@
|
||||
** to version 2.8.7, all this code was combined into the vdbe.c source file.
|
||||
** But that file was getting too big so this subroutines were split out.
|
||||
**
|
||||
** $Id: vdbeaux.c,v 1.466 2009/06/26 14:04:51 drh Exp $
|
||||
** $Id: vdbeaux.c,v 1.467 2009/06/26 16:32:13 shane Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "vdbeInt.h"
|
||||
@ -1147,9 +1147,9 @@ void sqlite3VdbeMakeReady(
|
||||
zEnd = &zCsr[nByte];
|
||||
}while( nByte && !db->mallocFailed );
|
||||
|
||||
p->nCursor = nCursor;
|
||||
p->nCursor = (u16)nCursor;
|
||||
if( p->aVar ){
|
||||
p->nVar = nVar;
|
||||
p->nVar = (u16)nVar;
|
||||
for(n=0; n<nVar; n++){
|
||||
p->aVar[n].flags = MEM_Null;
|
||||
p->aVar[n].db = db;
|
||||
@ -1281,7 +1281,7 @@ void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){
|
||||
releaseMemArray(p->aColName, p->nResColumn*COLNAME_N);
|
||||
sqlite3DbFree(db, p->aColName);
|
||||
n = nResColumn*COLNAME_N;
|
||||
p->nResColumn = nResColumn;
|
||||
p->nResColumn = (u16)nResColumn;
|
||||
p->aColName = pColName = (Mem*)sqlite3DbMallocZero(db, sizeof(Mem)*n );
|
||||
if( p->aColName==0 ) return;
|
||||
while( n-- > 0 ){
|
||||
@ -1335,6 +1335,13 @@ static int vdbeCommit(sqlite3 *db, Vdbe *p){
|
||||
int rc = SQLITE_OK;
|
||||
int needXcommit = 0;
|
||||
|
||||
#ifdef SQLITE_OMIT_VIRTUALTABLE
|
||||
/* With this option, sqlite3VtabSync() is defined to be simply
|
||||
** SQLITE_OK so p is not used.
|
||||
*/
|
||||
UNUSED_PARAMETER(p);
|
||||
#endif
|
||||
|
||||
/* Before doing anything else, call the xSync() callback for any
|
||||
** virtual module tables written in this transaction. This has to
|
||||
** be done before determining whether a master journal file is
|
||||
|
Loading…
x
Reference in New Issue
Block a user