diff options
author | David 'Digit' Turner <digit@android.com> | 2010-09-22 14:19:28 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2010-09-22 14:19:28 +0200 |
commit | 4e024bb4f5c8aa8b07459f7fbd65c35122127fd1 (patch) | |
tree | ccd5835eef17757d3e1c069e391c415c0135023d /block/raw-posix.c | |
parent | 1d9873b37d2478554d9d678cd410bd3638c8dab3 (diff) | |
download | external_qemu-4e024bb4f5c8aa8b07459f7fbd65c35122127fd1.zip external_qemu-4e024bb4f5c8aa8b07459f7fbd65c35122127fd1.tar.gz external_qemu-4e024bb4f5c8aa8b07459f7fbd65c35122127fd1.tar.bz2 |
Remove compiler warnings when building the emulator.
This forces -Wall during the build. Note that this patch doesn't
remove all warnings, but most of the remaining ones are from upstream anyway.
Change-Id: I8808d8495e99866e156ce5780d2e3c305eab491f
Diffstat (limited to 'block/raw-posix.c')
-rw-r--r-- | block/raw-posix.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c index 11effd7..0e9e343 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -570,7 +570,7 @@ static int posix_aio_init(void) PosixAioState *s; int fds[2]; struct qemu_paioinit ai; - + if (posix_aio_state) return 0; @@ -836,7 +836,7 @@ again: static int raw_create(const char *filename, QEMUOptionParameter *options) { - int fd; + int fd, ret; int64_t total_size = 0; /* Read out options */ @@ -851,8 +851,12 @@ static int raw_create(const char *filename, QEMUOptionParameter *options) 0644); if (fd < 0) return -EIO; - ftruncate(fd, total_size * 512); + do { + ret = ftruncate(fd, total_size * 512); + } while (ret < 0 && errno == EINTR); close(fd); + if (ret != 0) + return -errno; return 0; } |