aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/workspace.c
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/workspace.c
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/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,
61 const char expected[] = "Expected 'workspace <name> gaps " 61 const char expected[] = "Expected 'workspace <name> gaps "
62 "inner|outer|horizontal|vertical|top|right|bottom|left <px>'"; 62 "inner|outer|horizontal|vertical|top|right|bottom|left <px>'";
63 if (gaps_location == 0) { 63 if (gaps_location == 0) {
64 return cmd_results_new(CMD_INVALID, expected); 64 return cmd_results_new(CMD_INVALID, "%s", expected);
65 } 65 }
66 struct cmd_results *error = NULL; 66 struct cmd_results *error = NULL;
67 if ((error = checkarg(argc, "workspace", EXPECTED_EQUAL_TO, 67 if ((error = checkarg(argc, "workspace", EXPECTED_EQUAL_TO,
@@ -79,7 +79,7 @@ static struct cmd_results *cmd_workspace_gaps(int argc, char **argv,
79 char *end; 79 char *end;
80 int amount = strtol(argv[gaps_location + 2], &end, 10); 80 int amount = strtol(argv[gaps_location + 2], &end, 10);
81 if (strlen(end)) { 81 if (strlen(end)) {
82 return cmd_results_new(CMD_FAILURE, expected); 82 return cmd_results_new(CMD_FAILURE, "%s", expected);
83 } 83 }
84 84
85 bool valid = false; 85 bool valid = false;
@@ -110,7 +110,7 @@ static struct cmd_results *cmd_workspace_gaps(int argc, char **argv,
110 } 110 }
111 } 111 }
112 if (!valid) { 112 if (!valid) {
113 return cmd_results_new(CMD_INVALID, expected); 113 return cmd_results_new(CMD_INVALID, "%s", expected);
114 } 114 }
115 115
116 // Prevent invalid gaps configurations. 116 // Prevent invalid gaps configurations.
@@ -174,7 +174,7 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
174 } 174 }
175 175
176 if (root->fullscreen_global) { 176 if (root->fullscreen_global) {
177 return cmd_results_new(CMD_FAILURE, "workspace", 177 return cmd_results_new(CMD_FAILURE,
178 "Can't switch workspaces while fullscreen global"); 178 "Can't switch workspaces while fullscreen global");
179 } 179 }
180 180