Fix building with clang

The "struct sway_container *other" variable in swap.c was potentially
used uninitialized, depending on an "if" statement.
This commit is contained in:
sghctoma 2018-11-08 13:57:04 +01:00
parent aad2f444f0
commit 7ead20bfcf

View file

@ -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) {