Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 715184

Summary: when compiling libvirt src rpmball, it generates warning: 'ret' may be used uninitialized in 'qemuMonitorJSONAddDrive'
Product: Red Hat Enterprise Linux 6 Reporter: Gunannan Ren <gren>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: dallan, eblake, rwu, veillard
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.9.3-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 11:15:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed patch none

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