emulator: Fix AMP emulation build error

This fix build with GCC 4.6.3.

  CC     emulator/amp.o
emulator/amp.c: In function ‘send_packet’:
emulator/amp.c:172:7: error: ignoring return value of ‘write’,
    declared with attribute warn_unused_result [-Werror=unused-result]
cc1: all warnings being treated as errors
make[1]: *** [emulator/amp.o] Error
This commit is contained in:
Szymon Janc 2013-10-10 10:15:34 +02:00 committed by Johan Hedberg
parent 1cbb3e88be
commit 0b24507b8a

View File

@ -169,7 +169,8 @@ static void reset_defaults(struct bt_amp *amp)
static void send_packet(struct bt_amp *amp, const void *data, uint16_t len)
{
write(amp->vhci_fd, data, len);
if (write(amp->vhci_fd, data, len) < 0)
fprintf(stderr, "Write to /dev/vhci failed\n");
}
static void send_event(struct bt_amp *amp, uint8_t event,