Shut up compiler warning.
PATCH 1/1 Shut up compiler warning.
The new bdrv_close callbacks are declared to return "int". However their return value is never set, and always ignored. GCC rightly warns about this.
Attached patch changes them to have a void return type.
Is mailing patches to this list the preferred way of submitting changes? If not what should I do with them?
Paul
Index: block.c
===================================================================
RCS file: /cvsroot/qemu/qemu/block.c,v
retrieving revision 1.12
block.c +1 -1
@@ -554,7 +554,7 @@ static int raw_write(BlockDriverState *breturn 0 ; } -static int raw_close (BlockDriverState *bs) +static void raw_close (BlockDriverState *bs) {BDRVRawState *s = bs->opaque;close (s->fd);
Index: block-cow.c
===================================================================
RCS file: /cvsroot/qemu/qemu/block-cow.c,v
retrieving revision 1.2
block-cow.c +1 -1
@@ -202,7 +202,7 @@ static int cow_write(BlockDriverState *breturn 0 ; } -static int cow_close (BlockDriverState *bs) +static void cow_close (BlockDriverState *bs) {BDRVCowState *s = bs->opaque;munmap (s->cow_bitmap_addr, s->cow_bitmap_size);
Index: block_int.h
===================================================================
RCS file: /cvsroot/qemu/qemu/block_int.h,v
retrieving revision 1.1
block_int.h +1 -1
@@ -33,7 +33,7 @@ struct BlockDriver { uint8_t *buf, int nb_sectors);int (*bdrv_write)(BlockDriverState *bs,int64_t sector_num,const uint8_t *buf,int nb_sectors); -int (*bdrv_close)(BlockDriverState *bs); +void (*bdrv_close)(BlockDriverState *bs);int (*bdrv_create)(const char *filename,int64_t total_sectors,const char *backing_file,int flags); int (*bdrv_is_allocated)(BlockDriverState *bs, int64_t sector_num,
Index: block-qcow.c
===================================================================
RCS file: /cvsroot/qemu/qemu/block-qcow.c,v
retrieving revision 1.2
block-qcow.c +1 -1
@@ -521,7 +521,7 @@ static int qcow_write(BlockDriverState *return 0 ; } -static int qcow_close (BlockDriverState *bs) +static void qcow_close (BlockDriverState *bs) {BDRVQcowState *s = bs->opaque;qemu_free (s->l1_table);
Index: block-vmdk.c
===================================================================
RCS file: /cvsroot/qemu/qemu/block-vmdk.c,v
retrieving revision 1.2
block-vmdk.c +1 -1
@@ -257,7 +257,7 @@ static int vmdk_write(BlockDriverState *return -1 ; } -static int vmdk_close (BlockDriverState *bs) +static void vmdk_close (BlockDriverState *bs) {BDRVVmdkState *s = bs->opaque;qemu_free (s->l1_table);