From 9cadb8d0a567f2adc7846b7588e703cb24d5dff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 11 Nov 2016 21:37:35 +0100 Subject: [PATCH] Make coverity happy --- src/fitparser.cpp | 8 +++++++- src/igcparser.h | 3 ++- src/pathitem.cpp | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/fitparser.cpp b/src/fitparser.cpp index b25be212..97c39acf 100644 --- a/src/fitparser.cpp +++ b/src/fitparser.cpp @@ -14,6 +14,11 @@ FITParser::FITParser(QList &tracks, QList &routes, QList &waypoints) : Parser(tracks, routes, waypoints) { memset(_defs, 0, sizeof(_defs)); + + _device = 0; + _endian = 0; + _timestamp = 0; + _len = 0; } void FITParser::clearDefinitions() @@ -335,10 +340,11 @@ bool FITParser::parseHeader() bool FITParser::loadFile(QFile *file) { + bool ret = true; + _device = file; _endian = 0; _timestamp = 0; - bool ret = true; if (!parseHeader()) return false; diff --git a/src/igcparser.h b/src/igcparser.h index 41af6683..13a41f9e 100644 --- a/src/igcparser.h +++ b/src/igcparser.h @@ -10,7 +10,8 @@ class IGCParser : public Parser { public: IGCParser(QList &tracks, QList &routes, - QList &waypoints) : Parser(tracks, routes, waypoints) {} + QList &waypoints) : Parser(tracks, routes, waypoints) + {_errorLine = 0;} ~IGCParser() {} bool loadFile(QFile *file); diff --git a/src/pathitem.cpp b/src/pathitem.cpp index 63d0bd8c..1e62d194 100644 --- a/src/pathitem.cpp +++ b/src/pathitem.cpp @@ -26,6 +26,7 @@ PathItem::PathItem(QGraphicsItem *parent) : QGraphicsObject(parent) _pen = QPen(brush, PATH_WIDTH); _units = Metric; + _distance = 0; _marker = new MarkerItem(this);