]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: htx: fix a used uninitialized warning on is_cookie2
authorWilly Tarreau <w@1wt.eu>
Mon, 15 Apr 2019 19:49:49 +0000 (21:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 15 Apr 2019 19:55:48 +0000 (21:55 +0200)
gcc-3.4 reports this which actually looks like a valid warning when
looking at the code, it's unsure why others didn't notice it :

src/proto_htx.c: In function `htx_manage_server_side_cookies':
src/proto_htx.c:4266: warning: 'is_cookie2' might be used uninitialized in this function

src/proto_htx.c

index 3c6df30798696db5937134c5ee53e15455dbc5ef..5643c625a42b083f097376697943ff165fefa713 100644 (file)
@@ -4263,7 +4263,7 @@ static void htx_manage_server_side_cookies(struct stream *s, struct channel *res
        struct server *srv;
        char *hdr_beg, *hdr_end;
        char *prev, *att_beg, *att_end, *equal, *val_beg, *val_end, *next;
-       int is_cookie2;
+       int is_cookie2 = 0;
 
        htx = htxbuf(&res->buf);