BUILD: h1: silence an initiialized warning with gcc-4.7 and -Os

Building h1.c with gcc-4.7 -Os produces the following warning:

  src/h1.c: In function 'h1_headers_to_hdr_list':
  src/h1.c:1101:36: warning: 'ptr' may be used uninitialized in this function [-Wmaybe-uninitialized]

In fact ptr may be taken from sl.rq.u.ptr which is only initialized after
passing through the relevant states, but gcc doesn't know which states
are visited. Adding an ALREADY_CHECKED() statement there is sufficient to
shut it up and doesn't affect the emitted code.

This may be backported to stable versions to make sure that builds on older
distros and systems is clean.

(cherry picked from commit 55d2e8577e5ae0e7ac0cdbf5201b4836b5d7ad3c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit c83e5448d3674496053f91a729dc0fc65a1b40a0)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 9057a7da4b759c8cbd46ade1a6237ae5c9e07928)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/h1.c b/src/h1.c
index 1e5223b..4c2e234 100644
--- a/src/h1.c
+++ b/src/h1.c
@@ -978,6 +978,11 @@
 				if (ret < 0) {
 					if (h1m->err_pos < -1) {
 						state = H1_MSG_LAST_LF;
+						/* WT: gcc seems to see a path where sl.rq.u.ptr was used
+						 * uninitialized, but it doesn't know that the function is
+						 * called with initial states making this impossible.
+						 */
+						ALREADY_CHECKED(sl.rq.u.ptr);
 						ptr = ((ret == -1) ? sl.rq.u.ptr : host->ptr); /* Set ptr on the error */
 						goto http_msg_invalid;
 					}