From a7b50f6c9cbded863475cc7b60d048636750ef6a Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 28 Feb 2023 16:24:03 +0100 Subject: commands: add printf attribute to cmd_results_new() And fix the resulting build failures. --- sway/commands/input/map_to_region.c | 2 +- sway/commands/input/scroll_button.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sway/commands/input') 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) { error: free(ic->mapped_to_region); ic->mapped_to_region = NULL; - return cmd_results_new(CMD_FAILURE, errstr); + return cmd_results_new(CMD_FAILURE, "%s", errstr); } 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) { char *message = NULL; uint32_t button = get_mouse_button(*argv, &message); if (message) { - error = cmd_results_new(CMD_INVALID, message); + error = cmd_results_new(CMD_INVALID, "%s", message); free(message); return error; } else if (button == SWAY_SCROLL_UP || button == SWAY_SCROLL_DOWN -- cgit v1.2.3-54-g00ecf