From 96879dc69ed4004375bcfbf334e598ea55f19326 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 27 Dec 2017 15:23:33 +0100 Subject: EncodeBuffer.cpp: add VALGRIND guard Same as in WriteBuffer.cpp Valgrind will complain about uninitialized data, but we are only writing to the memory here. --- nxcomp/src/EncodeBuffer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nxcomp') diff --git a/nxcomp/src/EncodeBuffer.cpp b/nxcomp/src/EncodeBuffer.cpp index e112113a8..6e6a30e77 100644 --- a/nxcomp/src/EncodeBuffer.cpp +++ b/nxcomp/src/EncodeBuffer.cpp @@ -70,6 +70,13 @@ EncodeBuffer::EncodeBuffer() initialSize_ = ENCODE_BUFFER_DEFAULT_SIZE; thresholdSize_ = ENCODE_BUFFER_DEFAULT_SIZE << 1; maximumSize_ = ENCODE_BUFFER_DEFAULT_SIZE << 4; + + #ifdef VALGRIND + + memset(buffer_, '\0', size_); + + #endif + } EncodeBuffer::~EncodeBuffer() -- cgit v1.2.3