From 6e42775b5145254ff3b41b761a8b2c7f78811834 Mon Sep 17 00:00:00 2001 From: Dan Milea Date: Mon, 6 Nov 2023 13:49:57 +0200 Subject: [PATCH] service: rpmsg_rpc: fix build error The if (&rpc->ept) comparison will always evaluate as 'true', since rpc == &rpc->ept and rpc is previously checked to be valid. This produces an error when building open-amp with gcc >= 13. Signed-off-by: Dan Milea --- lib/service/rpmsg/rpc/rpmsg_rpc_client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/service/rpmsg/rpc/rpmsg_rpc_client.c b/lib/service/rpmsg/rpc/rpmsg_rpc_client.c index f4e30b2e1..cb72f2e2c 100644 --- a/lib/service/rpmsg/rpc/rpmsg_rpc_client.c +++ b/lib/service/rpmsg/rpc/rpmsg_rpc_client.c @@ -81,8 +81,7 @@ void rpmsg_rpc_client_release(struct rpmsg_rpc_clt *rpc) { if (!rpc) return; - if (&rpc->ept) - rpmsg_destroy_ept(&rpc->ept); + rpmsg_destroy_ept(&rpc->ept); }