summaryrefslogtreecommitdiff
path: root/sysutils/k3b-kde4/files/patch-git_d5b1016
blob: 6e8a960489399800dc24507a120e2ec7ac58af15 (plain) (blame)
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
Fix the build with clang 6, which defaults to -std=gnu++14

(slightly adapted to v2.0.3)

libk3b/tools/k3bwavefilewriter.cpp:120:19: error: constant expression evaluates to 172 which cannot be narrowed to type 'char' [-Wc++11-narrowing]
            0x44, 0xac, 0x00, 0x00, // 24
                  ^~~~
libk3b/tools/k3bwavefilewriter.cpp:120:19: note: insert an explicit cast to silence this issue
            0x44, 0xac, 0x00, 0x00, // 24
                  ^~~~
                  static_cast<char>( )
libk3b/tools/k3bwavefilewriter.cpp:121:19: error: constant expression evaluates to 177 which cannot be narrowed to type 'char' [-Wc++11-narrowing]
            0x10, 0xb1, 0x02, 0x00, // 28
                  ^~~~
libk3b/tools/k3bwavefilewriter.cpp:121:19: note: insert an explicit cast to silence this issue
            0x10, 0xb1, 0x02, 0x00, // 28
                  ^~~~
                  static_cast<char>( )

commit d5b1016e6a4c1dfcf681ce33ea9ffdd0dd5daf24
Author: Armin K <krejzi@email.com>
Date:   Mon May 4 00:01:03 2015 +0200

    Fix build failure when compiling with GCC 5

    REVIEW: 123431

diff --git a/libk3b/projects/k3bcdrdaowriter.cpp b/libk3b/projects/k3bcdrdaowriter.cpp
index 0d144086d..dafb1bf69 100644
--- libk3b/projects/k3bcdrdaowriter.cpp
+++ libk3b/projects/k3bcdrdaowriter.cpp
@@ -918,7 +918,7 @@ void K3b::CdrdaoWriter::parseCdrdaoWrote( const QString& line )
 
 void K3b::CdrdaoWriter::parseCdrdaoMessage()
 {
-    static const char msgSync[] = { 0xff, 0x00, 0xff, 0x00 };
+    static const unsigned char msgSync[] = { 0xff, 0x00, 0xff, 0x00 };
     unsigned int avail = m_comSock->bytesAvailable();
     unsigned int msgs = avail / ( sizeof(msgSync)+d->progressMsgSize );
     unsigned int count = 0;
diff --git a/libk3b/tools/k3bwavefilewriter.cpp b/libk3b/tools/k3bwavefilewriter.cpp
index 7aa6c1d67..25b425f50 100644
--- libk3b/tools/k3bwavefilewriter.cpp
+++ libk3b/tools/k3bwavefilewriter.cpp
@@ -109,7 +109,7 @@ void K3b::WaveFileWriter::write( const char* data, int len, Endianess e )
 
 void K3b::WaveFileWriter::writeEmptyHeader()
 {
-    static const char riffHeader[] =
+    static const unsigned char riffHeader[] =
         {
             0x52, 0x49, 0x46, 0x46, // 0  "RIFF"
             0x00, 0x00, 0x00, 0x00, // 4  wavSize
@@ -124,7 +124,7 @@ void K3b::WaveFileWriter::writeEmptyHeader()
             0x00, 0x00, 0x00, 0x00  // 40 byteCount
         };
 
-    m_outputStream.writeRawData( riffHeader, 44 );
+    m_outputStream.writeRawData( (const char*) riffHeader, 44 );
 }
 
 
diff --git a/plugins/encoder/external/k3bexternalencoder.cpp b/plugins/encoder/external/k3bexternalencoder.cpp
index df9c576d8..d68f2003b 100644
--- plugins/encoder/external/k3bexternalencoder.cpp
+++ plugins/encoder/external/k3bexternalencoder.cpp
@@ -37,7 +37,7 @@ K3B_EXPORT_PLUGIN(k3bexternalencoder, K3bExternalEncoder)
 Q_DECLARE_METATYPE( QProcess::ExitStatus )
 
 
-static const char s_riffHeader[] =
+static const unsigned char s_riffHeader[] =
 {
     0x52, 0x49, 0x46, 0x46, // 0  "RIFF"
     0x00, 0x00, 0x00, 0x00, // 4  wavSize
@@ -222,7 +222,7 @@ bool K3bExternalEncoder::writeWaveHeader()
     kDebug() << "(K3bExternalEncoder) writing wave header";
 
     // write the RIFF thing
-    if( d->process->write( s_riffHeader, 4 ) != 4 ) {
+    if( d->process->write( (const char*) s_riffHeader, 4 ) != 4 ) {
         kDebug() << "(K3bExternalEncoder) failed to write riff header.";
         return false;
     }
@@ -243,7 +243,7 @@ bool K3bExternalEncoder::writeWaveHeader()
     }
 
     // write static part of the header
-    if( d->process->write( s_riffHeader + 8, 32 ) != 32 ) {
+    if( d->process->write( (const char*) s_riffHeader + 8, 32 ) != 32 ) {
         kDebug() << "(K3bExternalEncoder) failed to write wave header.";
         return false;
     }