diff options
author | Simon Ser <contact@emersion.fr> | 2023-02-28 16:24:03 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-04-14 18:34:54 +0200 |
commit | a7b50f6c9cbded863475cc7b60d048636750ef6a (patch) | |
tree | 30e8ef7ba82fb17e780448070a34e22edf6b63bf /sway/commands.c | |
parent | commands/floating_minmax_size: fix error strings (diff) | |
download | sway-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.c')
-rw-r--r-- | sway/commands.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sway/commands.c b/sway/commands.c index 28e9d8d2..0ea44129 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -381,10 +381,13 @@ struct cmd_results *config_command(char *exec, char **new_block) { | |||
381 | sway_log(SWAY_INFO, "Config command: %s", exec); | 381 | sway_log(SWAY_INFO, "Config command: %s", exec); |
382 | const struct cmd_handler *handler = find_core_handler(argv[0]); | 382 | const struct cmd_handler *handler = find_core_handler(argv[0]); |
383 | if (!handler || !handler->handle) { | 383 | if (!handler || !handler->handle) { |
384 | const char *error = handler | 384 | if (handler) { |
385 | ? "Command '%s' is shimmed, but unimplemented" | 385 | results = cmd_results_new(CMD_INVALID, |
386 | : "Unknown/invalid command '%s'"; | 386 | "Command '%s' is shimmed, but unimplemented", argv[0]); |
387 | results = cmd_results_new(CMD_INVALID, error, argv[0]); | 387 | } else { |
388 | results = cmd_results_new(CMD_INVALID, | ||
389 | "Unknown/invalid command '%s'", argv[0]); | ||
390 | } | ||
388 | goto cleanup; | 391 | goto cleanup; |
389 | } | 392 | } |
390 | 393 | ||