aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/bind.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/bind.c')
-rw-r--r--sway/commands/bind.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sway/commands/bind.c b/sway/commands/bind.c
index c0b383db..979e178f 100644
--- a/sway/commands/bind.c
+++ b/sway/commands/bind.c
@@ -127,7 +127,7 @@ static struct cmd_results *identify_key(const char* name, bool first_key,
127 if (!button) { 127 if (!button) {
128 if (message) { 128 if (message) {
129 struct cmd_results *error = 129 struct cmd_results *error =
130 cmd_results_new(CMD_INVALID, message); 130 cmd_results_new(CMD_INVALID, "%s", message);
131 free(message); 131 free(message);
132 return error; 132 return error;
133 } else { 133 } else {
@@ -143,7 +143,7 @@ static struct cmd_results *identify_key(const char* name, bool first_key,
143 if (!button) { 143 if (!button) {
144 if (message) { 144 if (message) {
145 struct cmd_results *error = 145 struct cmd_results *error =
146 cmd_results_new(CMD_INVALID, message); 146 cmd_results_new(CMD_INVALID, "%s", message);
147 free(message); 147 free(message);
148 return error; 148 return error;
149 } else { 149 } else {
@@ -182,7 +182,7 @@ static struct cmd_results *identify_key(const char* name, bool first_key,
182 uint32_t button = get_mouse_bindsym(name, &message); 182 uint32_t button = get_mouse_bindsym(name, &message);
183 if (message) { 183 if (message) {
184 struct cmd_results *error = 184 struct cmd_results *error =
185 cmd_results_new(CMD_INVALID, message); 185 cmd_results_new(CMD_INVALID, "%s", message);
186 free(message); 186 free(message);
187 return error; 187 return error;
188 } else if (button) { 188 } else if (button) {
@@ -539,7 +539,7 @@ struct cmd_results *cmd_bind_or_unbind_switch(int argc, char **argv,
539 free_switch_binding(binding); 539 free_switch_binding(binding);
540 return cmd_results_new(CMD_FAILURE, 540 return cmd_results_new(CMD_FAILURE,
541 "Invalid %s command (expected binding with the form " 541 "Invalid %s command (expected binding with the form "
542 "<switch>:<state>)", bindtype, argc); 542 "<switch>:<state>)", bindtype);
543 } 543 }
544 if (strcmp(split->items[0], "tablet") == 0) { 544 if (strcmp(split->items[0], "tablet") == 0) {
545 binding->type = WLR_SWITCH_TYPE_TABLET_MODE; 545 binding->type = WLR_SWITCH_TYPE_TABLET_MODE;
@@ -549,7 +549,8 @@ struct cmd_results *cmd_bind_or_unbind_switch(int argc, char **argv,
549 free_switch_binding(binding); 549 free_switch_binding(binding);
550 return cmd_results_new(CMD_FAILURE, 550 return cmd_results_new(CMD_FAILURE,
551 "Invalid %s command (expected switch binding: " 551 "Invalid %s command (expected switch binding: "
552 "unknown switch %s)", bindtype, split->items[0]); 552 "unknown switch %s)", bindtype,
553 (const char *)split->items[0]);
553 } 554 }
554 if (strcmp(split->items[1], "on") == 0) { 555 if (strcmp(split->items[1], "on") == 0) {
555 binding->trigger = SWAY_SWITCH_TRIGGER_ON; 556 binding->trigger = SWAY_SWITCH_TRIGGER_ON;
@@ -562,7 +563,7 @@ struct cmd_results *cmd_bind_or_unbind_switch(int argc, char **argv,
562 return cmd_results_new(CMD_FAILURE, 563 return cmd_results_new(CMD_FAILURE,
563 "Invalid %s command " 564 "Invalid %s command "
564 "(expected switch state: unknown state %s)", 565 "(expected switch state: unknown state %s)",
565 bindtype, split->items[1]); 566 bindtype, (const char *)split->items[1]);
566 } 567 }
567 list_free_items_and_destroy(split); 568 list_free_items_and_destroy(split);
568 569