diff options
author | drh <drh@noemail.net> | 2011-10-14 21:49:18 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-10-14 21:49:18 +0000 |
commit | b07028f71cd96b48a81474c6f1eea9596eb41cc7 (patch) | |
tree | 79e9ce2fc70ef9318d48c388431caf117fbdf001 /src/update.c | |
parent | 0edb7acd3c2dcd913e5cecce8475aed8ff0850bf (diff) | |
download | sqlite-b07028f71cd96b48a81474c6f1eea9596eb41cc7.tar.gz sqlite-b07028f71cd96b48a81474c6f1eea9596eb41cc7.zip |
Add assert() statements and eliminate needless variable assignments in order
to get the clang scan-build utility to report zero problems against the
SQLite core. Clang's static analysis did find one real problem - but it was
in the command-line shell, not in the SQLite core.
FossilOrigin-Name: 60fee9574b0125705787e33c16f116cf188c8323
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/update.c b/src/update.c index 2b5efff37..1e3052218 100644 --- a/src/update.c +++ b/src/update.c @@ -356,6 +356,7 @@ void sqlite3Update( } } for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){ + assert( aRegIdx ); if( openAll || aRegIdx[i]>0 ){ KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx); sqlite3VdbeAddOp4(v, OP_OpenWrite, iCur+i+1, pIdx->tnum, iDb, @@ -529,6 +530,7 @@ void sqlite3Update( /* Close all tables */ for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){ + assert( aRegIdx ); if( openAll || aRegIdx[i]>0 ){ sqlite3VdbeAddOp2(v, OP_Close, iCur+i+1, 0); } |