提交 2000cbc5 编写于 作者: B Blue Swirl

Fix gcc 3 warning about uninitialized variable

If nb_sectors is 0, cluster_offset will not be initialized.
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 d37adb09
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册