Bug 258470 - devel/frink: fix build with clang 13
Summary: devel/frink: fix build with clang 13
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 258209
  Show dependency treegraph
 
Reported: 2021-09-13 07:46 UTC by Dimitry Andric
Modified: 2021-09-15 07:50 UTC (History)
1 user (show)

See Also:
portmaster: maintainer-feedback+


Attachments
devel/frink: fix unused but set variables (7.88 KB, patch)
2021-09-13 07:47 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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(-)