Trivial branch for 7.2 patches
The following changes since commit c8de6ec63d766ca1998c5af468483ce912fdc0c2:
Merge tag 'pull-request-2022-09-28' of https://gitlab.com/thuth/qemu into staging (2022-09-28 17:04:11 -0400)
are available in the Git repository at:
https://gitlab.com/laurent_vivier/qemu.git tags/trivial-branch-for-7.2-pull-request
for you to fetch changes up to 4a4a74bf439910e957db42405a3abefdf867516a:
docs: Update TPM documentation for usage of a TPM 2 (2022-10-04 00:10:11 +0200)
----------------------------------------------------------------
Pull request trivial patches branch 20220930-v2
----------------------------------------------------------------
Bernhard Beschow (1):
hw/virtio/vhost-shadow-virtqueue: Silence GCC error
"maybe-uninitialized"
Markus Armbruster (2):
Drop superfluous conditionals around g_free() Use g_new() & friends where that makes obvious sense
Matheus Tavares Bernardino (1):
checkpatch: ignore target/hexagon/imported/* files
Philippe Mathieu-Daudé (1):
block/qcow2-bitmap: Add missing cast to silent GCC error
Stefan Berger (1):
docs: Update TPM documentation for usage of a TPM 2
Tong Zhang (1):
mem/cxl_type3: fix GPF DVSEC
Wang, Lei (1):
.gitignore: add .cache/ to .gitignore
.gitignore | 1 + block/qcow2-bitmap.c | 2 +- docs/specs/tpm.rst | 44 ++++++++++++++++-------------- hw/mem/cxl_type3.c | 2 +- hw/remote/iommu.c | 2 +- hw/virtio/vhost-shadow-virtqueue.c | 2 +- hw/virtio/virtio-crypto.c | 2 +- migration/dirtyrate.c | 4 +-- replay/replay.c | 6 ++-- scripts/checkpatch.pl | 1 + softmmu/dirtylimit.c | 4 +-- target/i386/kvm/kvm.c | 12 +++----- target/i386/whpx/whpx-all.c | 14 ++++------ 13 files changed, 47 insertions(+), 49 deletions(-)
Signature · 1 line
2.37.3
[PULL 1/8] hw/virtio/vhost-shadow-virtqueue: Silence GCC error "maybe-uninitialized"
From: Bernhard Beschow <[email protected]>
GCC issues a false positive warning, resulting in build failure with -Werror:
In file included from /usr/include/glib-2.0/glib.h:114,
from src/include/glib-compat.h:32,
from src/include/qemu/osdep.h:144,
from ../src/hw/virtio/vhost-shadow-virtqueue.c:10:
In function ‘g_autoptr_cleanup_generic_gfree’,
inlined from ‘vhost_handle_guest_kick’ at ../src/hw/virtio/vhost-shadow-virtqueue.c:292:42:
/usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: ‘elem’ may be used uninitialized [-Werror=maybe-uninitialized]
28 | g_free (*pp);
| ^~~~~~~~~~~~
../src/hw/virtio/vhost-shadow-virtqueue.c: In function ‘vhost_handle_guest_kick’:
../src/hw/virtio/vhost-shadow-virtqueue.c:292:42: note: ‘elem’ was declared here
292 | g_autofree VirtQueueElement *elem;
| ^~~~cc1: all warnings being treated as errors
There is actually no problem since "elem" is initialized in both branches. Silence the warning by initializig it with "NULL".
$ gcc --version gcc (GCC) 12.2.0
Message-Id: <[email protected]>
--- hw/virtio/vhost-shadow-virtqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/virtio/vhost-shadow-virtqueue.c +1 -1
@@ -289,7 +289,7 @@ static void vhost_handle_guest_kick(VhostShadowVirtqueue *svq)virtio_queue_set_notification (svq->vq, false);while (true) { - g_autofree VirtQueueElement *elem; + g_autofree VirtQueueElement *elem = NULL;int r;if (svq->next_guest_avail_elem) {
Signature · 1 line
2.37.3
Stefan Hajnoczi
AppliedApplied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes.