Skip to content

Commit

Permalink
emulator: Fix AMP emulation build error
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Szymon Janc authored and Johan Hedberg committed Oct 11, 2013
1 parent 1cbb3e8 commit 0b24507
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion emulator/amp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0b24507

Please sign in to comment.