diff --git a/src/data/nmeaparser.cpp b/src/data/nmeaparser.cpp index 2b0e17ad..ae4033bd 100644 --- a/src/data/nmeaparser.cpp +++ b/src/data/nmeaparser.cpp @@ -429,7 +429,7 @@ bool NMEAParser::readZDA(CTX &ctx, const char *line, int len) { int col = 1; const char *vp = line; - int d, m, y; + int d = 0, m = 0, y = 0; for (const char *lp = line; lp < line + len; lp++) { if (*lp == ',' || *lp == '*') { diff --git a/src/map/textpathitem.cpp b/src/map/textpathitem.cpp index 710ca6f0..bc9c3c27 100644 --- a/src/map/textpathitem.cpp +++ b/src/map/textpathitem.cpp @@ -246,7 +246,7 @@ static QPainterPath textPath(const T &path, qreal textWidth, qreal charWidth, for (int i = 0; i < lines.size(); i++) { const QPolygonF &pl = lines.at(i); - qreal angle, length = 0; + qreal angle = 0, length = 0; int last = 0; for (int j = 1; j < pl.size(); j ++) {