summaryrefslogtreecommitdiff
blob: 165db470592e4022b073c8013eb1ac98f3d410c3 (plain)
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
Fix GCC 6 failures caused by -Wnarrowing

--- a/utils/buildsmf/buildsmf.cpp
+++ b/utils/buildsmf/buildsmf.cpp
@@ -53,8 +53,8 @@
     m_engine->writeKeySignature(0, 2, major_mode); // D major (2 sharps)
 
     // system exclusive event
-    static char gsreset[] = { 0xf0, 0x41, 0x10, 0x42, 0x12, 
-                              0x40, 0x00, 0x7f, 0x00, 0x41, 0xf7 };
+    static char gsreset[] = { (char)0xf0, 0x41, 0x10, 0x42, 0x12, 
+                              0x40, 0x00, 0x7f, 0x00, 0x41, (char)0xf7 };
     m_engine->writeMidiEvent(0, system_exclusive, sizeof(gsreset), gsreset);
 
     // some note events
--- a/utils/testevents/testevents.cpp
+++ b/utils/testevents/testevents.cpp
@@ -262,7 +262,7 @@
     dumpEvent(new KeyPressEvent(5, 60, 124));
     dumpEvent(new ChanPressEvent(6, 111));
     dumpEvent(new PitchBendEvent(7, 1234));
-    char sysex[] = {0xf0, 0x41, 0x10, 0x42, 0x12, 0x40, 0, 0x7f, 0, 0x41, 0xf7};
+    char sysex[] = {(char)0xf0, 0x41, 0x10, 0x42, 0x12, 0x40, 0, 0x7f, 0, 0x41, (char)0xf7};
     dumpEvent(new SysExEvent(QByteArray(sysex, sizeof(sysex))));
     QString text = "This can be a copyright, song name, instrument, lyric...";
     TextEvent te(text, 3);