From f863ac152a0bae59c493558e7018a96812336a05 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w@1wt.eu>
Date: Tue, 4 Mar 2008 06:38:57 +0100
Subject: [PATCH] [MINOR] silent gcc for a wrong warning

gcc believes that avoididx may be used uninitialized, which is wrong.
---
 include/proto/backend.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/proto/backend.h b/include/proto/backend.h
index c4ffe8522..1720105ca 100644
--- a/include/proto/backend.h
+++ b/include/proto/backend.h
@@ -66,6 +66,7 @@ static inline struct server *get_server_rr_with_conns(struct proxy *px, struct s
 	newidx = px->lbprm.map.rr_idx;
 
 	avoided = NULL;
+	avoididx = 0; /* shut a gcc warning */
 	do {
 		srv = px->lbprm.map.srv[newidx++];
 		if (!srv->maxconn || srv->cur_sess < srv_dynamic_maxconn(srv)) {