mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-31 01:20:44 +00:00
daemon: avoid compile warning
This commit is contained in:
parent
e0449ce9c9
commit
62609879d3
@ -563,14 +563,17 @@ void socket_connection_send_packet(connection_t *conn, uint16_t type, uint16_t c
|
||||
little_endian_store_16(header, 0, type);
|
||||
little_endian_store_16(header, 2, channel);
|
||||
little_endian_store_16(header, 4, size);
|
||||
// avoid -Wunused-result
|
||||
int res;
|
||||
#ifdef _WIN32
|
||||
int flags = 0;
|
||||
send(conn->socket_fd, (const char *) header, 6, flags);
|
||||
send(conn->socket_fd, (const char *) packet, size, flags);
|
||||
res = send(conn->socket_fd, (const char *) header, 6, flags);
|
||||
res = send(conn->socket_fd, (const char *) packet, size, flags);
|
||||
#else
|
||||
write(conn->socket_fd, header, 6);
|
||||
write(conn->socket_fd, packet, size);
|
||||
res = write(conn->socket_fd, header, 6);
|
||||
res = write(conn->socket_fd, packet, size);
|
||||
#endif
|
||||
UNUSED(res);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user