Fix harmless static analyzer warnings.

FossilOrigin-Name: 6604a085964121113e7b7f57537a0ba64ba058d0eb12bf0a3aeb6d1b7a29d516
This commit is contained in:
drh 2021-10-04 13:18:44 +00:00
parent 36db90d3dd
commit aa6fe5bf10
5 changed files with 12 additions and 10 deletions

View File

@ -759,7 +759,7 @@ static int jsonParseAddNode(
const char *zContent /* Content */
){
JsonNode *p;
if( pParse->nNode>=pParse->nAlloc ){
if( pParse->aNode==0 || pParse->nNode>=pParse->nAlloc ){
return jsonParseAddNodeExpand(pParse, eType, n, zContent);
}
p = &pParse->aNode[pParse->nNode];

View File

@ -1,5 +1,5 @@
C Fix\squery\splans\screated\sby\swhereShortCut()\sso\sthat\sthey\salways\scheck\ntransitive\sconstraints\sthat\sdrive\san\sindex.\s\sThe\sis\sanalogous\sto\sthe\n[f1f9b5de3c59489b]\scheck-in,\sjust\sfor\swhereShortCut()\srather\sthan\sthe\nfull\squery\splanner.\sFix\sfor\sthe\sissue\sdescribed\sby\n[forum:/forumpost/a65cacbf5e1c41ba|forum\spost\sa65cacbf5e1c41ba].
D 2021-10-04T11:10:15.125
C Fix\sharmless\sstatic\sanalyzer\swarnings.
D 2021-10-04T13:18:44.742
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -306,7 +306,7 @@ F ext/misc/fileio.c 57fefd0efc535e62bb8b07fa146875171481da81a759bbfbe2fc91bab900
F ext/misc/fossildelta.c 1240b2d3e52eab1d50c160c7fe1902a9bd210e052dc209200a750bbf885402d5
F ext/misc/fuzzer.c eae560134f66333e9e1ca4c8ffea75df42056e2ce8456734565dbe1c2a92bf3d
F ext/misc/ieee754.c 91a5594071143a4ab79c638fe9f059af1db09932faf2e704c3e29216a7d4f511
F ext/misc/json1.c 96a44b84f00d35f9450abae1f0167abe60de9379b2b27ea652c6cf14450b4739
F ext/misc/json1.c 6cfebb66a7568f8a17d67e676daba0a95efc3bc8f69c26998fc9519857bc5deb
F ext/misc/memstat.c 3017a0832c645c0f8c773435620d663855f04690172316bd127270d1a7523d4d
F ext/misc/memtrace.c 7c0d115d2ef716ad0ba632c91e05bd119cb16c1aedf3bec9f06196ead2d5537b
F ext/misc/memvfs.c 7dffa8cc89c7f2d73da4bd4ccea1bcbd2bd283e3bb4cea398df7c372a197291b
@ -536,7 +536,7 @@ F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
F src/os_unix.c b11e4610769922253dec27d7af4a07ff84f65169d19bda5e9b12a152a706f7f5
F src/os_win.c 77d39873836f1831a9b0b91894fec45ab0e9ca8e067dc8c549e1d1eca1566fe9
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
F src/pager.c dabb867aa4fabe01d05a5fb39c4d497b2d7bff591b738ffbe7f715ee28b67cdb
F src/pager.c e20778eee03916035f5fb861bab7edb894779b1c448c3725fd4cde5f6a3edc6d
F src/pager.h 4bf9b3213a4b2bebbced5eaa8b219cf25d4a82f385d093cd64b7e93e5285f66f
F src/parse.y 82bdd593c50bddcc285a173e9788a20296103217f5f5290c9122abf8af71af62
F src/pcache.c 084e638432c610f95aea72b8509f0845d2791293f39d1b82f0c0a7e089c3bb6b
@ -549,7 +549,7 @@ F src/printf.c 5901672228f305f7d493cbc4e7d76a61a5caecdbc1cd06b1f9ec42ea4265cf8d
F src/random.c 097dc8b31b8fba5a9aca1697aeb9fd82078ec91be734c16bffda620ced7ab83c
F src/resolve.c b9e60afa56d0484ee573aba54d9e73603736236df33d2ae3421b4cd0367d907d
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
F src/select.c 916d18b586d8efad5a46040e48405f42e7f90fff33bca1cfab040169515ec525
F src/select.c c4f14e9aaa2f7c821be721f79ee578a82d4efeef5797f9673feb82750582ae80
F src/shell.c.in 923671ae56ad899db71296d0ebefea9c85e7e52ef087c8a097f3f3a3a3ade98c
F src/sqlite.h.in 4e977a5e2ed1a9e8987ff65a2cab5f99a4298ebf040ea5ff636e1753339ff45a
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
@ -1929,7 +1929,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P be211a9c59234ef202e772fcaae18be43c44e1e00674f137cad2d903e00bfcab
R 292b396dc8ad27f72b460cd6d9853182
P 8b24c177061c38361588f419eda9b7943b72a0c6b2855b6f39272451b8a1b813
R e6fd0cb863cd13024a2ff76a8115faa5
U drh
Z eff1f6baf32edbc9330b75894ca2e4ea
Z 993ff6f0e7e4efd9b421b48c58764014

View File

@ -1 +1 @@
8b24c177061c38361588f419eda9b7943b72a0c6b2855b6f39272451b8a1b813
6604a085964121113e7b7f57537a0ba64ba058d0eb12bf0a3aeb6d1b7a29d516

View File

@ -3024,6 +3024,7 @@ static int readDbPage(PgHdr *pPg){
*/
static void pager_write_changecounter(PgHdr *pPg){
u32 change_counter;
if( NEVER(pPg==0) ) return;
/* Increment the value just read and write it back to byte 24. */
change_counter = sqlite3Get4byte((u8*)pPg->pPager->dbFileVers)+1;

View File

@ -2983,6 +2983,7 @@ static int multiSelect(
int nCol; /* Number of columns in result set */
assert( p->pNext==0 );
assert( p->pEList!=0 );
nCol = p->pEList->nExpr;
pKeyInfo = sqlite3KeyInfoAlloc(db, nCol, 1);
if( !pKeyInfo ){