From: Willy Tarreau Date: Wed, 2 Mar 2022 13:38:11 +0000 (+0100) Subject: BUILD: conn_stream: avoid null-deref warnings on gcc 6 X-Git-Tag: v2.6-dev3~81 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e4149cdbc696430bc1ef6256ff38336b3e5c1544;p=thirdparty%2Fhaproxy.git BUILD: conn_stream: avoid null-deref warnings on gcc 6 gcc 6 continues its saga with excessive reports of null-deref warnings. This time it was in the IS_HTX_CS() macro. Let's use __cs_conn() after cs_conn() was checked. --- diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h index fffbc62291..e69f9c1701 100644 --- a/include/haproxy/conn_stream.h +++ b/include/haproxy/conn_stream.h @@ -32,7 +32,7 @@ struct stream; struct stream_interface; struct check; -#define IS_HTX_CS(cs) (cs_conn(cs) && IS_HTX_CONN(cs_conn(cs))) +#define IS_HTX_CS(cs) (cs_conn(cs) && IS_HTX_CONN(__cs_conn(cs))) struct conn_stream *cs_new(); void cs_free(struct conn_stream *cs);