[Kdenlive-devel] [PATCH 11/14] titledocument.cpp: initialize variables
Mikko Rapeli
mikko.rapeli at iki.fi
Sun Jul 22 18:28:19 UTC 2012
Found by Coverity:
60TitleDocument::TitleDocument()
61{
62 m_scene = NULL;
CID 709315: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member ""m_height"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""m_width"" is not initialized in this constructor nor in any functions that it calls.
63}
---
src/titledocument.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/titledocument.cpp b/src/titledocument.cpp
index dc198f2..95aff61 100644
--- a/src/titledocument.cpp
+++ b/src/titledocument.cpp
@@ -60,6 +60,8 @@ QByteArray fileToByteArray(const QString& filename)
TitleDocument::TitleDocument()
{
m_scene = NULL;
+ m_width = 0;
+ m_height = 0;
}
void TitleDocument::setScene(QGraphicsScene* _scene, int width, int height)
--
1.7.10.4
More information about the Kdenlive
mailing list