From 2a684cad5fc8e12a8e47a7fd00e2b7c66b43afb0 Mon Sep 17 00:00:00 2001 From: M Stoeckl Date: Thu, 10 Jan 2019 18:27:21 -0500 Subject: Remove now-unused "input" argument of cmd_results_new Patch tested by compiling with `__attribute__ ((format (printf, 2, 3)))` applied to `cmd_results_new`. String usage constants have been converted from pointers to arrays when encountered. General handler format strings were sometimes modified to include the old input string, especially for unknown command errors. --- sway/commands/border.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sway/commands/border.c') diff --git a/sway/commands/border.c b/sway/commands/border.c index d51741d2..6be5b794 100644 --- a/sway/commands/border.c +++ b/sway/commands/border.c @@ -64,8 +64,7 @@ struct cmd_results *cmd_border(int argc, char **argv) { struct sway_container *container = config->handler_context.container; if (!container || !container->view) { - return cmd_results_new(CMD_INVALID, "border", - "Only views can have borders"); + return cmd_results_new(CMD_INVALID, "Only views can have borders"); } struct sway_view *view = container->view; @@ -77,14 +76,14 @@ struct cmd_results *cmd_border(int argc, char **argv) { set_border(container, B_PIXEL); } else if (strcmp(argv[0], "csd") == 0) { if (!view || !view->xdg_decoration) { - return cmd_results_new(CMD_INVALID, "border", + return cmd_results_new(CMD_INVALID, "This window doesn't support client side decorations"); } set_border(container, B_CSD); } else if (strcmp(argv[0], "toggle") == 0) { border_toggle(container); } else { - return cmd_results_new(CMD_INVALID, "border", + return cmd_results_new(CMD_INVALID, "Expected 'border ' " "or 'border pixel '"); } @@ -98,5 +97,5 @@ struct cmd_results *cmd_border(int argc, char **argv) { arrange_container(container); - return cmd_results_new(CMD_SUCCESS, NULL, NULL); + return cmd_results_new(CMD_SUCCESS, NULL); } -- cgit v1.2.3