Package: k3b / 2.0.3a-2

upstream_Fix-build-failure-when-compiling-with-GCC-5.patch Patch series | 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
From d5b1016e6a4c1dfcf681ce33ea9ffdd0dd5daf24 Mon Sep 17 00:00:00 2001
From: Armin K <krejzi@email.com>
Date: Mon, 4 May 2015 00:01:03 +0200
Subject: [PATCH] Fix build failure when compiling with GCC 5

REVIEW: 123431
---
 libk3b/projects/k3bcdrdaowriter.cpp             | 2 +-
 libk3b/tools/k3bwavefilewriter.cpp              | 4 ++--
 plugins/encoder/external/k3bexternalencoder.cpp | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libk3b/projects/k3bcdrdaowriter.cpp b/libk3b/projects/k3bcdrdaowriter.cpp
index 0d14408..dafb1bf 100644
--- a/libk3b/projects/k3bcdrdaowriter.cpp
+++ b/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 7aa6c1d..25b425f 100644
--- a/libk3b/tools/k3bwavefilewriter.cpp
+++ b/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 df9c576..d68f200 100644
--- a/plugins/encoder/external/k3bexternalencoder.cpp
+++ b/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;
     }
-- 
2.8.1