mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 18:01:29 +00:00
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:
parent
aad2f444f0
commit
7ead20bfcf
|
@ -181,7 +181,7 @@ struct cmd_results *cmd_swap(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sway_container *current = config->handler_context.container;
|
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);
|
char *value = join_args(argv + 3, argc - 3);
|
||||||
if (strcasecmp(argv[2], "id") == 0) {
|
if (strcasecmp(argv[2], "id") == 0) {
|
||||||
|
|
Loading…
Reference in a new issue