mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-19 00:13:33 +00:00
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)
This commit is contained in:
parent
4cd82bf550
commit
89909595ad
10
archivers/upx/files/patch-src_p__wcle.cpp
Normal file
10
archivers/upx/files/patch-src_p__wcle.cpp
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user