Commit 00ccf932 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Blue Swirl
Browse files

block/bochs.c: fix warning with _FORTIFY_SOURCE



  CC    block/bochs.o
cc1: warnings being treated as errors
block/bochs.c: In function 'seek_to_sector':
block/bochs.c:202: error: ignoring return value of 'read', declared with attribute warn_unused_result
make: *** [block/bochs.o] Error 1

Signed-off-by: default avatarKirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
parent 5fdb3aa1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -199,7 +199,8 @@ static inline int seek_to_sector(BlockDriverState *bs, int64_t sector_num)
    // read in bitmap for current extent
    lseek(s->fd, bitmap_offset + (extent_offset / 8), SEEK_SET);

    read(s->fd, &bitmap_entry, 1);
    if (read(s->fd, &bitmap_entry, 1) != 1)
        return -1;

    if (!((bitmap_entry >> (extent_offset % 8)) & 1))
    {