Re: [PATCH v3 0/9] Selective block device migration implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 01, 2015 at 04:41:34PM -0400, John Ferlan wrote:
> On 06/01/2015 04:01 PM, Kashyap Chamarthy wrote:

[. . .]

> >     $ git log --oneline | head -9
> >     a98cb8d virsh: selective block device migration
> >     f57141e qemu: migration: selective block device migration
> >     2757805 util: add virTypedParamsAddStringList
> >     9b4e1be util: virTypedParams{Filter,PickStrings}
> >     4385cf0 util: multi-value parameters in virTypedParamsAdd*
> >     f83965b util: multi-value virTypedParameter
> >     89d6ddf qemuMigrationDriveMirror: Pass disk format to qemu
> >     dd81938 qemuMigrationBeginPhase: Fix function header indentation
> >     c98a95a virDomainDiskGetSource: Mark passed disk as 'const'
> > 
> > And, `make` seems to fail here:
> > 
> >     $ ~/tinker-space/libvirt/./autogen.sh --system
> >     $ make -j4
> >     [. . .]
> >     /home/kashyapc/tinker-space/libvirt/./src/qemu/qemu_migration.c: In function 'qemuMigrationRun':
> >     /home/kashyapc/tinker-space/libvirt/./src/qemu/qemu_migration.c:1997:17: error: 'format' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> >              mon_ret = qemuMonitorDriveMirror(priv->mon, diskAlias, nbd_dest,
> >                      ^
> >     /home/kashyapc/tinker-space/libvirt/./src/qemu/qemu_migration.c:1971:21: note: 'format' was declared here
> >              const char *format;
> > 
> > 
> 
> See my response to 3/9.
> 
> If you initialize to NULL you'll be able to compile.

Yep, initializing format to NULL results in a successful `make`
invocation:

    $ git diff src/qemu/qemu_migration.c
    diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
    index 5a8057e..0b83a2c 100644
    --- a/src/qemu/qemu_migration.c
    +++ b/src/qemu/qemu_migration.c
    @@ -1968,7 +1968,7 @@ qemuMigrationDriveMirror(virQEMUDriverPtr driver,
         for (i = 0; i < vm->def->ndisks; i++) {
             virDomainDiskDefPtr disk = vm->def->disks[i];
             qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
    -        const char *format;
    +        const char *format = NULL;
             int mon_ret;
 
             /* check whether disk should be migrated */

Thanks.

-- 
/kashyap

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]