projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d37adb0
)
Fix gcc 3 warning about uninitialized variable
author
Blue Swirl
<blauwirbel@gmail.com>
Sat, 29 Aug 2009 13:37:26 +0000
(16:37 +0300)
committer
Blue Swirl
<blauwirbel@gmail.com>
Sat, 29 Aug 2009 13:37:26 +0000
(16:37 +0300)
If nb_sectors is 0, cluster_offset will not be initialized.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
block/qcow2.c
patch
|
blob
|
history
diff --git
a/block/qcow2.c
b/block/qcow2.c
index a9c39bd8170416ad900feefa8331faf90333714d..9637f2ea3a57c5e45f4c5d5652d805774cc3eb08 100644
(file)
--- 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;