diff options
author | shane <shane@noemail.net> | 2009-09-10 19:09:03 +0000 |
---|---|---|
committer | shane <shane@noemail.net> | 2009-09-10 19:09:03 +0000 |
commit | abc6b89085c5782bc3f99b4efa03fada369b43d0 (patch) | |
tree | 83e06c5bfed29f8faa5db44bf6c63bf7dbe0be8c /src | |
parent | 17458718b2f296223891bcc3d1da433bd51e448e (diff) | |
download | sqlite-abc6b89085c5782bc3f99b4efa03fada369b43d0.tar.gz sqlite-abc6b89085c5782bc3f99b4efa03fada369b43d0.zip |
Cleanup of warnings on MSVC build.
FossilOrigin-Name: 5588cc96bbe0b9df5f8d31f8f2d2b48b3f54ff09
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbe.c | 8 | ||||
-rw-r--r-- | src/vdbeaux.c | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/vdbe.c b/src/vdbe.c index 26f476cbe..e25280a9e 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -3585,14 +3585,18 @@ case OP_NewRowid: { /* out2-prerelease */ #ifndef SQLITE_OMIT_AUTOINCREMENT if( pOp->p3 ){ + /* Assert that P3 is a valid memory cell. */ + assert( pOp->p3>0 ); if( p->pFrame ){ for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent); + /* Assert that P3 is a valid memory cell. */ + assert( pOp->p3<=pFrame->nMem ); pMem = &pFrame->aMem[pOp->p3]; }else{ + /* Assert that P3 is a valid memory cell. */ + assert( pOp->p3<=p->nMem ); pMem = &p->aMem[pOp->p3]; } - /* Assert that P3 is a valid memory cell. */ - assert( pOp->p3>0 && pOp->p3<=(p->pFrame ? pFrame->nMem : p->nMem) ); REGISTER_TRACE(pOp->p3, pMem); sqlite3VdbeMemIntegerify(pMem); diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 3e719b1fc..c169b3727 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -1313,7 +1313,7 @@ void sqlite3VdbeMakeReady( int nCursor, /* Number of cursors to allocate */ int nArg, /* Maximum number of args in SubPrograms */ int isExplain, /* True if the EXPLAIN keywords is present */ - int usesStmtJournal /* True to set Vdbe.usesStmtJournal */ + int usesStmtJournal /* True to set Vdbe.usesStmtJournal */ ){ int n; sqlite3 *db = p->db; @@ -1349,7 +1349,7 @@ void sqlite3VdbeMakeReady( u8 *zEnd = (u8 *)&p->aOp[p->nOpAlloc]; int nByte; resolveP2Values(p, &nArg); - p->usesStmtJournal = usesStmtJournal; + p->usesStmtJournal = (u8)usesStmtJournal; if( isExplain && nMem<10 ){ nMem = 10; } |