1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Further attempts to reduce the number of false-positives genenerated by

static analysis tools.

FossilOrigin-Name: 38f9ce6503c4dd05ccdd73463b1784a6df7ed6e5018c29c5874a3681ca34ba54
This commit is contained in:
drh
2018-08-21 12:46:34 +00:00
parent c4ceea72b7
commit f396ecadcd
3 changed files with 13 additions and 8 deletions

View File

@@ -2107,7 +2107,11 @@ static int vdbeMergeEngineInit(
){
int rc = SQLITE_OK; /* Return code */
int i; /* For looping over PmaReader objects */
int nTree = pMerger->nTree;
int nTree; /* Number of subtrees to merge */
/* Failure to allocate the merge would have been detected prior to
** invoking this routine */
assert( pMerger!=0 );
/* eMode is always INCRINIT_NORMAL in single-threaded mode */
assert( SQLITE_MAX_WORKER_THREADS>0 || eMode==INCRINIT_NORMAL );
@@ -2116,6 +2120,7 @@ static int vdbeMergeEngineInit(
assert( pMerger->pTask==0 );
pMerger->pTask = pTask;
nTree = pMerger->nTree;
for(i=0; i<nTree; i++){
if( SQLITE_MAX_WORKER_THREADS>0 && eMode==INCRINIT_ROOT ){
/* PmaReaders should be normally initialized in order, as if they are