aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/workspace.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/workspace.c
parentd6915f642858c65c9225a07e96dd65be70806def (diff)
commands: add printf attribute to cmd_results_new()
And fix the resulting build failures.
Diffstat (limited to 'sway/commands/workspace.c')
-rw-r--r--sway/commands/workspace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c
index a6a0beda..03e488ba 100644
--- a/sway/commands/workspace.c
+++ b/sway/commands/workspace.c
@@ -61,7 +61,7 @@ static struct cmd_results *cmd_workspace_gaps(int argc, char **argv,
const char expected[] = "Expected 'workspace <name> gaps "
"inner|outer|horizontal|vertical|top|right|bottom|left <px>'";
if (gaps_location == 0) {
- return cmd_results_new(CMD_INVALID, expected);
+ return cmd_results_new(CMD_INVALID, "%s", expected);
}
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "workspace", EXPECTED_EQUAL_TO,
@@ -79,7 +79,7 @@ static struct cmd_results *cmd_workspace_gaps(int argc, char **argv,
char *end;
int amount = strtol(argv[gaps_location + 2], &end, 10);
if (strlen(end)) {
- return cmd_results_new(CMD_FAILURE, expected);
+ return cmd_results_new(CMD_FAILURE, "%s", expected);
}
bool valid = false;
@@ -110,7 +110,7 @@ static struct cmd_results *cmd_workspace_gaps(int argc, char **argv,
}
}
if (!valid) {
- return cmd_results_new(CMD_INVALID, expected);
+ return cmd_results_new(CMD_INVALID, "%s", expected);
}
// Prevent invalid gaps configurations.
@@ -174,7 +174,7 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
}
if (root->fullscreen_global) {
- return cmd_results_new(CMD_FAILURE, "workspace",
+ return cmd_results_new(CMD_FAILURE,
"Can't switch workspaces while fullscreen global");
}