diff options
author | drh <> | 2023-07-08 14:27:55 +0000 |
---|---|---|
committer | drh <> | 2023-07-08 14:27:55 +0000 |
commit | bc532ae15fa1a1cd75f6042fa476bbe2c35c98f6 (patch) | |
tree | 85f346cd6f4deb25412c47b41b3e10f6d62a6e23 /src/btree.c | |
parent | 50ba4e3efdcdd8f8e21266cd4f3b19a9d301713d (diff) | |
download | sqlite-bc532ae15fa1a1cd75f6042fa476bbe2c35c98f6.tar.gz sqlite-bc532ae15fa1a1cd75f6042fa476bbe2c35c98f6.zip |
Fix harmless scan-build warnings.
FossilOrigin-Name: beab3c98639be531744e60440223bb9ee76bc15234aff05e5efb273c8241dfd8
Diffstat (limited to 'src/btree.c')
-rw-r--r-- | src/btree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/btree.c b/src/btree.c index aa4e28601..643d1c42d 100644 --- a/src/btree.c +++ b/src/btree.c @@ -5341,6 +5341,7 @@ static int moveToChild(BtCursor *pCur, u32 newPgno){ pCur->ix = 0; pCur->iPage++; rc = getAndInitPage(pCur->pBt, newPgno, &pCur->pPage, pCur->curPagerFlags); + assert( pCur->pPage!=0 || rc!=SQLITE_OK ); if( rc==SQLITE_OK && (pCur->pPage->nCell<1 || pCur->pPage->intKey!=pCur->curIntKey) ){ @@ -5569,7 +5570,7 @@ int sqlite3BtreeFirst(BtCursor *pCur, int *pRes){ *pRes = 0; rc = moveToLeftmost(pCur); }else if( rc==SQLITE_EMPTY ){ - assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 ); + assert( pCur->pgnoRoot==0 || (pCur->pPage!=0 && pCur->pPage->nCell==0) ); *pRes = 1; rc = SQLITE_OK; } |