aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-11-15 14:37:13 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-11-15 14:39:37 -0500
commit384967f311b4c6b1d6c797f7821d25feb26bafbf (patch)
treedf3976014e6aa21e7399492e4de1a30d7f1f793e /src/script
parente74649e95122c9c61aadf607461cf701c3953f88 (diff)
parent9cc0230cfc1ae9b9c1c905cd9ac613bc98bfa43a (diff)
downloadbitcoin-384967f311b4c6b1d6c797f7821d25feb26bafbf.tar.xz
Merge #13815: util: Add [[nodiscard]] to all {Decode,Parse}[...](...) functions returning bool
9cc0230cfc Add NODISCARD to all {Decode,Parse}[...](...) functions returning bool. Sort includes. (practicalswift) 579497e77a tests: Explicitly ignore the return value of DecodeBase58(...) (practicalswift) 145fe95ec7 tests: Check return value of ParseParameters(...) (practicalswift) 7c5bc2a523 miner: Default to DEFAULT_BLOCK_MIN_TX_FEE if unable to parse -blockmintxfee (practicalswift) Pull request description: Changes in this PR: * ~~Add linter to make sure the return value of `Parse[...](...)` is checked~~ * Add `__attribute__((warn_unused_result))` to all `{Decode,Parse}[...](...)` functions returning `bool` * Fix violations Context: * #13712: `wallet: Fix non-determinism in ParseHDKeypath(...). Avoid using an uninitialized variable in path calculation.` would have been prevented by this Tree-SHA512: 41a97899f2d5a26584235fa02b1ebfb4faacd81ea97e927022955a658fa7e15d07a1443b4b7635151a43259a1adf8f2f4de3c1c75d7b5f09f0d5496463a1dae6
Diffstat (limited to 'src/script')
-rw-r--r--src/script/descriptor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp
index 90c4ddcc11..d343972c40 100644
--- a/src/script/descriptor.cpp
+++ b/src/script/descriptor.cpp
@@ -478,7 +478,7 @@ std::vector<Span<const char>> Split(const Span<const char>& sp, char sep)
}
/** Parse a key path, being passed a split list of elements (the first element is ignored). */
-bool ParseKeyPath(const std::vector<Span<const char>>& split, KeyPath& out)
+NODISCARD bool ParseKeyPath(const std::vector<Span<const char>>& split, KeyPath& out)
{
for (size_t i = 1; i < split.size(); ++i) {
Span<const char> elem = split[i];