File: cxx20-warnings.diff

package info (click to toggle)
musescore3 3.2.3%2Bdfsg2-21
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 219,852 kB
  • sloc: cpp: 291,412; xml: 200,226; sh: 3,779; ansic: 1,447; python: 393; makefile: 246; perl: 82; pascal: 79
file content (141 lines) | stat: -rw-r--r-- 5,985 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
Description: fix C++20 compatibility warnings by GCC 14
 and some other warnings shown
Author: mirabilos <tg@debian.org>
Forwarded: no
Justification: upstream only cares about 4.x these days
 (perhaps to 3.7?)

--- a/libmscore/articulation.cpp
+++ b/libmscore/articulation.cpp
@@ -522,6 +522,8 @@ Sid Articulation::getPropertyStyle(Pid i
                               return Sid::articulationAnchorOther;
                         }
                   }
+                  Q_ASSERT(false); // should never be reached
+                  Q_FALLTHROUGH();
             default:
                   return Sid::NOSTYLE;
             }
--- a/mscore/exportxml.cpp
+++ b/mscore/exportxml.cpp
@@ -4084,7 +4084,7 @@ static void repeatAtMeasureStart(XmlWrit
                   case ElementType::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
@@ -4127,7 +4127,7 @@ static void repeatAtMeasureStop(XmlWrite
                   case ElementType::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);
@@ -4141,7 +4141,7 @@ static void repeatAtMeasureStop(XmlWrite
                         }
                         break;
                   case ElementType::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/importgtp-gp6.cpp
+++ b/mscore/importgtp-gp6.cpp
@@ -2498,11 +2498,11 @@ void GuitarPro6::readGpif(QByteArray* da
                   if (c) {
                         slur->setTick2(c->tick());
                         score->addElement(slur);
-                        legatos[slur->track()] = 0;
+                        legatos[slur->track()] = nullptr;
                         }
                   else {
+                        legatos[slur->track()] = nullptr;
                         delete slur;
-                        legatos[slur->track()] = 0;
                         }
                   }
             }
--- a/mscore/importmxmlpass2.cpp
+++ b/mscore/importmxmlpass2.cpp
@@ -5349,7 +5349,7 @@ void MusicXMLParserNotations::slur()
       Q_ASSERT(_e.isStartElement() && _e.name() == "slur");
 
       Notation notation { _e.name().toString() };
-      for (const auto attr : _e.attributes()) {
+      for (const auto& attr : _e.attributes()) {
             notation.addAttribute(attr.name(), attr.value());
             }
       _notations.push_back(notation);
@@ -5724,7 +5724,7 @@ void MusicXMLParserNotations::mordentNor
       Q_ASSERT(_e.isStartElement() && (_e.name() == "mordent" || _e.name() == "inverted-mordent"));
 
       Notation notation { _e.name().toString() };
-      for (const auto attr : _e.attributes()) {
+      for (const auto& attr : _e.attributes()) {
             notation.addAttribute(attr.name(), attr.value());
             }
       notation.setText(_e.readElementText());
@@ -5747,7 +5747,7 @@ void MusicXMLParserNotations::glissandoS
       Q_ASSERT(_e.isStartElement() && (_e.name() == "glissando" || _e.name() == "slide"));
 
       Notation notation { _e.name().toString() };
-      for (const auto attr : _e.attributes()) {
+      for (const auto& attr : _e.attributes()) {
             notation.addAttribute(attr.name(), attr.value());
             }
       notation.setText(_e.readElementText());
--- a/omr/omrview.cpp
+++ b/omr/omrview.cpp
@@ -228,7 +228,7 @@ void OmrView::paintEvent(QPaintEvent* ev
             for (const OmrSystem& system : page->systems()) {
                   if (_showBarlines) {
                         p.setPen(QPen(Qt::blue, 3.0));
-                        for(const QLineF& l : system.barLines)
+                        for(const QLine& l : system.barLines)
                             for(int w1 = 0; w1 < 10; w1++)
                               p.drawLine(l.x1()+w1, l.y1(), l.x2()+w1, l.y2() ); //add width to barline
                         }
--- 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))