[Kdenlive-devel] [PATCH 12/14] definitions.h: initialize ItemInfo
Mikko Rapeli
mikko.rapeli at iki.fi
Sun Jul 22 18:28:20 UTC 2012
Found by Coverity:
CID 709305: Uninitialized scalar variable (UNINIT)
Declaring variable "info".
191 ItemInfo info;
Using uninitialized value "info": field "info".track is uninitialized when calling "EffectStackEdit::transferParamDesc(QDomElement const &, ItemInfo, bool)". [show details]
192 m_effectEdit->transferParamDesc(QDomElement(), info, false);
193 }
194}
---
src/definitions.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/definitions.h b/src/definitions.h
index 1e03945..a48306e 100644
--- a/src/definitions.h
+++ b/src/definitions.h
@@ -83,7 +83,8 @@ struct TrackInfo {
typedef QMap<QString, QString> stringMap;
typedef QMap <int, QMap <int, QByteArray> > audioByteArray;
-struct ItemInfo {
+class ItemInfo {
+public:
/** startPos is the position where the clip starts on the track */
GenTime startPos;
/** endPos is the duration where the clip ends on the track */
@@ -93,6 +94,7 @@ struct ItemInfo {
/** cropDuration is the duration of the clip */
GenTime cropDuration;
int track;
+ ItemInfo() : track(0) {};
};
struct TransitionInfo {
--
1.7.10.4
More information about the Kdenlive
mailing list