Skip to content

Commit 3d28725

Browse files
committed
Merge bitcoin/bitcoin#29968: refactor: Avoid unused-variable warning in init.cpp
fa9abf9 refactor: Avoid unused-variable warning in init.cpp (MarcoFalke) Pull request description: Fixes bitcoin/bitcoin#27679 (comment) ACKs for top commit: TheCharlatan: ACK fa9abf9 Tree-SHA512: dcf56d7aa68578ba611a2dc591de036ab1d08f7f4dfb35d325ecf7241d8e17abc0af7005b96c44da9777adc36961b4da7fdde282a1ab0e0a6f229c8108923101
2 parents 9d1a286 + fa9abf9 commit 3d28725

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/init.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
12971297
}
12981298
}
12991299

1300-
for (const auto &port_option : std::vector<std::pair<std::string, bool>>{
1300+
for ([[maybe_unused]] const auto& [arg, unix] : std::vector<std::pair<std::string, bool>>{
13011301
// arg name UNIX socket support
13021302
{"-i2psam", false},
13031303
{"-onion", true},
@@ -1309,10 +1309,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
13091309
{"-zmqpubhashtx", true},
13101310
{"-zmqpubrawblock", true},
13111311
{"-zmqpubrawtx", true},
1312-
{"-zmqpubsequence", true}
1312+
{"-zmqpubsequence", true},
13131313
}) {
1314-
const std::string arg{port_option.first};
1315-
const bool unix{port_option.second};
13161314
for (const std::string& socket_addr : args.GetArgs(arg)) {
13171315
std::string host_out;
13181316
uint16_t port_out{0};

0 commit comments

Comments
 (0)