From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bs88k-0006lP-7b for qemu-devel@nongnu.org; Tue, 03 Aug 2004 18:52:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bs88i-0006lD-C7 for qemu-devel@nongnu.org; Tue, 03 Aug 2004 18:52:13 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bs88i-0006lA-3J for qemu-devel@nongnu.org; Tue, 03 Aug 2004 18:52:12 -0400 Received: from [62.241.160.9] (helo=shockwave.systems.pipex.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bs84p-0007RM-PS for qemu-devel@nongnu.org; Tue, 03 Aug 2004 18:48:12 -0400 Received: from nowt.org (81-178-252-250.dsl.pipex.com [81.178.252.250]) by shockwave.systems.pipex.net (Postfix) with ESMTP id F1E511C00197 for ; Tue, 3 Aug 2004 23:48:09 +0100 (BST) Received: from wren.home (wren.home [192.168.1.7]) by nowt.org (Postfix) with ESMTP id 2C505AC95 for ; Tue, 3 Aug 2004 23:48:03 +0100 (BST) From: Paul Brook Date: Tue, 3 Aug 2004 23:48:02 +0100 MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_iYBEBXMmLlIsDLH" Message-Id: <200408032348.02613.paul@codesourcery.com> Subject: [Qemu-devel] [patch] Shut up compiler warning. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --Boundary-00=_iYBEBXMmLlIsDLH Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 --Boundary-00=_iYBEBXMmLlIsDLH Content-Type: text/x-diff; charset="us-ascii"; name="patch.qemu_block_close" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch.qemu_block_close" Index: block.c =================================================================== RCS file: /cvsroot/qemu/qemu/block.c,v retrieving revision 1.12 diff -u -p -r1.12 block.c --- block.c 3 Aug 2004 21:14:09 -0000 1.12 +++ block.c 3 Aug 2004 22:40:23 -0000 @@ -554,7 +554,7 @@ static int raw_write(BlockDriverState *b return 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 diff -u -p -r1.2 block-cow.c --- block-cow.c 3 Aug 2004 21:13:54 -0000 1.2 +++ block-cow.c 3 Aug 2004 22:40:23 -0000 @@ -202,7 +202,7 @@ static int cow_write(BlockDriverState *b return 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 diff -u -p -r1.1 block_int.h --- block_int.h 1 Aug 2004 21:59:26 -0000 1.1 +++ block_int.h 3 Aug 2004 22:40:23 -0000 @@ -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 diff -u -p -r1.2 block-qcow.c --- block-qcow.c 3 Aug 2004 21:13:54 -0000 1.2 +++ block-qcow.c 3 Aug 2004 22:40:23 -0000 @@ -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 diff -u -p -r1.2 block-vmdk.c --- block-vmdk.c 3 Aug 2004 21:13:54 -0000 1.2 +++ block-vmdk.c 3 Aug 2004 22:40:23 -0000 @@ -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); --Boundary-00=_iYBEBXMmLlIsDLH--