diff options
author | Matyas Liptak <matyas@summitto.com> | 2019-08-26 15:25:41 +0200 |
---|---|---|
committer | Matyas Liptak <matyas@summitto.com> | 2019-08-27 09:17:34 +0200 |
commit | f56e16021729b6b4e92051051d5cd3cb3ba57660 (patch) | |
tree | 8b249de6a42a264c9b552c62afcde86a59c5c5a5 /tests/unit_tests/output_distribution.cpp | |
parent | Merge pull request #5827 (diff) | |
download | monero-f56e16021729b6b4e92051051d5cd3cb3ba57660.tar.xz |
unit_tests: Fix uninitialized values
- Initialize the `hash` in the `get_block_hash()` function of the
`output_distribution` unit test explicitly, to silence `valgrind`
warnings.
Diffstat (limited to '')
-rw-r--r-- | tests/unit_tests/output_distribution.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit_tests/output_distribution.cpp b/tests/unit_tests/output_distribution.cpp index 38f442c59..eec694d1e 100644 --- a/tests/unit_tests/output_distribution.cpp +++ b/tests/unit_tests/output_distribution.cpp @@ -93,7 +93,7 @@ bool get_output_distribution(uint64_t amount, uint64_t from, uint64_t to, uint64 crypto::hash get_block_hash(uint64_t height) { - crypto::hash hash; + crypto::hash hash = crypto::null_hash; *((uint64_t*)&hash) = height; return hash; } |