[PATCH 2/4] smatch: delete unused variables

Arka Mondal <[email protected]>
Newsgroups org.kernel.vger.smatch
Message-ID <[email protected]>
These are left over from earlier changes.

Signed-off-by: Arka Mondal <[email protected]>
---
 check_implicit_dependencies.c | 6 +++---
 smatch_fn_arg_link.c          | 3 ---
 smatch_math.c                 | 2 --
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/check_implicit_dependencies.c b/check_implicit_dependencies.c
index 70bec2de..c7213dc6 100644
--- a/check_implicit_dependencies.c
+++ b/check_implicit_dependencies.c
@@ -247,21 +247,21 @@ static void match_condition(struct expression *expr)
 static void match_call_info(struct expression *expr)
 {
 	struct expression *arg;
-	int i;
+	// int i;
 
 	if (!__inline_fn || !cur_syscall)
 		return;
 
 	// prefix(); printf("fn: %s\n", expr->fn->symbol->ident->name);
 
-	i = 0;
+	// i = 0;
 	FOR_EACH_PTR(expr->args, arg) {
 		/*
 		   if (arg->type == EXPR_DEREF)
 		   printf("arg %d is deref\n", i);
 		 */
 		print_read_member_type(arg);
-		i++;
+		// i++;
 	} END_FOR_EACH_PTR(arg);
 }
 
diff --git a/smatch_fn_arg_link.c b/smatch_fn_arg_link.c
index daff38c4..41f69153 100644
--- a/smatch_fn_arg_link.c
+++ b/smatch_fn_arg_link.c
@@ -102,7 +102,6 @@ static int print_call_is_linked(struct expression *call)
 	struct expression *arg;
 	struct symbol *fn_sym;
 	struct symbol *arg_sym = NULL;
-	int i;
 
 	fn = strip_expr(call->fn);
 	tmp = get_assigned_expr(fn);
@@ -115,9 +114,7 @@ static int print_call_is_linked(struct expression *call)
 	if (!fn_sym)
 		return 0;
 
-	i = -1;
 	FOR_EACH_PTR(call->args, arg) {
-		i++;
 		tmp = get_assigned_expr(arg);
 		if (tmp)
 			arg = tmp;
diff --git a/smatch_math.c b/smatch_math.c
index 4dce8f87..e39d481a 100644
--- a/smatch_math.c
+++ b/smatch_math.c
@@ -172,7 +172,6 @@ static bool handle_array_address(struct expression *expr, int implied, int *recu
 
 static bool handle_address_member_offset(struct expression *expr, struct symbol *type, int implied, int *recurse_cnt, struct range_list **res, sval_t *res_sval)
 {
-	struct expression *orig = expr;
 	struct range_list *outer_rl;
 	sval_t offset = { .type = &ulong_ctype, .value = 0};
 	mtag_t tag;
@@ -230,7 +229,6 @@ static bool handle_address_member_offset(struct expression *expr, struct symbol
 
 static bool handle_ampersand_address(struct expression *expr, int implied, int *recurse_cnt, struct range_list **res, sval_t *res_sval)
 {
-	struct expression *orig = expr;
 	struct symbol *type;
 
 	/*
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.