mirror of
https://codeberg.org/kiss-community/repo
synced 2024-08-20 13:16:19 +00:00
sway: fix errors with llvm 13. See #343
This commit is contained in:
parent
c1f8803fac
commit
b4901ca141
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
patch -p1 < no-evdev.patch
|
patch -p1 < no-evdev.patch
|
||||||
|
patch -p1 < llvm-13.patch
|
||||||
|
|
||||||
# Default background color.
|
# Default background color.
|
||||||
sed 's/0.25f, 0.25f, 0.25f/0.929, 0.870, 0.678/' \
|
sed 's/0.25f, 0.25f, 0.25f/0.929, 0.870, 0.678/' \
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
8b138867cd83217de07138144b1279fe58e0421eb10c91122aa33c8770fe7391
|
8b138867cd83217de07138144b1279fe58e0421eb10c91122aa33c8770fe7391
|
||||||
a41a469d43e58c3c877c72750c6564deb8e6384e2b42080d17e9ec74622a5e42
|
a41a469d43e58c3c877c72750c6564deb8e6384e2b42080d17e9ec74622a5e42
|
||||||
|
9803de05490e2e84b2c79d634837aeb880ba5b29c1c485707593af40fdddc3f6
|
||||||
|
|
77
wayland/sway/patches/llvm-13.patch
Normal file
77
wayland/sway/patches/llvm-13.patch
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
From ff468584abddcb3f703d407aecf78137fb656472 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Evgeniy Khramtsov <evgeniy@khramtsov.org>
|
||||||
|
Date: Fri, 1 Oct 2021 16:11:39 +0300
|
||||||
|
Subject: [PATCH] commands: Remove unused code after 1d3681f52135
|
||||||
|
|
||||||
|
Clang 13 reports:
|
||||||
|
|
||||||
|
../sway/commands.c:470:23: error: variable 'context' set but not used
|
||||||
|
[-Werror,-Wunused-but-set-variable]
|
||||||
|
enum command_context context = 0;
|
||||||
|
^
|
||||||
|
Last use of was removed in commit 1d3681f52135.
|
||||||
|
|
||||||
|
Downstream PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258813
|
||||||
|
---
|
||||||
|
include/sway/config.h | 8 --------
|
||||||
|
sway/commands.c | 28 ----------------------------
|
||||||
|
2 files changed, 36 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/sway/config.h b/include/sway/config.h
|
||||||
|
index 52867fa665..46dd4ffe4d 100644
|
||||||
|
--- a/include/sway/config.h
|
||||||
|
+++ b/include/sway/config.h
|
||||||
|
@@ -418,14 +418,6 @@ enum sway_popup_during_fullscreen {
|
||||||
|
POPUP_LEAVE,
|
||||||
|
};
|
||||||
|
|
||||||
|
-enum command_context {
|
||||||
|
- CONTEXT_CONFIG = 1 << 0,
|
||||||
|
- CONTEXT_BINDING = 1 << 1,
|
||||||
|
- CONTEXT_IPC = 1 << 2,
|
||||||
|
- CONTEXT_CRITERIA = 1 << 3,
|
||||||
|
- CONTEXT_ALL = 0xFFFFFFFF,
|
||||||
|
-};
|
||||||
|
-
|
||||||
|
enum focus_follows_mouse_mode {
|
||||||
|
FOLLOWS_NO,
|
||||||
|
FOLLOWS_YES,
|
||||||
|
diff --git a/sway/commands.c b/sway/commands.c
|
||||||
|
index b09a04c71d..205406ad2a 100644
|
||||||
|
--- a/sway/commands.c
|
||||||
|
+++ b/sway/commands.c
|
||||||
|
@@ -465,34 +465,6 @@ struct cmd_results *config_commands_command(char *exec) {
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
- enum command_context context = 0;
|
||||||
|
-
|
||||||
|
- struct {
|
||||||
|
- char *name;
|
||||||
|
- enum command_context context;
|
||||||
|
- } context_names[] = {
|
||||||
|
- { "config", CONTEXT_CONFIG },
|
||||||
|
- { "binding", CONTEXT_BINDING },
|
||||||
|
- { "ipc", CONTEXT_IPC },
|
||||||
|
- { "criteria", CONTEXT_CRITERIA },
|
||||||
|
- { "all", CONTEXT_ALL },
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- for (int i = 1; i < argc; ++i) {
|
||||||
|
- size_t j;
|
||||||
|
- for (j = 0; j < sizeof(context_names) / sizeof(context_names[0]); ++j) {
|
||||||
|
- if (strcmp(context_names[j].name, argv[i]) == 0) {
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- if (j == sizeof(context_names) / sizeof(context_names[0])) {
|
||||||
|
- results = cmd_results_new(CMD_INVALID,
|
||||||
|
- "Invalid command context %s", argv[i]);
|
||||||
|
- goto cleanup;
|
||||||
|
- }
|
||||||
|
- context |= context_names[j].context;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
results = cmd_results_new(CMD_SUCCESS, NULL);
|
||||||
|
|
||||||
|
cleanup:
|
|
@ -1,2 +1,3 @@
|
||||||
https://github.com/swaywm/sway/releases/download/VERSION/sway-VERSION.tar.gz
|
https://github.com/swaywm/sway/releases/download/VERSION/sway-VERSION.tar.gz
|
||||||
patches/no-evdev.patch
|
patches/no-evdev.patch
|
||||||
|
patches/llvm-13.patch
|
||||||
|
|
Loading…
Reference in New Issue
Block a user