From 7ead20bfcfbc3785d471944f4631b0144fdedeba Mon Sep 17 00:00:00 2001 From: sghctoma Date: Thu, 8 Nov 2018 13:57:04 +0100 Subject: [PATCH] Fix building with clang The "struct sway_container *other" variable in swap.c was potentially used uninitialized, depending on an "if" statement. --- sway/commands/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/commands/swap.c b/sway/commands/swap.c index 23e8d5836..99051395a 100644 --- a/sway/commands/swap.c +++ b/sway/commands/swap.c @@ -181,7 +181,7 @@ struct cmd_results *cmd_swap(int argc, char **argv) { } struct sway_container *current = config->handler_context.container; - struct sway_container *other; + struct sway_container *other = NULL; char *value = join_args(argv + 3, argc - 3); if (strcasecmp(argv[2], "id") == 0) {