From 483051c9b666b588de85222713d0058eb7fc8f6c Mon Sep 17 00:00:00 2001 From: drh <> Date: Wed, 12 May 2021 02:09:01 +0000 Subject: [PATCH] Mark an unreachable branch as NEVER(). FossilOrigin-Name: 6c20d9d4b7c7986e8404142974a91dce7514ca574ee52ed5d036367aad396689 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/memdb.c | 4 +++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index ec67e7db35..9d52dbba55 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\sNEVER()\sthat\scan\ssometimes\sbe\strue. -D 2021-05-11T11:40:22.323 +C Mark\san\sunreachable\sbranch\sas\sNEVER(). +D 2021-05-12T02:09:01.176 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -514,7 +514,7 @@ F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de F src/mem2.c b93b8762ab999a29ae7751532dadf0a1ac78040308a5fb1d17fcc365171d67eb F src/mem3.c 30301196cace2a085cbedee1326a49f4b26deff0af68774ca82c1f7c06fda4f6 F src/mem5.c 9bf955937b07f8c32541c8a9991f33ce3173d944 -F src/memdb.c 1f9e82a7f8097c069a3867343edd37beaff3b181ff70b3c60120f836b762b2d4 +F src/memdb.c 653a1f08f80ffbbf841133dfeb9e3893a14a8a02b3d2b48c80260b3a87741f12 F src/memjournal.c 431c70a111223a8a6e2e7e9f014afc6c88d818d357d866afc563195f2277d50e F src/msvc.h 3a15918220367a8876be3fa4f2abe423a861491e84b864fb2b7426bf022a28f8 F src/mutex.c 5e3409715552348732e97b9194abe92fdfcd934cfb681df4ba0ab87ac6c18d25 @@ -1912,7 +1912,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 0617c66ac213d406a9a21580227a57542d7f21c8750c854f549ab818d7a936bc f39666e64d6d32420170c54f874d8314eb8c6f91df625f7b28f9ccffb9474dc0 -R bc4311cb21f90148637b83933f1057b1 +P 8f9f1cbc4468d07d693b418be4d89771fd240ee4af34395d7da5b7709fe88f37 +R 5ec634af0b61ea5b818e7e84910648b7 U drh -Z f77e2f498e7bb655f440b32bafffb71e +Z 4d8ae1d2c5339d2f7192cb6bd5f6074e diff --git a/manifest.uuid b/manifest.uuid index 1cba871489..5409a06a5e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -8f9f1cbc4468d07d693b418be4d89771fd240ee4af34395d7da5b7709fe88f37 \ No newline at end of file +6c20d9d4b7c7986e8404142974a91dce7514ca574ee52ed5d036367aad396689 \ No newline at end of file diff --git a/src/memdb.c b/src/memdb.c index b91f967a5f..284ba4917d 100644 --- a/src/memdb.c +++ b/src/memdb.c @@ -280,7 +280,9 @@ static int memdbWrite( ){ MemStore *p = ((MemFile*)pFile)->pStore; memdbEnter(p); - if( p->mFlags & SQLITE_DESERIALIZE_READONLY ){ + if( NEVER(p->mFlags & SQLITE_DESERIALIZE_READONLY) ){ + /* Can't happen: memdbLock() will return SQLITE_READONLY before + ** reaching this point */ memdbLeave(p); return SQLITE_IOERR_WRITE; }