]> xenbits.xensource.com Git - libvirt.git/commit
virsh-pool.c: Don't jump over variable declaration
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 28 Aug 2013 07:25:59 +0000 (09:25 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 28 Aug 2013 07:33:15 +0000 (09:33 +0200)
commit2ab0948d0c7034dbb3ee00e41cb497c03d0d2c66
tree54d33cb5b6d1a7ca603c3aec8a07ea2d9e9d0bb2
parent14d5328681448267dfc0812948fa2c6ec4dfa7d4
virsh-pool.c: Don't jump over variable declaration

Since 785ff34bf8 we are using the outputStr variable in cleanup label.
However, there is a possibility to jump to the label before the variable
has been declared:

virsh-pool.c: In function 'cmdPoolList':
virsh-pool.c:1121:25: error: jump skips variable initialization [-Werror=jump-misses-init]
                         goto asprintf_failure;
                         ^
virsh-pool.c:1308:1: note: label 'asprintf_failure' defined here
 asprintf_failure:
 ^
virsh-pool.c:1267:11: note: 'outputStr' declared here
     char *outputStr = NULL;
tools/virsh-pool.c