void-packages/srcpkgs/k3b/patches/fix-gcc6-narrowing.patch
Juergen Buchmueller b1abcec5bf k3b: fix gcc6 build
2016-09-22 18:38:47 +02:00

76 lines
3.1 KiB
Diff

Use characters instead of numeric constants to avoid the
gcc6 narrowing warning.
--- libk3b/tools/k3bwavefilewriter.cpp 2014-11-04 19:37:31.000000000 +0100
+++ libk3b/tools/k3bwavefilewriter.cpp 2016-09-22 18:26:13.443173213 +0200
@@ -111,17 +111,17 @@
{
static const char riffHeader[] =
{
- 0x52, 0x49, 0x46, 0x46, // 0 "RIFF"
- 0x00, 0x00, 0x00, 0x00, // 4 wavSize
- 0x57, 0x41, 0x56, 0x45, // 8 "WAVE"
- 0x66, 0x6d, 0x74, 0x20, // 12 "fmt "
- 0x10, 0x00, 0x00, 0x00, // 16
- 0x01, 0x00, 0x02, 0x00, // 20
- 0x44, 0xac, 0x00, 0x00, // 24
- 0x10, 0xb1, 0x02, 0x00, // 28
- 0x04, 0x00, 0x10, 0x00, // 32
- 0x64, 0x61, 0x74, 0x61, // 36 "data"
- 0x00, 0x00, 0x00, 0x00 // 40 byteCount
+ '\x52', '\x49', '\x46', '\x46', // 0 "RIFF"
+ '\x00', '\x00', '\x00', '\x00', // 4 wavSize
+ '\x57', '\x41', '\x56', '\x45', // 8 "WAVE"
+ '\x66', '\x6d', '\x74', '\x20', // 12 "fmt "
+ '\x10', '\x00', '\x00', '\x00', // 16
+ '\x01', '\x00', '\x02', '\x00', // 20
+ '\x44', '\xac', '\x00', '\x00', // 24
+ '\x10', '\xb1', '\x02', '\x00', // 28
+ '\x04', '\x00', '\x10', '\x00', // 32
+ '\x64', '\x61', '\x74', '\x61', // 36 "data"
+ '\x00', '\x00', '\x00', '\x00' // 40 byteCount
};
m_outputStream.writeRawData( riffHeader, 44 );
--- libk3b/projects/k3bcdrdaowriter.cpp 2014-11-04 19:37:31.000000000 +0100
+++ libk3b/projects/k3bcdrdaowriter.cpp 2016-09-22 18:30:15.231271203 +0200
@@ -908,7 +908,7 @@
void K3b::CdrdaoWriter::parseCdrdaoMessage()
{
- static const char msgSync[] = { 0xff, 0x00, 0xff, 0x00 };
+ static const char msgSync[] = { '\xff', '\x00', '\xff', '\x00' };
unsigned int avail = m_comSock->bytesAvailable();
unsigned int msgs = avail / ( sizeof(msgSync)+d->progressMsgSize );
unsigned int count = 0;
--- plugins/encoder/external/k3bexternalencoder.cpp 2014-11-04 19:37:31.000000000 +0100
+++ plugins/encoder/external/k3bexternalencoder.cpp 2016-09-22 18:33:15.300347286 +0200
@@ -39,17 +39,17 @@
static const char s_riffHeader[] =
{
- 0x52, 0x49, 0x46, 0x46, // 0 "RIFF"
- 0x00, 0x00, 0x00, 0x00, // 4 wavSize
- 0x57, 0x41, 0x56, 0x45, // 8 "WAVE"
- 0x66, 0x6d, 0x74, 0x20, // 12 "fmt "
- 0x10, 0x00, 0x00, 0x00, // 16
- 0x01, 0x00, 0x02, 0x00, // 20
- 0x44, 0xac, 0x00, 0x00, // 24
- 0x10, 0xb1, 0x02, 0x00, // 28
- 0x04, 0x00, 0x10, 0x00, // 32
- 0x64, 0x61, 0x74, 0x61, // 36 "data"
- 0x00, 0x00, 0x00, 0x00 // 40 byteCount
+ '\x52', '\x49', '\x46', '\x46', // 0 "RIFF"
+ '\x00', '\x00', '\x00', '\x00', // 4 wavSize
+ '\x57', '\x41', '\x56', '\x45', // 8 "WAVE"
+ '\x66', '\x6d', '\x74', '\x20', // 12 "fmt "
+ '\x10', '\x00', '\x00', '\x00', // 16
+ '\x01', '\x00', '\x02', '\x00', // 20
+ '\x44', '\xac', '\x00', '\x00', // 24
+ '\x10', '\xb1', '\x02', '\x00', // 28
+ '\x04', '\x00', '\x10', '\x00', // 32
+ '\x64', '\x61', '\x74', '\x61', // 36 "data"
+ '\x00', '\x00', '\x00', '\x00' // 40 byteCount
};