mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-11 21:14:36 +08:00
scotest: Fix compilation errors due to unaligned memory access
This fix following build errors on ARM. CC test/scotest.o test/scotest.c: In function send_mode: test/scotest.c:272:4: error: cast increases required alignment of target type [-Werror=cast-align] test/scotest.c:273:4: error: cast increases required alignment of target type [-Werror=cast-align] cc1: all warnings being treated as errors make[1]: *** [test/scotest.o] Error 1 make: *** [all] Error 2
This commit is contained in:
parent
9139fc4ea3
commit
f00bdeb27a
@ -269,8 +269,9 @@ static void send_mode(char *svr)
|
||||
|
||||
seq = 0;
|
||||
while (1) {
|
||||
*(uint32_t *) buf = htobl(seq);
|
||||
*(uint16_t *) (buf + 4) = htobs(data_size);
|
||||
bt_put_le32(seq, buf);
|
||||
bt_put_le16(data_size, buf + 4);
|
||||
|
||||
seq++;
|
||||
|
||||
if (send(sk, buf, so.mtu, 0) <= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user