client/player: fix incompatible pointer type

In function 'cmd_send_transport':
error: passing argument 2 of 'getpeername' from incompatible pointer
type [-Wincompatible-pointer-types]

err = getpeername(transport->sk, &addr, &optlen);
|       |                        ^~~~~
|       |                        |
|       |                        struct sockaddr_iso *

note: expected 'struct sockaddr * restrict' but argument is of
type 'struct sockaddr_iso *'

To resolve the compiler warnings, cast the pointer with
(struct sockaddr *).
This commit is contained in:
Guðni Már Gilbert 2024-07-07 13:46:41 +00:00 committed by Luiz Augusto von Dentz
parent 110a8b47a4
commit 0041f5e22f

View File

@ -5147,7 +5147,8 @@ static void cmd_send_transport(int argc, char *argv[])
struct sockaddr_iso addr;
socklen_t optlen = sizeof(addr);
err = getpeername(transport->sk, &addr, &optlen);
err = getpeername(transport->sk,
(struct sockaddr *)&addr, &optlen);
if (!err) {
if (!(bacmp(&addr.iso_bdaddr, BDADDR_ANY)))
err = transport_send(transport, fd,