Skip to content

Commit

Permalink
Merge #29968: refactor: Avoid unused-variable warning in init.cpp
Browse files Browse the repository at this point in the history
fa9abf9 refactor: Avoid unused-variable warning in init.cpp (MarcoFalke)

Pull request description:

  Fixes #27679 (comment)

ACKs for top commit:
  TheCharlatan:
    ACK fa9abf9

Tree-SHA512: dcf56d7aa68578ba611a2dc591de036ab1d08f7f4dfb35d325ecf7241d8e17abc0af7005b96c44da9777adc36961b4da7fdde282a1ab0e0a6f229c8108923101
  • Loading branch information
fanquake committed May 2, 2024
2 parents 9d1a286 + fa9abf9 commit 3d28725
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/init.cpp
Expand Up @@ -1297,7 +1297,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
}
}

for (const auto &port_option : std::vector<std::pair<std::string, bool>>{
for ([[maybe_unused]] const auto& [arg, unix] : std::vector<std::pair<std::string, bool>>{
// arg name UNIX socket support
{"-i2psam", false},
{"-onion", true},
Expand All @@ -1309,10 +1309,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
{"-zmqpubhashtx", true},
{"-zmqpubrawblock", true},
{"-zmqpubrawtx", true},
{"-zmqpubsequence", true}
{"-zmqpubsequence", true},
}) {
const std::string arg{port_option.first};
const bool unix{port_option.second};
for (const std::string& socket_addr : args.GetArgs(arg)) {
std::string host_out;
uint16_t port_out{0};
Expand Down

0 comments on commit 3d28725

Please sign in to comment.