From fdd5bd3523697412369aaee88453c3e49a081f5e Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 6 Mar 2013 21:13:39 +0100 Subject: [PATCH] Avoid warning about ignoring return value of 'read' --- libnfc/buses/uart_posix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libnfc/buses/uart_posix.c b/libnfc/buses/uart_posix.c index d6dd3a1..fc32c12 100644 --- a/libnfc/buses/uart_posix.c +++ b/libnfc/buses/uart_posix.c @@ -127,7 +127,8 @@ uart_flush_input(serial_port sp) } char *rx = malloc(available_bytes_count); // There is something available, read the data - read(UART_DATA(sp)->fd, rx, available_bytes_count); + res = read(UART_DATA(sp)->fd, rx, available_bytes_count); + (void) res; log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%d bytes have eatten.", available_bytes_count); free(rx); }