Bug 258813 - x11-wm/sway: suppress warning with Clang 13
Summary: x11-wm/sway: suppress warning 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 Only Me
Assignee: Jan Beich
URL:
Keywords: patch
Depends on:
Blocks: 258209
  Show dependency treegraph
 
Reported: 2021-09-30 17:00 UTC by Ghost
Modified: 2021-10-01 14:17 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (jbeich)


Attachments
v1 (use "git am") (1.05 KB, patch)
2021-09-30 17:00 UTC, Ghost
no flags Details | Diff
v2 (use "git am") (1.86 KB, patch)
2021-10-01 13:52 UTC, Ghost
no flags Details | Diff
v2.1 (1.86 KB, patch)
2021-10-01 14:10 UTC, Ghost
2khramtsov: maintainer-approval? (jbeich)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ghost 2021-09-30 17:00:28 UTC
Created attachment 228292 [details]
v1 (use "git am")

devel/llvm13 as system toolchain can't build x11-wm/sway. The attached workaround
fixes this for me. I'll file upstream PR today or tomorrow.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2021-09-30 18:14:02 UTC
I'll wait for upstream review. The warning can be easily fixed (not just silenced) by removing both declaration + assignment. The last use disappeared in https://github.com/swaywm/sway/commit/1d3681f52135
Comment 2 Ghost 2021-10-01 13:52:11 UTC
Created attachment 228323 [details]
v2 (use "git am")

Use upstreamed fix instead.
Comment 3 Ghost 2021-10-01 14:10:25 UTC
Created attachment 228324 [details]
v2.1
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-10-01 14:15:17 UTC
A commit in branch main references this bug:

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

commit b27dca4cada16827ca3282c60f8b13fb6fefe1f9
Author:     Evgeniy Khramtsov <evgeniy@khramtsov.org>
AuthorDate: 2021-10-01 13:49:33 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-10-01 14:12:52 +0000

    x11-wm/sway: unbreak build with Clang 13

    ../sway/commands.c:470:23: error: variable 'context' set but not used [-Werror,-Wunused-but-set-variable]
            enum command_context context = 0;
                                 ^

    PR:             258813

 x11-wm/sway/Makefile | 3 ++-
 x11-wm/sway/distinfo | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)