From 93aadbd1e4e3127f7799dff2ee2a0e9c027b70a7 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 2 Sep 2015 19:05:02 +0100 Subject: [PATCH] unit_tests: initialize a field to silence a valgrind report A memory chunk is split in two, and the concatenation of the two parts compared to the original, triggering a comparison with uninitialized (with a copy of itself, but valgrind does not realize that). --- tests/unit_tests/epee_levin_protocol_handler_async.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit_tests/epee_levin_protocol_handler_async.cpp b/tests/unit_tests/epee_levin_protocol_handler_async.cpp index 096133105..29ee9e87d 100644 --- a/tests/unit_tests/epee_levin_protocol_handler_async.cpp +++ b/tests/unit_tests/epee_levin_protocol_handler_async.cpp @@ -242,6 +242,7 @@ namespace m_req_head.m_cb = m_in_data.size(); m_req_head.m_have_to_return_data = true; m_req_head.m_command = expected_command; + m_req_head.m_return_code = 0; m_req_head.m_flags = LEVIN_PACKET_REQUEST; m_req_head.m_protocol_version = LEVIN_PROTOCOL_VER_1;