mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 06:41:32 +02:00
BUILD: http: stop gcc-4.1.2 from complaining about possibly uninitialized values
The three warnings below are totally wrong since the variables depend on another one which is only turned on when the variables are initialized. Still this gcc-4.1.2 isn't able to see this and prefers to complain wrongly. So let's initialize the variables to shut it up since we're not in the fast path. src/proto_http.c: In function 'acl_fetch_any_cookie_cnt': src/proto_http.c:8393: warning: 'val_end' may be used uninitialized in this function src/proto_http.c: In function 'http_process_req_stat_post': src/proto_http.c:2577: warning: 'st_next_param' may be used uninitialized in this function src/proto_http.c:2577: warning: 'st_cur_param' may be used uninitialized in this function
This commit is contained in:
parent
3fb818c014
commit
46787ed700
@ -2574,7 +2574,8 @@ int http_process_req_stat_post(struct stream_interface *si, struct http_txn *txn
|
|||||||
int altered_servers = 0;
|
int altered_servers = 0;
|
||||||
|
|
||||||
char *first_param, *cur_param, *next_param, *end_params;
|
char *first_param, *cur_param, *next_param, *end_params;
|
||||||
char *st_cur_param, *st_next_param;
|
char *st_cur_param = NULL;
|
||||||
|
char *st_next_param = NULL;
|
||||||
|
|
||||||
first_param = req->data + txn->req.eoh + 2;
|
first_param = req->data + txn->req.eoh + 2;
|
||||||
end_params = first_param + txn->req.body_len;
|
end_params = first_param + txn->req.body_len;
|
||||||
@ -8395,7 +8396,7 @@ acl_fetch_any_cookie_cnt(struct proxy *px, struct session *l4, void *l7, char *s
|
|||||||
if (!txn)
|
if (!txn)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
val_beg = NULL;
|
val_end = val_beg = NULL;
|
||||||
ctx.idx = 0;
|
ctx.idx = 0;
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user