mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-30 21:42:06 -06:00
migration: fix -Werror=maybe-uninitialized false-positives
../migration/dirtyrate.c:186:5: error: ‘records’ may be used uninitialized [-Werror=maybe-uninitialized] ../migration/dirtyrate.c:168:12: error: ‘gen_id’ may be used uninitialized [-Werror=maybe-uninitialized] ../migration/migration.c:2273:5: error: ‘file’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Peter Xu <peterx@redhat.com> Reviewed-by: Hyman Huang <yong.huang@smartx.com>
This commit is contained in:
parent
ae11f6ca66
commit
7cea863719
2 changed files with 3 additions and 3 deletions
|
@ -149,12 +149,12 @@ int64_t vcpu_calculate_dirtyrate(int64_t calc_time_ms,
|
||||||
unsigned int flag,
|
unsigned int flag,
|
||||||
bool one_shot)
|
bool one_shot)
|
||||||
{
|
{
|
||||||
DirtyPageRecord *records;
|
DirtyPageRecord *records = NULL;
|
||||||
int64_t init_time_ms;
|
int64_t init_time_ms;
|
||||||
int64_t duration;
|
int64_t duration;
|
||||||
int64_t dirtyrate;
|
int64_t dirtyrate;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
unsigned int gen_id;
|
unsigned int gen_id = 0;
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
init_time_ms = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
|
init_time_ms = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
|
||||||
|
|
|
@ -2278,7 +2278,7 @@ static bool migrate_handle_rp_resume_ack(MigrationState *s,
|
||||||
*/
|
*/
|
||||||
static void migration_release_dst_files(MigrationState *ms)
|
static void migration_release_dst_files(MigrationState *ms)
|
||||||
{
|
{
|
||||||
QEMUFile *file;
|
QEMUFile *file = NULL;
|
||||||
|
|
||||||
WITH_QEMU_LOCK_GUARD(&ms->qemu_file_lock) {
|
WITH_QEMU_LOCK_GUARD(&ms->qemu_file_lock) {
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue