[Kdenlive-devel] [PATCH 01/14] audioEnvelope.cpp: initialize Mean and StdDev to zero
Mikko Rapeli
mikko.rapeli at iki.fi
Sun Jul 22 18:28:09 UTC 2012
Found by Coverity:
At conditional (1): "this->m_length > 0" taking the true branch.
33 if (m_length > 0) {
34 Q_ASSERT(m_length+m_offset <= m_envelopeSize);
35 m_envelopeSize = m_length;
36 }
CID 709310: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member ""m_envelopeMean"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""m_envelopeStdDev"" is not initialized in this constructor nor in any functions that it calls.
37}
---
src/lib/audio/audioEnvelope.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/lib/audio/audioEnvelope.cpp b/src/lib/audio/audioEnvelope.cpp
index 203806f..00bda00 100644
--- a/src/lib/audio/audioEnvelope.cpp
+++ b/src/lib/audio/audioEnvelope.cpp
@@ -22,6 +22,8 @@ AudioEnvelope::AudioEnvelope(Mlt::Producer *producer, int offset, int length) :
m_length(length),
m_envelopeSize(producer->get_length()),
m_envelopeMax(0),
+ m_envelopeMean(0),
+ m_envelopeStdDev(0),
m_envelopeStdDevCalculated(false),
m_envelopeIsNormalized(false)
{
--
1.7.10.4
More information about the Kdenlive
mailing list