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/rename.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sway/commands/rename.c') diff --git a/sway/commands/rename.c b/sway/commands/rename.c index 60a66d58..0d36cc21 100644 --- a/sway/commands/rename.c +++ b/sway/commands/rename.c @@ -26,7 +26,7 @@ struct cmd_results *cmd_rename(int argc, char **argv) { "Can't run this command while there's no outputs connected."); } if (strcasecmp(argv[0], "workspace") != 0) { - return cmd_results_new(CMD_INVALID, expected_syntax); + return cmd_results_new(CMD_INVALID, "%s", expected_syntax); } int argn = 1; @@ -65,7 +65,7 @@ struct cmd_results *cmd_rename(int argc, char **argv) { ++argn; // move past "to" if (argn >= argc) { - return cmd_results_new(CMD_INVALID, expected_syntax); + return cmd_results_new(CMD_INVALID, "%s", expected_syntax); } char *new_name = join_args(argv + argn, argc - argn); -- cgit v1.2.3