Browse Source

lbalance: fix unused var warning.

/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 <rusty@rustcorp.com.au>
Rusty Russell 13 years ago
parent
commit
3b4e940a92
1 changed files with 1 additions and 2 deletions
  1. 1 2
      ccan/lbalance/lbalance.c

+ 1 - 2
ccan/lbalance/lbalance.c

@@ -242,7 +242,7 @@ void lbalance_task_free(struct lbalance_task *task,
  * are overloaded. */
  * are overloaded. */
 static unsigned int best_target(const struct lbalance *lb)
 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;
 	float best_f_max = -1.0, cliff = -1.0;
 
 
 #if 0
 #if 0
@@ -267,7 +267,6 @@ static unsigned int best_target(const struct lbalance *lb)
 #endif
 #endif
 			best_f_max = f - (f / (i + 1)) / 4;
 			best_f_max = f - (f / (i + 1)) / 4;
 			cliff = f - (f / (i + 1)) / 2;
 			cliff = f - (f / (i + 1)) / 2;
-			best = i;
 			found_drop = 0;
 			found_drop = 0;
 		} else if (!found_drop && f < cliff) {
 		} else if (!found_drop && f < cliff) {
 #if 0
 #if 0