From 2000cbc50d3ec39086d1a831e59833d35f500891 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sat, 29 Aug 2009 16:37:26 +0300 Subject: Fix gcc 3 warning about uninitialized variable If nb_sectors is 0, cluster_offset will not be initialized. Signed-off-by: Blue Swirl --- block/qcow2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/qcow2.c') diff --git a/block/qcow2.c b/block/qcow2.c index a9c39bd81..9637f2ea3 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -642,7 +642,7 @@ static int get_bits_from_size(size_t size) static int preallocate(BlockDriverState *bs) { BDRVQcowState *s = bs->opaque; - uint64_t cluster_offset; + uint64_t cluster_offset = 0; uint64_t nb_sectors; uint64_t offset; int num; -- cgit v1.2.3