diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-08-29 16:37:26 +0300 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-08-29 16:37:26 +0300 |
commit | d0f2af8b908c3389aeb16a96dd5e39b4ff4efebe (patch) | |
tree | b3b65e031340a0842a8ff96c25d2064f7f07e6e1 /block | |
parent | de49b8541b68b19c620f2ceca56c8d38c0af28d2 (diff) | |
download | qemu-d0f2af8b908c3389aeb16a96dd5e39b4ff4efebe.tar.gz qemu-d0f2af8b908c3389aeb16a96dd5e39b4ff4efebe.tar.bz2 qemu-d0f2af8b908c3389aeb16a96dd5e39b4ff4efebe.zip |
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>
Diffstat (limited to 'block')
-rw-r--r-- | block/qcow2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index a9c39bd817..9637f2ea3a 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; |