diff options
author | drh <> | 2023-10-24 11:06:44 +0000 |
---|---|---|
committer | drh <> | 2023-10-24 11:06:44 +0000 |
commit | c0ba6a97ec377aee55b671721291d517a08ff21d (patch) | |
tree | 15a22078ad1c139dddda59f6ffdf769210e5ef10 /ext/session | |
parent | eb9882d7d144ab6f4ab9078ca9eb62251801be19 (diff) | |
download | sqlite-c0ba6a97ec377aee55b671721291d517a08ff21d.tar.gz sqlite-c0ba6a97ec377aee55b671721291d517a08ff21d.zip |
Fix various harmless scan-build warnings.
FossilOrigin-Name: 54be9af4469d7e31ee852f67e5aa32996557c10de654a60103fd165d2fedf311
Diffstat (limited to 'ext/session')
-rw-r--r-- | ext/session/sqlite3session.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/session/sqlite3session.c b/ext/session/sqlite3session.c index e7459b1af..a5538ddac 100644 --- a/ext/session/sqlite3session.c +++ b/ext/session/sqlite3session.c @@ -603,8 +603,10 @@ static int sessionPreupdateHash( ** the type byte). */ static int sessionSerialLen(const u8 *a){ - int e = *a; + int e; int n; + assert( a!=0 ); + e = *a; if( e==0 || e==0xFF ) return 1; if( e==SQLITE_NULL ) return 1; if( e==SQLITE_INTEGER || e==SQLITE_FLOAT ) return 9; @@ -5450,6 +5452,7 @@ static int sessionChangeMerge( ){ SessionChange *pNew = 0; int rc = SQLITE_OK; + assert( aRec!=0 ); if( !pExist ){ pNew = (SessionChange *)sqlite3_malloc64(sizeof(SessionChange) + nRec); |