Bug 715184 - when compiling libvirt src rpmball, it generates warning: 'ret' may be used uninitialized in 'qemuMonitorJSONAddDrive'
Summary: when compiling libvirt src rpmball, it generates warning: 'ret' may be used u...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-22 06:31 UTC by Gunannan Ren
Modified: 2014-06-18 07:18 UTC (History)
4 users (show)

Fixed In Version: libvirt-0.9.3-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:15:25 UTC
Target Upstream Version:


Attachments (Terms of Use)
proposed patch (760 bytes, text/plain)
2011-06-22 06:33 UTC, Gunannan Ren
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Gunannan Ren 2011-06-22 06:31:50 UTC
Description of problem:
When compiling libvirt-0.9.2-1.el6.src.rpm on x86_64 machine, it produced the following error informations

...
  CC     libvirt_driver_qemu_la-qemu_monitor_json.lo
  CC     libvirt_driver_qemu_la-qemu_driver.lo
qemu/qemu_monitor_json.c: In function 'qemuMonitorJSONAddDrive':
qemu/qemu_monitor_json.c:2468: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]
  CC     libvirt_driver_qemu_la-qemu_bridge_filter.lo
  CC     libvirt_driver_lxc_la-lxc_conf.lo
...


Version-Release number of selected component (if applicable):
libvirt-0.9.2-1.el6.src.rpm

How reproducible:
always

Steps to Reproduce:
1.install the libvirt-0.9.2-1.el6.src.rpm
2. cd /root/rpmbuild/SPECS
3. rpmbuild -bb libvirt.spec

  
Actual results:
it showed warning info.

Expected results:
no warning info.

Additional info:

Comment 1 Gunannan Ren 2011-06-22 06:33:46 UTC
Created attachment 505917 [details]
proposed patch

I tried to initialize the ret variable to -1, it works.

Comment 3 Eric Blake 2011-06-22 13:27:03 UTC
Confirmed; the bug is RHEL-specific, due to a flaw in the libvirt-Support-virtio-disk-hotplug-in-JSON-mode.patch

Comment 4 Eric Blake 2011-06-22 14:26:06 UTC
I've incorporated Gunannan's patch into this respin:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-June/msg00349.html

Comment 5 Daniel Veillard 2011-06-23 03:44:03 UTC
I missed this when doing the rebase for libvirt-0.9.2-1.el6, it will be
in the next build,

Daniel

Comment 7 Gunannan Ren 2011-07-06 09:25:41 UTC
This bug has been verified on libvirt-0.9.3-1.el6.

Comment 8 errata-xmlrpc 2011-12-06 11:15:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


Note You need to log in before you can comment on or make changes to this bug.