Skip to content

Commit

Permalink
service: rpmsg_rpc: fix build error
Browse files Browse the repository at this point in the history
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 <dan.milea@windriver.com>
  • Loading branch information
Dan Milea authored and arnopo committed Nov 21, 2023
1 parent 78043fa commit cce796d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/service/rpmsg/rpc/rpmsg_rpc_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}

Expand Down

0 comments on commit cce796d

Please sign in to comment.