Looks like a very valid warning to me, strange that there is no such warning
in the Windows build

Just dropping the "> 0" part should fix it, I don't think ms.size() can ever
return something < 0.

-----Original Message-----
From: Jim Newton [mailto:jimka.i...@gmail.com] 
Sent: Tuesday, May 05, 2015 10:26 AM
To: mscore-developer@lists.sourceforge.net
Subject: [Mscore-developer] review of compiler warnings

I'm using xcode on the Mac when compiling musescore, and it issues lots of
warnings.
Looking at these, my opinion is that many (if not most) should be fixed.

Here is an example.  Indeed, the "return; // no parts read" seems really
wrong to me.

file importmxmlpass1.cpp, lin 582
Warning: Logical is only applied to the left hand side of this comparison.

static void determineMeasureStart(const QVector<Fraction>& ml,
QVector<Fraction>& ms)
      {
      ms.resize(ml.size());
      if (!ms.size() > 0)
            return;  // no parts read

      // first measure starts at t = 0
      ms[0] = Fraction(0, 1);
      // all others start at start time previous measure plus length
previous measure
      for (int i = 1; i < ml.size(); i++)
            ms[i] = ms.at(i - 1) + ml.at(i - 1);
      //for (int i = 0; i < ms.size(); i++)
      //      qDebug("measurestart ms[%d] %s", i + 1,
qPrintable(ms.at(i).print()));
      }



--
View this message in context:
http://dev-list.musescore.org/review-of-compiler-warnings-tp7579292.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

----------------------------------------------------------------------------
--
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications Performance
metrics, stats and reports that give you Actionable Insights Deep dive
visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
Mscore-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
Mscore-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mscore-developer

Reply via email to