mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 00:04:29 +08:00
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:
parent
110a8b47a4
commit
0041f5e22f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user