qt5-5.7.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 360aca397ad7230f102542ea3d67af95b7c8829e Mon Sep 17 00:00:00 2001
  2. From: Wieland Hoffmann <themineo@gmail.com>
  3. Date: Sun, 31 Jul 2016 15:55:46 +0200
  4. Subject: [PATCH] Fix build failure on gcc 6
  5. Array initializers for a char array fail for constants > 128
  6. on platforms where char is signed. Cast to fix it.
  7. This applies commit 632e87969c3a5562a5d4842b03613267ba6236b2 from the
  8. acoustid-fingerprinter repository.
  9. ---
  10. gzip.cpp | 5 ++---
  11. 1 file changed, 2 insertions(+), 3 deletions(-)
  12. diff --git a/gzip.cpp b/gzip.cpp
  13. index 2aeaad3..d0b435a 100644
  14. --- a/gzip.cpp
  15. +++ b/gzip.cpp
  16. @@ -23,12 +23,12 @@ inline unsigned long calculateCrc32(const QByteArray &data)
  17. QByteArray gzipCompress(const QByteArray &data)
  18. {
  19. const char header[10] = {
  20. - 0x1f, 0x8b, // ID1 + ID2
  21. + 0x1f, static_cast<char>(0x8b), // ID1 + ID2
  22. 8, // Compression Method
  23. 0, // Flags
  24. 0, 0, 0, 0, // Modification Time
  25. 2, // Extra Flags
  26. - 255, // Operating System
  27. + static_cast<char>(255), // Operating System
  28. };
  29. QByteArray compressedData = qCompress(data);
  30. @@ -42,4 +42,3 @@ QByteArray gzipCompress(const QByteArray &data)
  31. result.append(render32BitInt(data.size()));
  32. return result;
  33. }
  34. -