android/handsfree.c: In function ‘bt_sco_get_fd’:
android/handsfree.c:2913:47: error: taking address of packed member of ‘struct sco_rsp_get_fd’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
2913 | if (!dev || !bt_sco_get_fd_and_mtu(sco, &fd, &rsp.mtu))
| ^~~~~~~~
Change-Id: I9fa77341db9858d2a21b589a0f4661a0990de19a
Signed-off-by: himanshu <h.himanshu@samsung.com>
struct sco_rsp_get_fd rsp;
struct hf_device *dev;
bdaddr_t bdaddr;
+ uint16_t mtu;
int fd;
DBG("");
android2bdaddr(cmd->bdaddr, &bdaddr);
dev = find_device(&bdaddr);
- if (!dev || !bt_sco_get_fd_and_mtu(sco, &fd, &rsp.mtu))
+ if (!dev || !bt_sco_get_fd_and_mtu(sco, &fd, &mtu))
goto failed;
+ rsp.mtu = mtu;
DBG("fd %d mtu %u", fd, rsp.mtu);
ipc_send_rsp_full(sco_ipc, SCO_SERVICE_ID, SCO_OP_GET_FD,