aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <evgeniy@khramtsov.org>2021-10-01 16:11:39 +0300
committerSimon Ser <contact@emersion.fr>2021-10-01 15:45:09 +0200
commitff468584abddcb3f703d407aecf78137fb656472 (patch)
tree9b17312b755ebf0fc0c06fba440c126e0e9b40d7 /sway
parentc43f1fbf1c0f9ec607854ab912324ce150c43f7b (diff)
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
Diffstat (limited to 'sway')
-rw-r--r--sway/commands.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/sway/commands.c b/sway/commands.c
index b09a04c7..205406ad 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: