From cf42c7da380ad562985a6a2c711da020d5babc9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 2 May 2024 21:34:50 +0200 Subject: alias: remove unused variable "args_count" --- src/plugins/alias/alias.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src') diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index 49ec65320..4f586b196 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -159,7 +159,7 @@ alias_replace_args (const char *alias_args, const char *user_args) { char **argv, **result, *temp; const char *start, *pos; - int n, m, argc, args_count, offset; + int n, m, argc, offset; if (!alias_args || !user_args) return NULL; @@ -171,7 +171,6 @@ alias_replace_args (const char *alias_args, const char *user_args) 0, &argc); result = weechat_string_dyn_alloc (128); - args_count = 0; start = alias_args; pos = start; while (pos && pos[0]) @@ -191,7 +190,6 @@ alias_replace_args (const char *alias_args, const char *user_args) if (pos[1] == '*') { /* replace with all arguments */ - args_count++; offset = 2; if (pos > start) alias_string_add_word_range (result, start, pos); @@ -200,7 +198,6 @@ alias_replace_args (const char *alias_args, const char *user_args) else if (pos[1] == '&') { /* replace with all arguments, auto-escaping double quotes */ - args_count++; offset = 2; if (pos > start) alias_string_add_word_range (result, start, pos); @@ -214,7 +211,6 @@ alias_replace_args (const char *alias_args, const char *user_args) else if (pos[1] == '~') { /* replace with last argument */ - args_count++; offset = 2; if (pos > start) alias_string_add_word_range (result, start, pos); @@ -224,7 +220,6 @@ alias_replace_args (const char *alias_args, const char *user_args) else if ((pos[1] == '-') && ALIAS_IS_ARG_NUMBER(pos[2])) { /* replace with arguments 1 to m */ - args_count++; offset = 3; if (pos > start) alias_string_add_word_range (result, start, pos); @@ -236,7 +231,6 @@ alias_replace_args (const char *alias_args, const char *user_args) } else if (ALIAS_IS_ARG_NUMBER(pos[1])) { - args_count++; n = pos[1] - '1'; if (pos > start) alias_string_add_word_range (result, start, pos); -- cgit v1.2.3