aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/input
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2023-02-28 16:24:03 +0100
committerLibravatar Simon Ser <contact@emersion.fr>2023-04-14 18:34:54 +0200
commita7b50f6c9cbded863475cc7b60d048636750ef6a (patch)
tree30e8ef7ba82fb17e780448070a34e22edf6b63bf /sway/commands/input
parentcommands/floating_minmax_size: fix error strings (diff)
downloadsway-a7b50f6c9cbded863475cc7b60d048636750ef6a.tar.gz
sway-a7b50f6c9cbded863475cc7b60d048636750ef6a.tar.zst
sway-a7b50f6c9cbded863475cc7b60d048636750ef6a.zip
commands: add printf attribute to cmd_results_new()
And fix the resulting build failures.
Diffstat (limited to 'sway/commands/input')
-rw-r--r--sway/commands/input/map_to_region.c2
-rw-r--r--sway/commands/input/scroll_button.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sway/commands/input/map_to_region.c b/sway/commands/input/map_to_region.c
index 284b57d0..ad535db2 100644
--- a/sway/commands/input/map_to_region.c
+++ b/sway/commands/input/map_to_region.c
@@ -49,5 +49,5 @@ struct cmd_results *input_cmd_map_to_region(int argc, char **argv) {
49error: 49error:
50 free(ic->mapped_to_region); 50 free(ic->mapped_to_region);
51 ic->mapped_to_region = NULL; 51 ic->mapped_to_region = NULL;
52 return cmd_results_new(CMD_FAILURE, errstr); 52 return cmd_results_new(CMD_FAILURE, "%s", errstr);
53} 53}
diff --git a/sway/commands/input/scroll_button.c b/sway/commands/input/scroll_button.c
index 6b331419..81f69a6d 100644
--- a/sway/commands/input/scroll_button.c
+++ b/sway/commands/input/scroll_button.c
@@ -21,7 +21,7 @@ struct cmd_results *input_cmd_scroll_button(int argc, char **argv) {
21 char *message = NULL; 21 char *message = NULL;
22 uint32_t button = get_mouse_button(*argv, &message); 22 uint32_t button = get_mouse_button(*argv, &message);
23 if (message) { 23 if (message) {
24 error = cmd_results_new(CMD_INVALID, message); 24 error = cmd_results_new(CMD_INVALID, "%s", message);
25 free(message); 25 free(message);
26 return error; 26 return error;
27 } else if (button == SWAY_SCROLL_UP || button == SWAY_SCROLL_DOWN 27 } else if (button == SWAY_SCROLL_UP || button == SWAY_SCROLL_DOWN