mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 13:42:10 +02:00
18c1cc65e9kernel: improve BITCOINKERNEL_WARN_UNUSED_RESULT usage (stickies-v) Pull request description: Similar to `[[nodiscard]]`, `BITCOINKERNEL_WARN_UNUSED_RESULT` is used to indicate that ignoring a function's return value is almost certainly a bug. It is used in cases such as a resource leak (e.g. an owning handle returned by a `*_create` or `*_copy` function), or when the returned value is itself an error/status code. It is not used merely because discarding the result is wasteful, e.g. on getters or predicates. Fix the incorrect usage, and properly document the attribute. Having this clearly documented helps avoid bikeshedding on future PRs. ACKs for top commit: w0xlt: ACK18c1cc65e9stringintech: ACK18c1cc65sedited: ACK18c1cc65e9Tree-SHA512: ba5aa19f0b90ef12ed3c200449734d9aa67af166f2a2b29e321d3ec1e9b49483215c5078ae1dd945ea65650a2017f3101bf75abcc9d3388eb1a3d4c8070c22dd