[PATCH 0/7] More cleanups of unused and uninitialized variables

Peter Krempa posted 7 patches 3 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1591868343.git.pkrempa@redhat.com
Test syntax-check failed
src/libxl/libxl_migration.c               | 4 +---
src/locking/sanlock_helper.c              | 2 --
src/logging/log_daemon.c                  | 2 --
src/nwfilter/nwfilter_ebiptables_driver.c | 2 --
src/openvz/openvz_driver.c                | 2 --
src/remote/remote_daemon_dispatch.c       | 2 +-
src/security/security_selinux.c           | 2 --
src/test/test_driver.c                    | 2 --
src/util/virstorageencryption.c           | 4 ----
src/util/virsysinfo.c                     | 2 --
src/util/virtpm.c                         | 5 +----
src/vbox/vbox_common.c                    | 2 +-
src/vmware/vmware_conf.c                  | 4 ----
src/vmware/vmware_driver.c                | 4 ----
tests/cputest.c                           | 4 +---
tests/networkxml2firewalltest.c           | 2 --
tests/scsihosttest.c                      | 4 ----
tests/xmconfigtest.c                      | 2 --
tools/virsh-checkpoint.c                  | 2 --
19 files changed, 5 insertions(+), 48 deletions(-)
[PATCH 0/7] More cleanups of unused and uninitialized variables
Posted by Peter Krempa 3 years, 10 months ago
Recent commit showed that compilers are not able to detect unused
variables when passed to VIR_FREE, so I fixed all the other instances
the patch didn't fix.

Peter Krempa (7):
  libxlDomainMigrationDstPrepareDef: remove use of temporary variable
  testVirFindSCSIHostByPCI: Remove unused 'path_addr'
  cputest: Avoid use of temporary variable in DO_TEST macro
  virTPMEmulatorInit: Don't use temporary variable to free path
  remoteDispatchDomainMigratePrepare: Don't pass uninitialized variable
    to VIR_FREE
  vboxDomainScreenshot: Don't pass uninitialized 'screenData' to
    VIR_FREE
  Remove use of variables passed only to 'VIR_FREE'

 src/libxl/libxl_migration.c               | 4 +---
 src/locking/sanlock_helper.c              | 2 --
 src/logging/log_daemon.c                  | 2 --
 src/nwfilter/nwfilter_ebiptables_driver.c | 2 --
 src/openvz/openvz_driver.c                | 2 --
 src/remote/remote_daemon_dispatch.c       | 2 +-
 src/security/security_selinux.c           | 2 --
 src/test/test_driver.c                    | 2 --
 src/util/virstorageencryption.c           | 4 ----
 src/util/virsysinfo.c                     | 2 --
 src/util/virtpm.c                         | 5 +----
 src/vbox/vbox_common.c                    | 2 +-
 src/vmware/vmware_conf.c                  | 4 ----
 src/vmware/vmware_driver.c                | 4 ----
 tests/cputest.c                           | 4 +---
 tests/networkxml2firewalltest.c           | 2 --
 tests/scsihosttest.c                      | 4 ----
 tests/xmconfigtest.c                      | 2 --
 tools/virsh-checkpoint.c                  | 2 --
 19 files changed, 5 insertions(+), 48 deletions(-)

-- 
2.26.2