clean up a few -Wmaybe-uninitialized warnings in element.h:349, measure.cpp:2751, measure.cpp:2763
It be nice to keep the build compile log clean...I cleaned some a few weeks ago, but I just notice a few more -Wmaybe-uninitialized warnings appear recently:
-
https://travis-ci.org/musescore/MuseScore/jobs/118916841#L3349-L3354
/MuseScore/libmscore/element.h: In member function 'void Ms::Chord::layoutTablature()': /MuseScore/libmscore/element.h:349:77: warning: 'llY' may be used uninitialized in this function [-Wmaybe-uninitialized] void setPos(qreal x, qreal y) { _pos.rx() = x, _pos.ry() = y; } ^ /MuseScore/libmscore/chord.cpp:2152:13: note: 'llY' was declared here qreal llY;
-
https://travis-ci.org/musescore/MuseScore/jobs/118916841#L3395-L3398
/MuseScore/libmscore/measure.cpp:2751:63: warning: 'lastIdx' may be used uninitialized in this function [-Wmaybe-uninitialized] if (aspan < spanTot && staffIdx < lastIdx)
-
https://travis-ci.org/musescore/MuseScore/jobs/118916841#L3399-L3401
/MuseScore/libmscore/measure.cpp:2763:25: warning: 'spanTot' may be used uninitialized in this function [-Wmaybe-uninitialized] if (spanTot > 1 && spanTo <= 0 && span == 0) {
Comments
I'll wait and see if someone cleans them, else I'm going to.
Fixed in branch master, commit 66d75cc8cf
fix #103801: clean up a few -Wmaybe-uninitialized warnings
Automatically closed -- issue fixed for 2 weeks with no activity.