Fixes #19549
fuzz: fix unused variable compiler warning in addrdb #19551
pull jonatack wants to merge 1 commits into bitcoin:master from jonatack:fix-unused-variable-in-addrdb-fuzzer changing 1 files +2 −0-
jonatack commented at 5:18 AM on July 19, 2020: member
- fanquake added the label Tests on Jul 19, 2020
-
in src/test/fuzz/addrdb.cpp:21 in 8f70074458 outdated
16 | @@ -17,6 +17,8 @@ void test_one_input(const std::vector<uint8_t>& buffer) 17 | { 18 | FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); 19 | 20 | + // `ban_entry` is no longer used, but the harness still needs to consume the 21 | + // same data that it did previously to not invalidate existing seeds.
MarcoFalke commented at 5:57 AM on July 19, 2020:Maybe comment here "The point of the code is to exercise all CBanEntry ctors :)" from #19549 (comment)
in src/test/fuzz/addrdb.cpp:37 in 8f70074458 outdated
33 | @@ -32,4 +34,5 @@ void test_one_input(const std::vector<uint8_t>& buffer) 34 | } 35 | return CBanEntry{}; 36 | }(); 37 | + (void)ban_entry;
MarcoFalke commented at 5:57 AM on July 19, 2020:and then comment this as
(void)ban_entry; // currently unusedMarcoFalke approvedMarcoFalke commented at 5:59 AM on July 19, 2020: memberThe rationale "not invalidate existing seeds" is a nice-to-have, not a strict rule. I think it is enough to say that the constructors should be exercised, but the entry itself is currently unused.
MarcoFalke commented at 6:00 AM on July 19, 2020: memberACK either way
fuzz: fix unused variable addrdb compiler warning 1cdc2a642bjonatack force-pushed on Jul 19, 2020jonatack commented at 6:33 AM on July 19, 2020: memberThank @MarcoFalke, updated with your feedback.
MarcoFalke commented at 6:34 AM on July 19, 2020: memberreview re-ACK 1cdc2a642b8b5dab7a830b5d7262add5363400db
hebasto approvedhebasto commented at 6:51 AM on July 19, 2020: memberACK 1cdc2a642b8b5dab7a830b5d7262add5363400db, tested on Linux Mint 20 (x86_64, clang 10.0).
practicalswift commented at 7:31 AM on July 19, 2020: contributorACK 1cdc2a642b8b5dab7a830b5d7262add5363400db
Thanks for fixing :)
fanquake merged this on Jul 19, 2020fanquake closed this on Jul 19, 2020jonatack deleted the branch on Jul 19, 2020DrahtBot locked this on Feb 15, 2022
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-14 21:14 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-14 21:14 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