posix-aio-compat.c: fix warning with _FORTIFY_SOURCE

CC    posix-aio-compat.o
cc1: warnings being treated as errors
posix-aio-compat.c: In function 'aio_signal_handler':
posix-aio-compat.c:505: error: ignoring return value of 'write', declared with attribute warn_unused_result
make: *** [posix-aio-compat.o] Error 1

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Kirill A. Shutemov 2010-01-20 00:56:10 +01:00 committed by Anthony Liguori
parent 7c7c0629a3
commit 4817d32757

View File

@ -501,8 +501,11 @@ static void aio_signal_handler(int signum)
{ {
if (posix_aio_state) { if (posix_aio_state) {
char byte = 0; char byte = 0;
ssize_t ret;
write(posix_aio_state->wfd, &byte, sizeof(byte)); ret = write(posix_aio_state->wfd, &byte, sizeof(byte));
if (ret < 0 && errno != EAGAIN)
die("write()");
} }
qemu_service_io(); qemu_service_io();