From: Willy Tarreau Date: Thu, 24 Apr 2014 18:26:41 +0000 (+0200) Subject: BUILD: stats: let gcc know that last_fwd cannot be used uninitialized... X-Git-Tag: v1.5-dev24~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cce3648e89a39de997082acc49efa1fc9b80cd7e;p=thirdparty%2Fhaproxy.git BUILD: stats: let gcc know that last_fwd cannot be used uninitialized... OK, for once it cannot easily know this one, and certain versions are emitting this harmless warning : src/dumpstats.c: In function 'http_stats_io_handler': src/dumpstats.c:4507:19: warning: 'last_fwd' may be used uninitialized in this function [-Wmaybe-uninitialized] --- diff --git a/src/dumpstats.c b/src/dumpstats.c index b35a5a85d3..dd017e191b 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -4462,7 +4462,7 @@ static void http_stats_io_handler(struct stream_interface *si) unsigned int prev_len = si->ib->buf->i; unsigned int data_len; unsigned int last_len; - unsigned int last_fwd; + unsigned int last_fwd = 0; if (appctx->ctx.stats.flags & STAT_CHUNKED) { /* One difficulty we're facing is that we must prevent