From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlo Marcelo Arenas Belon Subject: [PATCH] qemu: use statically allocate 512 byte buffer in the stack for sector in bdrv_commit Date: Fri, 4 Jan 2008 01:11:38 -0600 Message-ID: <20080104071138.GB9285@tapir> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org revert a merge conflict from 075da586c92f09bd9a7401f1e80d72fde27c173 that redefined sector as an array of pointers to char, instead of a statically allocated buffer of chars, that was triggering the following warnings : block.c: In function `bdrv_commit': block.c:480: warning: passing arg 3 of `bdrv_read' from incompatible pointer type block.c:484: warning: passing arg 3 of `bdrv_write' from incompatible pointer type Signed-off-by: Carlo Marcelo Arenas Belon --- qemu/block.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu/block.c b/qemu/block.c index 519be24..492a4d3 100644 --- a/qemu/block.c +++ b/qemu/block.c @@ -460,7 +460,7 @@ int bdrv_commit(BlockDriverState *bs) BlockDriver *drv = bs->drv; int64_t i, total_sectors; int n, j; - unsigned char *sector[512]; + unsigned char sector[512]; if (!drv) return -ENOMEDIUM; -- 1.5.3.7 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/