Remove unreachable code.
Remove unreachable code #10845
pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:remove-unreachable-code changing 2 files +0 −23-
practicalswift commented at 5:44 PM on July 16, 2017: contributor
-
Remove unreachable code 41bf1598f1
-
in src/wallet/db.cpp:557 in 41bf1598f1
553 | @@ -554,7 +554,6 @@ bool CDB::Rewrite(CWalletDBWrapper& dbw, const char* pszSkip) 554 | } 555 | MilliSleep(100); 556 | } 557 | - return false;
promag commented at 9:05 PM on July 16, 2017:Mixed feelings here, maybe move up
bool fSuccess = true;and break in the loop? Same below inBackup()?
TheBlueMatt commented at 10:49 PM on July 16, 2017:Agreed, though cant say I care too strongly. Its a smaller/simpler change not to.
gmaxwell commented at 10:54 PM on July 16, 2017:promag's solution is a bit more robust against code being moved around, otoh, if the end becomes reachable and there is no return statement the compiler will warn... though are we sure we won't get false positives for that warning on some compilers?
promag commented at 11:02 PM on July 16, 2017:Yes the compiler should warn. For me this is too long for not to have a clear return value. But consider it a nit.
promag commented at 11:04 PM on July 16, 2017:Maybe leave to a future PR to remove the
while (true).TheBlueMatt commented at 10:49 PM on July 16, 2017: memberutACK 41bf1598f12d546851e509d369783d493bdd7108
fanquake added the label Refactoring on Jul 17, 2017laanwj merged this on Sep 6, 2017laanwj closed this on Sep 6, 2017laanwj referenced this in commit 39ae41389a on Sep 6, 2017schancel referenced this in commit d6b70b4f15 on Jul 18, 2019jonspock referenced this in commit fc077d8bd9 on Sep 5, 2019jonspock referenced this in commit b9f276a423 on Sep 6, 2019proteanx referenced this in commit 0139fa02a0 on Sep 6, 2019PastaPastaPasta referenced this in commit b8019002e6 on Sep 23, 2019PastaPastaPasta referenced this in commit d74a3cd405 on Sep 24, 2019PastaPastaPasta referenced this in commit b51965413e on Nov 19, 2019PastaPastaPasta referenced this in commit 73e4909c4b on Nov 21, 2019PastaPastaPasta referenced this in commit a6447eda3e on Dec 9, 2019PastaPastaPasta referenced this in commit 52423ae20a on Jan 1, 2020PastaPastaPasta referenced this in commit 7e469da61e on Jan 2, 2020PastaPastaPasta referenced this in commit d2fb12504e on Jan 2, 2020PastaPastaPasta referenced this in commit b775bb28f9 on Jan 2, 2020PastaPastaPasta referenced this in commit 6c07ec02ea on Jan 2, 2020PastaPastaPasta referenced this in commit 8260e3d5da on Jan 2, 2020PastaPastaPasta referenced this in commit 73eac47d3c on Jan 3, 2020ckti referenced this in commit 932fbd5ea7 on Mar 28, 2021practicalswift deleted the branch on Apr 10, 2021furszy referenced this in commit 60d36292bc on Jul 26, 2021gades referenced this in commit 74df155863 on Mar 27, 2022DrahtBot locked this on Aug 16, 2022ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-16 15:15 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-16 15:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me