1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Use extra assert() statement to silence harmless static analyzer warnings.

FossilOrigin-Name: 174c2b2eef5fecd96a5fc89b81032fe81f7801f12097cea10e7e7f0a02114813
This commit is contained in:
drh
2023-12-05 19:24:07 +00:00
parent a0de45459e
commit 5afd67b3c3
3 changed files with 11 additions and 8 deletions

View File

@@ -1119,6 +1119,7 @@ static void jsonBlobAppendNode(
jsonBlobExpandAndAppendNode(pParse,eType,szPayload,aPayload);
return;
}
assert( pParse->aBlob!=0 );
a = &pParse->aBlob[pParse->nBlob];
if( szPayload<=11 ){
a[0] = eType | (szPayload<<4);
@@ -2288,6 +2289,8 @@ static u32 jsonLookupStep(
nIns = ix.nBlob + nKey + v.nBlob;
jsonBlobEdit(pParse, j, 0, 0, nIns);
if( !pParse->oom ){
assert( pParse->aBlob!=0 ); /* Because pParse->oom!=0 */
assert( ix.aBlob!=0 ); /* Because pPasre->oom!=0 */
memcpy(&pParse->aBlob[j], ix.aBlob, ix.nBlob);
k = j + ix.nBlob;
memcpy(&pParse->aBlob[k], zKey, nKey);
@@ -4406,7 +4409,7 @@ static int jsonEachColumn(
}
case JEACH_TYPE: {
u32 i = jsonSkipLabel(p);
u8 eType = eType = p->sParse.aBlob[i] & 0x0f;
u8 eType = p->sParse.aBlob[i] & 0x0f;
sqlite3_result_text(ctx, jsonbType[eType], -1, SQLITE_STATIC);
break;
}