From 8e055f1d4cce4e41c3e97156b7276c6e9edf3e5c Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 15 Feb 2012 12:19:01 +0300 Subject: [PATCH] extra: remove a variable from match_comparison() Use expr->op directly instead of saving it in the "comparison" variable. Also I've removed a message that used the "comparison" variable. The message wasn't printed in the kernel, and if we find bugs here later we can add debugging code as needed. Signed-off-by: Dan Carpenter --- smatch_extra.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/smatch_extra.c b/smatch_extra.c index 35ac2df5..87124bdc 100644 --- a/smatch_extra.c +++ b/smatch_extra.c @@ -690,7 +690,6 @@ static void match_comparison(struct expression *expr) struct smatch_state *false_state; struct smatch_state *orig; int left = 0; - int comparison = expr->op; struct expression *varies; int postop = 0; @@ -717,7 +716,7 @@ static void match_comparison(struct expression *expr) if (!orig) orig = extra_undefined(); - switch (comparison) { + switch (expr->op) { case '<': case SPECIAL_UNSIGNED_LT: if (left) { @@ -773,7 +772,6 @@ static void match_comparison(struct expression *expr) false_state = alloc_extra_state_empty(); break; default: - sm_msg("unhandled comparison %d\n", comparison); return; } -- 2.11.4.GIT