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/where.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/where.c')
-rw-r--r-- | src/where.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c index 3c0244e68..f962d6f35 100644 --- a/src/where.c +++ b/src/where.c @@ -4896,7 +4896,8 @@ WhereInfo *sqlite3WhereBegin( WHERETRACE(("*** Optimizer selects table %d for loop %d" " with cost=%g and nRow=%g\n", bestJ, pLevel-pWInfo->a, bestPlan.rCost, bestPlan.plan.nRow)); - if( (bestPlan.plan.wsFlags & WHERE_ORDERBY)!=0 ){ + /* The ALWAYS() that follows was added to hush up clang scan-build */ + if( (bestPlan.plan.wsFlags & WHERE_ORDERBY)!=0 && ALWAYS(ppOrderBy) ){ *ppOrderBy = 0; } if( (bestPlan.plan.wsFlags & WHERE_DISTINCT)!=0 ){ |