Description: fix C++20 compatibility warnings by GCC 14
 and some other warnings shown
Author: mirabilos <tg@debian.org>
Forwarded: no

--- a/libmscore/ambitus.cpp
+++ b/libmscore/ambitus.cpp
@@ -548,7 +548,7 @@ void Ambitus::updateRange()
       int   lastTrack   = firstTrack + VOICES-1;
       int   pitchTop    = -1000;
       int   pitchBottom = 1000;
-      int   tpcTop, tpcBottom;
+      int   tpcTop = 0, tpcBottom = 0; // silence GCC
       int   trk;
       Measure* meas     = segment()->measure();
       Segment* segm     = meas->findSegment(Segment::Type::ChordRest, segment()->tick());
--- a/libmscore/mscore.h
+++ b/libmscore/mscore.h
@@ -507,13 +507,13 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Align);
 
 template <typename T> class QmlListAccess : public QQmlListProperty<T> {
 public:
-      QmlListAccess<T>(QObject* obj, std::vector<T*>& container)
+      QmlListAccess(QObject* obj, std::vector<T*>& container)
             : QQmlListProperty<T>(obj, &container, &stdVectorCount, &stdVectorAt) {};
 
-      QmlListAccess<T>(QObject* obj, QVector<T*>& container)
+      QmlListAccess(QObject* obj, QVector<T*>& container)
             : QQmlListProperty<T>(obj, &container, &qVectorCount, &qVectorAt) {};
 
-      QmlListAccess<T>(QObject* obj, QList<T*>& container)
+      QmlListAccess(QObject* obj, QList<T*>& container)
             : QQmlListProperty<T>(obj, &container, &qListCount, &qListAt) {};
 
       static int stdVectorCount(QQmlListProperty<T>* l)     { return static_cast<std::vector<T*>*>(l->data)->size(); }
--- a/mscore/exportxml.cpp
+++ b/mscore/exportxml.cpp
@@ -3933,7 +3933,7 @@ static void repeatAtMeasureStart(Xml& xm
                   case Element::Type::MARKER:
                         {
                         // filter out the markers at measure Start
-                        const Marker* const mk = static_cast<const Marker* const>(e);
+                        const Marker* const mk = static_cast<const Marker*>(e);
                         Marker::Type mtp = mk->markerType();
                         if (   mtp == Marker::Type::SEGNO
                                || mtp == Marker::Type::CODA
@@ -3976,7 +3976,7 @@ static void repeatAtMeasureStop(Xml& xml
                   case Element::Type::MARKER:
                         {
                         // filter out the markers at measure stop
-                        const Marker* const mk = static_cast<const Marker* const>(e);
+                        const Marker* const mk = static_cast<const Marker*>(e);
                         Marker::Type mtp = mk->markerType();
                         if (mtp == Marker::Type::FINE || mtp == Marker::Type::TOCODA) {
                               directionMarker(xml, mk);
@@ -3990,7 +3990,7 @@ static void repeatAtMeasureStop(Xml& xml
                         }
                         break;
                   case Element::Type::JUMP:
-                        directionJump(xml, static_cast<const Jump* const>(e));
+                        directionJump(xml, static_cast<const Jump*>(e));
                         break;
                   default:
                         qDebug("repeatAtMeasureStop: direction type %s at tick %d not implemented",
--- a/mscore/jackaudio.cpp
+++ b/mscore/jackaudio.cpp
@@ -141,7 +141,8 @@ QList<QString> JackAudio::inputPorts()
             if (!(flags & JackPortIsInput))
                   continue;
             char buffer[128];
-            strncpy(buffer, *p, 128);
+            strncpy(buffer, *p, sizeof(buffer) - 1);
+            buffer[sizeof(buffer) - 1] = 0;
             if (strncmp(buffer, "Mscore", 6) == 0)
                   continue;
             clientList.append(QString(buffer));
--- a/thirdparty/intervaltree/IntervalTree.h
+++ b/thirdparty/intervaltree/IntervalTree.h
@@ -58,13 +58,13 @@ public:
     intervalTree* right;
     int center;
 
-    IntervalTree<T,K>(void)
+    IntervalTree(void)
         : left(NULL)
         , right(NULL)
         , center(0)
     { }
 
-    IntervalTree<T,K>(const intervalTree& other) {
+    IntervalTree(const intervalTree& other) {
         center = other.center;
         intervals = other.intervals;
         if (other.left) {
@@ -99,7 +99,7 @@ public:
         return *this;
     }
 
-    IntervalTree<T,K>(
+    IntervalTree(
             intervalVector& ivals,
             unsigned int depth = 16,
             unsigned int minbucket = 64,
--- a/thirdparty/rtf2html/rtf2html.cpp
+++ b/thirdparty/rtf2html/rtf2html.cpp
@@ -203,7 +203,7 @@ QString rtf2html(const QString& iString)
                case rtf_keyword::rkw_fonttbl:
                {
                   font fnt;
-                  int font_num;
+                  int font_num=-1;
                   bool full_name=false;
                   bool in_font=false;
                   while (! (*buf_in=='}' && !in_font))
