From: Willy Tarreau Date: Tue, 4 Mar 2008 05:38:57 +0000 (+0100) Subject: [MINOR] silent gcc for a wrong warning X-Git-Tag: v1.3.15~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f863ac152a0bae59c493558e7018a96812336a05;p=thirdparty%2Fhaproxy.git [MINOR] silent gcc for a wrong warning gcc believes that avoididx may be used uninitialized, which is wrong. --- diff --git a/include/proto/backend.h b/include/proto/backend.h index c4ffe85226..1720105ca3 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)) {