
On Tue, Jan 10, 2012 at 03:47:42PM -0200, Eduardo Lima (Etrunko) wrote:
From: "Eduardo Lima (Etrunko)" <eblima@br.ibm.com>
I am building libvirt-cim with gcc 4.6.3 in fedora 16 and got a bunch of new warnings. Most of them are about variables that are set but not used anywhere, but there is one possible access to unitialized variables in Virt_RASD.c which might result in unexpected behavior.
xmlgen.c: In function 'system_xml': xmlgen.c:633:28: error: variable 'bl' set but not used [-Werror=unused-but-set-variable] xmlgen.c:642:28: error: variable 'bl_args' set but not used [-Werror=unused-but-set-variable] xmlgen.c: In function 'disk_pool_xml': xmlgen.c:1244:20: error: variable 'path' set but not used [-Werror=unused-but-set-variable] xmlgen.c: In function 'filter_to_xml': xmlgen.c:1474:15: error: variable 'msg' set but not used [-Werror=unused-but-set-variable]
Virt_FilterEntry.c: In function 'enum_filter_rules': Virt_FilterEntry.c:576:30: error: variable 'class_type' set but not used [-Werror=unused-but-set-variable]
Virt_RASD.c: In function 'rasd_from_vdev': Virt_RASD.c:406:27: error: 'pool' may be used uninitialized in this function [-Werror=uninitialized] Virt_RASD.c:330:27: note: 'pool' was declared here Virt_RASD.c:407:26: error: 'vol' may be used uninitialized in this function [-Werror=uninitialized] Virt_RASD.c:320:26: note: 'vol' was declared here
Virt_VSMigrationService.c: In function 'clear_infstore_migration_flag': Virt_VSMigrationService.c:1185:15: error: variable 'ret' set but not used [-Werror=unused-but-set-variable] Virt_VSMigrationService.c: In function 'migrate_do': Virt_VSMigrationService.c:1478:15: error: variable 'thread' set but not used [-Werror=unused-but-set-variable]
Virt_Device.c: In function 'device_instances': Virt_Device.c:431:15: error: variable 'ret' set but not used [-Werror=unused-but-set-variable] Virt_Device.c: In function 'proc_dev_list': Virt_Device.c:657:13: error: variable 'rc' set but not used [-Werror=unused-but-set-variable] Virt_Device.c: In function 'get_device_by_name': Virt_Device.c:769:21: error: variable 'ret' set but not used [-Werror=unused-but-set-variable] Virt_Device.c:729:15: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
Virt_VirtualSystemManagementService.c: In function 'input_rasd_to_vdev': Virt_VirtualSystemManagementService.c:1384:21: error: variable 'msg' set but not used [-Werror=unused-but-set-variable]
Changes since v1: - xmlgen.c: Keep 'path' variable and fix value check.
I'm seeing those too, so it would be nice to fix :-) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/