Fix gcc 3 warning about uninitialized variable

If nb_sectors is 0, cluster_offset will not be initialized.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2009-08-29 16:37:26 +03:00
parent d37adb099c
commit 2000cbc50d
1 changed files with 1 additions and 1 deletions

View File

@ -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;