mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Fix harmless static-analyzer warnings.
FossilOrigin-Name: 32f33f356931242b59c01b5df7e180941231e3d9c91577ad33aa4a01e9d59092
This commit is contained in:
@@ -2362,7 +2362,7 @@ static CollSeq *multiSelectCollSeq(Parse *pParse, Select *p, int iCol){
|
||||
*/
|
||||
static KeyInfo *multiSelectOrderByKeyInfo(Parse *pParse, Select *p, int nExtra){
|
||||
ExprList *pOrderBy = p->pOrderBy;
|
||||
int nOrderBy = p->pOrderBy->nExpr;
|
||||
int nOrderBy = ALWAYS(pOrderBy!=0) ? pOrderBy->nExpr : 0;
|
||||
sqlite3 *db = pParse->db;
|
||||
KeyInfo *pRet = sqlite3KeyInfoAlloc(db, nOrderBy+nExtra, 1);
|
||||
if( pRet ){
|
||||
@@ -3335,6 +3335,7 @@ static int multiSelectOrderBy(
|
||||
for(i=1; db->mallocFailed==0 && i<=p->pEList->nExpr; i++){
|
||||
struct ExprList_item *pItem;
|
||||
for(j=0, pItem=pOrderBy->a; j<nOrderBy; j++, pItem++){
|
||||
assert( pItem!=0 );
|
||||
assert( pItem->u.x.iOrderByCol>0 );
|
||||
if( pItem->u.x.iOrderByCol==i ) break;
|
||||
}
|
||||
@@ -3361,6 +3362,7 @@ static int multiSelectOrderBy(
|
||||
struct ExprList_item *pItem;
|
||||
aPermute[0] = nOrderBy;
|
||||
for(i=1, pItem=pOrderBy->a; i<=nOrderBy; i++, pItem++){
|
||||
assert( pItem!=0 );
|
||||
assert( pItem->u.x.iOrderByCol>0 );
|
||||
assert( pItem->u.x.iOrderByCol<=p->pEList->nExpr );
|
||||
aPermute[i] = pItem->u.x.iOrderByCol - 1;
|
||||
|
||||
Reference in New Issue
Block a user