aboutsummaryrefslogtreecommitdiff
path: root/package/quazip
diff options
context:
space:
mode:
authorGravatar Fabrice Fontaine <fontaine.fabrice@gmail.com>2019-08-10 20:16:10 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-08-11 15:04:47 +0200
commit5f98f83f52c687ebf18794b9725b4ca42726a9f8 (patch)
treec076e3138dcb04965bd541be0acc958f278767ab /package/quazip
parent64f78043506ae22ee7a25642b7f7cfdd2722d2b6 (diff)
downloadbuildroot-5f98f83f52c687ebf18794b9725b4ca42726a9f8.tar.gz
buildroot-5f98f83f52c687ebf18794b9725b4ca42726a9f8.tar.bz2
package/quazip: fix qztest build error
Fixes: - http://autobuild.buildroot.org/results/2bc996414efa32194f7469840b0117f71a2df55a Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package/quazip')
-rw-r--r--package/quazip/0001-fix-qztest-build-error.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/package/quazip/0001-fix-qztest-build-error.patch b/package/quazip/0001-fix-qztest-build-error.patch
new file mode 100644
index 0000000000..6bbe820a0d
--- /dev/null
+++ b/package/quazip/0001-fix-qztest-build-error.patch
@@ -0,0 +1,36 @@
+From df8a2c4f18293cb2eafcf81e5dc169a06dccf304 Mon Sep 17 00:00:00 2001
+From: tsteven4 <13596209+tsteven4@users.noreply.github.com>
+Date: Tue, 9 Jul 2019 16:42:28 -0600
+Subject: [PATCH] fix qztest build error.
+
+If int is bigger than quint16 then you will get the following
+linker error:
+
+.obj/testquazip.o: In function `TestQuaZip::setOsCode()':
+testquazip.cpp:(.text+0x42bd): undefined reference to `bool QTest::qCompare<int, unsigned short>(int const&, unsigned short const&, char const*, char const*, char const*, int)'
+collect2: error: ld returned 1 exit status
+
+This error indicates the two parameters of QCOMPARE do not have the same type.
+
+This occurs because integral promotions can be applied to fi.versionCreated.
+
+[Retrieved from:
+https://github.com/stachenov/quazip/commit/df8a2c4f18293cb2eafcf81e5dc169a06dccf304]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ qztest/testquazip.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/qztest/testquazip.cpp b/qztest/testquazip.cpp
+index 70a64fc..86f6556 100644
+--- a/qztest/testquazip.cpp
++++ b/qztest/testquazip.cpp
+@@ -233,7 +233,7 @@ void TestQuaZip::setOsCode()
+ checkZip.goToFirstFile();
+ QuaZipFileInfo64 fi;
+ QVERIFY(checkZip.getCurrentFileInfo(&fi));
+- QCOMPARE(fi.versionCreated >> 8, static_cast<quint16>(osCode));
++ QCOMPARE(static_cast<uint>(fi.versionCreated) >> 8, osCode);
+ }
+
+ void TestQuaZip::setDataDescriptorWritingEnabled()