From aa20793087531a8e8ee5f8c7c388d5161e308e1b Mon Sep 17 00:00:00 2001 From: evoskuil Date: Thu, 1 Jan 2026 11:40:16 -0500 Subject: [PATCH 1/2] Fix bogus g++ dangling ref warnings. --- src/error.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/error.cpp b/src/error.cpp index 73cbfb2ba..156bfe543 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -395,8 +395,7 @@ code asio_to_error_code(const boost_code& ec) NOEXCEPT // includes json codes code http_to_error_code(const boost_code& ec) NOEXCEPT { - static const auto& category = boost::beast::http:: - make_error_code(http_error_t::end_of_stream).category(); + static boost::beast::http::detail::http_error_category category{}; if (!ec) return error::success; @@ -439,8 +438,7 @@ code http_to_error_code(const boost_code& ec) NOEXCEPT // includes json codes code ws_to_error_code(const boost_code& ec) NOEXCEPT { - static const auto& category = boost::beast::websocket:: - make_error_code(ws_error_t::closed).category(); + static boost::beast::websocket::detail::error_codes category{}; if (!ec) return error::success; @@ -487,8 +485,7 @@ code ws_to_error_code(const boost_code& ec) NOEXCEPT code json_to_error_code(const boost_code& ec) NOEXCEPT { - static const auto& category = boost::json:: - make_error_code(json_error_t::syntax).category(); + static boost::json::detail::error_code_category_t category{}; if (!ec) return error::success; From da2704aacc1c05eb57006d5ef8f664d0da5e34df Mon Sep 17 00:00:00 2001 From: evoskuil Date: Thu, 1 Jan 2026 13:21:35 -0500 Subject: [PATCH 2/2] Comments. --- include/bitcoin/network/net/acceptor.hpp | 16 ++++++++-------- include/bitcoin/network/net/connector.hpp | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/bitcoin/network/net/acceptor.hpp b/include/bitcoin/network/net/acceptor.hpp index 5d5f8bc59..6e4eb4cc2 100644 --- a/include/bitcoin/network/net/acceptor.hpp +++ b/include/bitcoin/network/net/acceptor.hpp @@ -43,8 +43,8 @@ class BCT_API acceptor DELETE_COPY_MOVE(acceptor); - // Construct. - // ------------------------------------------------------------------------ + /// Construct. + /// ----------------------------------------------------------------------- /// Construct an instance. acceptor(const logger& log, asio::strand& strand, asio::io_context& service, @@ -53,8 +53,8 @@ class BCT_API acceptor /// Asserts/logs stopped. virtual ~acceptor() NOEXCEPT; - // Start/stop. - // ------------------------------------------------------------------------ + /// Start/stop. + /// ----------------------------------------------------------------------- /// Starts return operation_failed if not stopped. /// Start the listener on the specified ip address and port (call once). @@ -63,14 +63,14 @@ class BCT_API acceptor /// Cancel work (idempotent), handler signals completion. virtual void stop() NOEXCEPT; - // Properties. - // ------------------------------------------------------------------------ + /// Properties. + /// ----------------------------------------------------------------------- /// The local endpoint to which this acceptor is bound (requires strand). virtual config::authority local() const NOEXCEPT; - // Methods. - // ------------------------------------------------------------------------ + /// Methods. + /// ----------------------------------------------------------------------- /// Subsequent accepts may only be attempted following handler invocation. /// The socket parameter is nullptr unless success is returned. diff --git a/include/bitcoin/network/net/connector.hpp b/include/bitcoin/network/net/connector.hpp index 1e81a4110..69af2533a 100644 --- a/include/bitcoin/network/net/connector.hpp +++ b/include/bitcoin/network/net/connector.hpp @@ -46,8 +46,8 @@ class BCT_API connector DELETE_COPY_MOVE(connector); - // Construct. - // ------------------------------------------------------------------------ + /// Construct. + /// ----------------------------------------------------------------------- /// Construct an instance. connector(const logger& log, asio::strand& strand, @@ -57,14 +57,14 @@ class BCT_API connector /// Asserts/logs stopped. virtual ~connector() NOEXCEPT; - // Stop (no start). - // ------------------------------------------------------------------------ + /// Stop (no start). + /// ----------------------------------------------------------------------- /// Cancel work (idempotent), handler signals completion. virtual void stop() NOEXCEPT; - // Methods. - // ------------------------------------------------------------------------ + /// Methods. + /// ----------------------------------------------------------------------- /// Subsequent accepts may only be attempted following handler invocation. /// The socket parameter is nullptr unless success is returned.