From e4149cdbc696430bc1ef6256ff38336b3e5c1544 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 2 Mar 2022 14:38:11 +0100 Subject: [PATCH] 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. --- include/haproxy/conn_stream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h index fffbc6229..e69f9c170 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);