Bug 258813

Summary: x11-wm/sway: suppress warning with Clang 13
Product: Ports & Packages Reporter: Ghost <2khramtsov>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me CC: 2khramtsov, jbeich
Priority: --- Keywords: patch
Version: LatestFlags: bugzilla: maintainer-feedback? (jbeich)
Hardware: Any   
OS: Any   
See Also: https://github.com/swaywm/sway/pull/6566
Bug Depends on:    
Bug Blocks: 258209    
Attachments:
Description Flags
v1 (use "git am")
none
v2 (use "git am")
none
v2.1 2khramtsov: maintainer-approval? (jbeich)

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(-)