Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Oct 2021 10:51:36 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 89909595ad9b - main - archivers/upx: fix build with clang 13
Message-ID:  <202110021051.192Apaa9043497@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim (src committer):

URL: https://cgit.FreeBSD.org/ports/commit/?id=89909595ad9b51a93554a9ee9db62c066c46a8bd

commit 89909595ad9b51a93554a9ee9db62c066c46a8bd
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-09-27 18:46:16 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-10-02 10:48:13 +0000

    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)
---
 archivers/upx/files/patch-src_p__wcle.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110021051.192Apaa9043497>