Bug 263616 - emulators/rtc: Fix build with 14-current
Summary: emulators/rtc: Fix build with 14-current
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-27 20:15 UTC by Jamie Landeg-Jones
Modified: 2022-05-14 16:42 UTC (History)
2 users (show)

See Also:
jamie: maintainer-feedback+


Attachments
patch to fix compile errors with clang13 (668 bytes, patch)
2022-04-27 20:15 UTC, Jamie Landeg-Jones
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jamie Landeg-Jones 2022-04-27 20:15:57 UTC
Created attachment 233551 [details]
patch to fix compile errors with clang13

Clang 13+ catches a previously missed unused variable.

As kmods compile with -Werror this caused the build to stop.

Fix the build.

Fix attached
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-05-14 16:41:28 UTC
A commit in branch main references this bug:

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

commit e2c8ca5df4d2b07fb124f9b7dfa9d9f62f120a5d
Author:     Jamie Landeg-Jones <jamie@catflap.org>
AuthorDate: 2022-05-14 16:34:13 +0000
Commit:     Dmitri Goutnik <dmgk@FreeBSD.org>
CommitDate: 2022-05-14 16:40:10 +0000

    emulators/rtc: Unbreak build with llvm13

    rtc.c:112:6: error: variable 'unit' set but not used [-Werror,-Wunused-but-set-variable]
            int unit;
                ^

    PR:             263616

 emulators/rtc/files/rtc.c | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 2 Dmitri Goutnik freebsd_committer freebsd_triage 2022-05-14 16:42:00 UTC
Committed, thanks!