diff options
author | drh <> | 2022-12-17 12:49:04 +0000 |
---|---|---|
committer | drh <> | 2022-12-17 12:49:04 +0000 |
commit | 1c7042956933eaa3e7e69221e38c8c14e283eae4 (patch) | |
tree | 1873dad2334ea3e64fb96a63c2346cf1e207b345 /src | |
parent | a4d04c59baf858ea4daf14317587808996d75c69 (diff) | |
download | sqlite-1c7042956933eaa3e7e69221e38c8c14e283eae4.tar.gz sqlite-1c7042956933eaa3e7e69221e38c8c14e283eae4.zip |
Add NEVER/ALWAYS to branches that have become unreachable due to recent
enhancements.
FossilOrigin-Name: b4281db4e4762773684d27b809ef911da08b81cb953b3666e535b990d4d5f701
Diffstat (limited to 'src')
-rw-r--r-- | src/select.c | 4 | ||||
-rw-r--r-- | src/vdbe.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/select.c b/src/select.c index d34746fb3..7ce283a37 100644 --- a/src/select.c +++ b/src/select.c @@ -1901,7 +1901,7 @@ static const char *columnTypeImpl( Table *pTab = 0; /* Table structure column is extracted from */ Select *pS = 0; /* Select the column is extracted from */ int iCol = pExpr->iColumn; /* Index of column in pTab */ - while( pNC && !pTab ){ + while( ALWAYS(pNC) && !pTab ){ SrcList *pTabList = pNC->pSrcList; for(j=0;j<pTabList->nSrc && pTabList->a[j].iCursor!=pExpr->iTable;j++); if( j<pTabList->nSrc ){ @@ -1912,7 +1912,7 @@ static const char *columnTypeImpl( } } - if( pTab==0 ){ + if( NEVER(pTab==0) ){ /* At one time, code such as "SELECT new.x" within a trigger would ** cause this condition to run. Since then, we have restructured how ** trigger code is generated and so this condition is no longer diff --git a/src/vdbe.c b/src/vdbe.c index a3390d984..bd8f57791 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -2194,7 +2194,7 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ sqlite3VdbeMemStringify(pIn1, encoding, 1); testcase( (flags1&MEM_Dyn) != (pIn1->flags&MEM_Dyn) ); flags1 = (pIn1->flags & ~MEM_TypeMask) | (flags1 & MEM_TypeMask); - if( pIn1==pIn3 ) flags3 = flags1 | MEM_Str; + if( NEVER(pIn1==pIn3) ) flags3 = flags1 | MEM_Str; } if( (flags3 & MEM_Str)==0 && (flags3&(MEM_Int|MEM_Real|MEM_IntReal))!=0 ){ testcase( pIn3->flags & MEM_Int ); |