aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Stefan Sørensen <stefan@astylos.dk>2020-05-19 15:35:23 +0200
committerGravatar Yann E. MORIN <yann.morin.1998@free.fr>2020-05-19 20:49:05 +0200
commit42617caa720b96b66f00787b3d24b9bb18754e1e (patch)
treeebcb5f27f7a10009b67ba24719d0fd21cfff804a
parent9e9c242fb73fe19248c48ac28c083851d14f6813 (diff)
downloadbuildroot-42617caa720b96b66f00787b3d24b9bb18754e1e.tar.gz
buildroot-42617caa720b96b66f00787b3d24b9bb18754e1e.tar.bz2
package/p7zip: fix build with gcc 10
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
-rw-r--r--package/p7zip/0004-Fix-build-with-gcc-10.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/p7zip/0004-Fix-build-with-gcc-10.patch b/package/p7zip/0004-Fix-build-with-gcc-10.patch
new file mode 100644
index 0000000000..b01833db29
--- /dev/null
+++ b/package/p7zip/0004-Fix-build-with-gcc-10.patch
@@ -0,0 +1,32 @@
+From 78b760eae21d7b340c69e8abab8ca706e1e00adc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stefan=20S=C3=B8rensen?= <stefan.sorensen@spectralink.com>
+Date: Mon, 4 May 2020 09:19:46 +0200
+Subject: [PATCH] Fix build with gcc 10.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add cast to code that mixes HRESULT (aka long) and DWORD (aka unsigned
+int) which causes an narrowing error with gcc 10.
+
+Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
+---
+ CPP/Windows/ErrorMsg.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CPP/Windows/ErrorMsg.cpp b/CPP/Windows/ErrorMsg.cpp
+index 99684ae..ab48352 100644
+--- a/CPP/Windows/ErrorMsg.cpp
++++ b/CPP/Windows/ErrorMsg.cpp
+@@ -13,7 +13,7 @@ UString MyFormatMessage(DWORD errorCode)
+ const char * txt = 0;
+ AString msg;
+
+- switch(errorCode) {
++ switch((HRESULT)errorCode) {
+ case ERROR_NO_MORE_FILES : txt = "No more files"; break ;
+ case E_NOTIMPL : txt = "E_NOTIMPL"; break ;
+ case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ;
+--
+2.26.2
+