mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-05 00:55:44 +01:00
61180d814d
Signed-off-by: Larry Hajali <larryhaja[at]gmail[dot]com>
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 360aca397ad7230f102542ea3d67af95b7c8829e Mon Sep 17 00:00:00 2001
|
|
From: Wieland Hoffmann <themineo@gmail.com>
|
|
Date: Sun, 31 Jul 2016 15:55:46 +0200
|
|
Subject: [PATCH] Fix build failure on gcc 6
|
|
|
|
Array initializers for a char array fail for constants > 128
|
|
on platforms where char is signed. Cast to fix it.
|
|
|
|
This applies commit 632e87969c3a5562a5d4842b03613267ba6236b2 from the
|
|
acoustid-fingerprinter repository.
|
|
---
|
|
gzip.cpp | 5 ++---
|
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/gzip.cpp b/gzip.cpp
|
|
index 2aeaad3..d0b435a 100644
|
|
--- a/gzip.cpp
|
|
+++ b/gzip.cpp
|
|
@@ -23,12 +23,12 @@ inline unsigned long calculateCrc32(const QByteArray &data)
|
|
QByteArray gzipCompress(const QByteArray &data)
|
|
{
|
|
const char header[10] = {
|
|
- 0x1f, 0x8b, // ID1 + ID2
|
|
+ 0x1f, static_cast<char>(0x8b), // ID1 + ID2
|
|
8, // Compression Method
|
|
0, // Flags
|
|
0, 0, 0, 0, // Modification Time
|
|
2, // Extra Flags
|
|
- 255, // Operating System
|
|
+ static_cast<char>(255), // Operating System
|
|
};
|
|
|
|
QByteArray compressedData = qCompress(data);
|
|
@@ -42,4 +42,3 @@ QByteArray gzipCompress(const QByteArray &data)
|
|
result.append(render32BitInt(data.size()));
|
|
return result;
|
|
}
|
|
-
|