From 3b4e940a92de5de1adbc1d4945112105c0e68860 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 31 Oct 2012 21:35:41 +1030 Subject: [PATCH] lbalance: fix unused var warning. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit /home/rusty/devel/cvs/ccan/ccan/lbalance/lbalance.c:Compiling object files gave warnings: /home/rusty/devel/cvs/ccan/ccan/lbalance/lbalance.c: In function ‘best_target’: /home/rusty/devel/cvs/ccan/ccan/lbalance/lbalance.c:245:18: warning: variable ‘best’ set but not used [-Wunused-but-set-variable] Signed-off-by: Rusty Russell --- ccan/lbalance/lbalance.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ccan/lbalance/lbalance.c b/ccan/lbalance/lbalance.c index a350c81d..643750cf 100644 --- a/ccan/lbalance/lbalance.c +++ b/ccan/lbalance/lbalance.c @@ -242,7 +242,7 @@ void lbalance_task_free(struct lbalance_task *task, * are overloaded. */ static unsigned int best_target(const struct lbalance *lb) { - unsigned int i, best = 0, found_drop = 0; + unsigned int i, found_drop = 0; float best_f_max = -1.0, cliff = -1.0; #if 0 @@ -267,7 +267,6 @@ static unsigned int best_target(const struct lbalance *lb) #endif best_f_max = f - (f / (i + 1)) / 4; cliff = f - (f / (i + 1)) / 2; - best = i; found_drop = 0; } else if (!found_drop && f < cliff) { #if 0 -- 2.39.2