aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/rename.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-02-28 16:24:03 +0100
committerSimon Ser <contact@emersion.fr>2023-04-14 18:34:54 +0200
commita7b50f6c9cbded863475cc7b60d048636750ef6a (patch)
tree30e8ef7ba82fb17e780448070a34e22edf6b63bf /sway/commands/rename.c
parentd6915f642858c65c9225a07e96dd65be70806def (diff)
commands: add printf attribute to cmd_results_new()
And fix the resulting build failures.
Diffstat (limited to 'sway/commands/rename.c')
-rw-r--r--sway/commands/rename.c4
1 files changed, 2 insertions, 2 deletions
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);