]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuTPMEmulatorReconfigure: Fix two build issues
authorPeter Krempa <pkrempa@redhat.com>
Fri, 5 Nov 2021 08:48:52 +0000 (09:48 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 5 Nov 2021 08:55:20 +0000 (09:55 +0100)
commitc43f22d5c1ea08c5516d791010ed3c230c47cb53
treec3ffb85bbaec364eb1b388e827d3474b44fc9f1a
parent6cb5464ab4697acbc56341732a15519234edfef0
qemuTPMEmulatorReconfigure: Fix two build issues

1) 'activePcrBanksStr' is not initialized:

../../../libvirt/src/qemu/qemu_tpm.c: In function ‘qemuExtTPMStart’:
/usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: ‘activePcrBanksStr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   28 |   g_free (*pp);
      |   ^~~~~~~~~~~~
../../../libvirt/src/qemu/qemu_tpm.c:613:22: note: ‘activePcrBanksStr’ was declared here
  613 |     g_autofree char *activePcrBanksStr;
      |                      ^~~~~~~~~~~~~~~~~

2) 'pwdfile_fd' is unused:

../../../libvirt/src/qemu/qemu_tpm.c:615:19: error: unused variable 'pwdfile_fd' [-Werror,-Wunused-variable]
        VIR_AUTOCLOSE pwdfile_fd = -1;

Fixes: a5bbe1a8b63
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_tpm.c