aboutsummaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-09-27 18:46:16 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-10-02 10:48:13 +0000
commit89909595ad9b51a93554a9ee9db62c066c46a8bd (patch)
tree8948745a51588b6a5853d21b90f0067ad9e85f71 /archivers
parent4cd82bf550717be2695721cf3ae8ba790ce2b292 (diff)
downloadports-89909595ad9b51a93554a9ee9db62c066c46a8bd.tar.gz
ports-89909595ad9b51a93554a9ee9db62c066c46a8bd.zip
archivers/upx: fix build with clang 13
During an exp-run for llvm 13 (see bug 258209), it turned out that archivers/upx fails to build with clang 13: p_wcle.cpp:739:27: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable] unsigned count,object,n,r; ^ 1 error generated. This is because clang 13 now has a -Wunused-but-set-variable warning similar to gcc's, and it is enabled under -Wall. The p_wcle.cpp file has two instances where the 'n' variable is used for debugging purposes, but the first instance is marked with UNUSED(n). The second is not, triggering this warning. Fix it by also marking the second instance with UNUSED(n). PR: 258394 Approved by: maintainer timeout (3 weeks)
Diffstat (limited to 'archivers')
-rw-r--r--archivers/upx/files/patch-src_p__wcle.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/archivers/upx/files/patch-src_p__wcle.cpp b/archivers/upx/files/patch-src_p__wcle.cpp
new file mode 100644
index 000000000000..509eda2f9b10
--- /dev/null
+++ b/archivers/upx/files/patch-src_p__wcle.cpp
@@ -0,0 +1,10 @@
+--- src/p_wcle.cpp.orig 2018-08-26 02:58:09 UTC
++++ src/p_wcle.cpp
+@@ -763,6 +763,7 @@ void PackWcle::decodeEntryTable()
+ }
+
+ //if (Opt_debug) printf("\n%d entries decoded.\n",n);
++ UNUSED(n);
+
+ soentries = ptr_diff(p, ientries) + 1;
+ oentries = ientries;