[Kdenlive-devel] [PATCH 09/16] kis_cubic_curve.cpp: initialize variables

Mikko Rapeli mikko.rapeli at iki.fi
Fri Aug 10 12:17:10 UTC 2012


Fixes Coverity CID 709308: Uninitialized scalar field (UNINIT_CTOR)

Non-static class member ""m_begin"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""m_end"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""m_intervals"" is not initialized in this constructor nor in any functions that it calls.
---
 src/kis_cubic_curve.cpp |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/kis_cubic_curve.cpp b/src/kis_cubic_curve.cpp
index 55b1223..a0bc58c 100644
--- a/src/kis_cubic_curve.cpp
+++ b/src/kis_cubic_curve.cpp
@@ -126,8 +126,9 @@ protected:
     int m_intervals;
 
 public:
-    KisCubicSpline() {}
-    KisCubicSpline(const QList<T_point> &a) {
+    KisCubicSpline() : m_begin(0), m_end(0), m_intervals(0) {}
+    KisCubicSpline(const QList<T_point> &a) : m_begin(0), m_end(0),
+      m_intervals(0) {
         createSpline(a);
     }
 
-- 
1.7.10.4





More information about the Kdenlive mailing list