Bug 258470

Summary: devel/frink: fix build with clang 13
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: portmaster
Priority: --- Flags: portmaster: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 258209    
Attachments:
Description Flags
devel/frink: fix unused but set variables none

Description Dimitry Andric freebsd_committer freebsd_triage 2021-09-13 07:46:27 UTC
During an exp-run for llvm 13 (see bug 258209), it turned out that devel/frink fails to build with clang 13:

tcl.c:1467:14: error: variable 'rp' set but not used [-Werror,-Wunused-but-set-variable]
    VarData *rp;
             ^

There are a few of these in the code, which seems to be pretty much unmaintained, so I took the liberty of just removing the unused-but-set variables.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2021-09-13 07:47:17 UTC
Created attachment 227866 [details]
devel/frink: fix unused but set variables
Comment 2 Chris Hutchinson 2021-09-15 04:56:26 UTC
Comment on attachment 227866 [details]
devel/frink: fix unused but set variables

LGTM

Been real busy. Thank for doing this! :-)

--Chris
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-09-15 07:49:31 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9118b8848d5ad2b51d8af3ed72b45b618f5caf36

commit 9118b8848d5ad2b51d8af3ed72b45b618f5caf36
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-09-15 07:42:49 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-09-15 07:47:47 +0000

    devel/frink: fix unused but set variables

    Clang 13 now has a -Wunused-but-set-variable warning, which is emitted a
    few times in devel/frink. Remove the variables that were unused.

    PR:             258470
    Approved by:    portmaster@bsdforge.com (maintainer)
    MFH:            2021Q3

 devel/frink/Makefile            |  2 +-
 devel/frink/files/patch-tcl.c   | 72 +++++++++++++++++++++++++++++++----------
 devel/frink/files/patch-token.c | 37 +++++++++++++++------
 3 files changed, 84 insertions(+), 27 deletions(-)