diff options
author | drh <> | 2024-10-23 11:06:56 +0000 |
---|---|---|
committer | drh <> | 2024-10-23 11:06:56 +0000 |
commit | 98772d6e75f4033373c806e4e44f675971e55e38 (patch) | |
tree | 7a118234280544db54d71c9c709c25566fc53796 /src/wherecode.c | |
parent | 2c264ad060378a389b2fd0517bb0e7fe0b54ec79 (diff) | |
download | sqlite-98772d6e75f4033373c806e4e44f675971e55e38.tar.gz sqlite-98772d6e75f4033373c806e4e44f675971e55e38.zip |
Fix harmless compiler warnings in wherecode.c. One such warning was
identified by [forum:/forumpost/721675f007|forum post 721675f007] and the
other was found by tool/warnings.sh.
FossilOrigin-Name: 987b96aa636c1801f87d3e1c75d34d45c5b6f437bcc6d150298675447ed16b5d
Diffstat (limited to 'src/wherecode.c')
-rw-r--r-- | src/wherecode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wherecode.c b/src/wherecode.c index f1c6711af..0bd1733b7 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -132,7 +132,9 @@ void sqlite3WhereAddExplainText( int isSearch; /* True for a SEARCH. False for SCAN. */ WhereLoop *pLoop; /* The controlling WhereLoop object */ u32 flags; /* Flags that describe this loop */ +#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN) char *zMsg; /* Text to add to EQP output */ +#endif StrAccum str; /* EQP output string */ char zBuf[100]; /* Initial space for EQP output string */ @@ -215,8 +217,10 @@ void sqlite3WhereAddExplainText( sqlite3_str_append(&str, " (~1 row)", 9); } #endif +#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN) zMsg = sqlite3StrAccumFinish(&str); sqlite3ExplainBreakpoint("",zMsg); +#endif assert( pOp->opcode==OP_Explain ); assert( pOp->p4type==P4_DYNAMIC || pOp->p4.z==0 ); @@ -355,9 +359,10 @@ void sqlite3WhereAddScanStatus( } }else{ int addr; + VdbeOp *pOp; assert( pSrclist->a[pLvl->iFrom].fg.isSubquery ); addr = pSrclist->a[pLvl->iFrom].u4.pSubq->addrFillSub; - VdbeOp *pOp = sqlite3VdbeGetOp(v, addr-1); + pOp = sqlite3VdbeGetOp(v, addr-1); assert( sqlite3VdbeDb(v)->mallocFailed || pOp->opcode==OP_InitCoroutine ); assert( sqlite3VdbeDb(v)->mallocFailed || pOp->p2>addr ); sqlite3VdbeScanStatusRange(v, addrExplain, addr, pOp->p2-1); |