aboutsummaryrefslogtreecommitdiff
path: root/nxcomp
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2017-12-27 15:23:33 +0100
committerUlrich Sibiller <uli42@gmx.de>2017-12-29 02:31:26 +0100
commit96879dc69ed4004375bcfbf334e598ea55f19326 (patch)
treec04ac7a1c43c2e32f620aab88d63d4051724ecab /nxcomp
parent6198e0376f9ce8130af3294fa284659f0055610d (diff)
downloadnx-libs-96879dc69ed4004375bcfbf334e598ea55f19326.tar.gz
nx-libs-96879dc69ed4004375bcfbf334e598ea55f19326.tar.bz2
nx-libs-96879dc69ed4004375bcfbf334e598ea55f19326.zip
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.
Diffstat (limited to 'nxcomp')
-rw-r--r--nxcomp/src/EncodeBuffer.cpp7
1 files changed, 7 insertions, 0 deletions
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()