aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <dan@noemail.net>2013-08-19 18:17:03 +0000
committerdan <dan@noemail.net>2013-08-19 18:17:03 +0000
commit290703091e1d10b1da572bb0ecd6b23d9a3e36ea (patch)
tree87451bd01ab0fdea1f62ecce5ed9feeef6154a7d /src
parent4ccc419b3c0c02d3f082711ca1fe4f1ad02a0ac3 (diff)
downloadsqlite-290703091e1d10b1da572bb0ecd6b23d9a3e36ea.tar.gz
sqlite-290703091e1d10b1da572bb0ecd6b23d9a3e36ea.zip
Add some extra assert() statements to silence a few clang warnings.
FossilOrigin-Name: 1c63e9515b5f5cb9169928b108d002dcd18ad4fd
Diffstat (limited to 'src')
-rw-r--r--src/expr.c1
-rw-r--r--src/pcache1.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c
index 5c5297c18..e857193b8 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1279,6 +1279,7 @@ int sqlite3ExprIsInteger(Expr *p, int *pValue){
case TK_UMINUS: {
int v;
if( sqlite3ExprIsInteger(p->pLeft, &v) ){
+ assert( v!=-2147483648 );
*pValue = -v;
rc = 1;
}
diff --git a/src/pcache1.c b/src/pcache1.c
index e06f5dae6..df9d87753 100644
--- a/src/pcache1.c
+++ b/src/pcache1.c
@@ -765,6 +765,7 @@ static sqlite3_pcache_page *pcache1Fetch(
if( pCache->nPage>=pCache->nHash && pcache1ResizeHash(pCache) ){
goto fetch_out;
}
+ assert( pCache->nHash>0 && pCache->apHash );
/* Step 4. Try to recycle a page. */
if( pCache->bPurgeable && pGroup->pLruTail && (