* Mon Nov 14 2022 Miroslav Rezanina <mrezanin@redhat.com> - 7.1.0-5
- kvm-rtl8139-Remove-unused-variable.patch [bz#2141218] - kvm-qemu-img-remove-unused-variable.patch [bz#2141218] - kvm-host-libusb-Remove-unused-variable.patch [bz#2141218] - Resolves: bz#2141218 (qemu-kvm build fails with clang 15.0.1 due to false unused variable error)
This commit is contained in:
parent
3e616168bc
commit
e961a3354a
64
kvm-host-libusb-Remove-unused-variable.patch
Normal file
64
kvm-host-libusb-Remove-unused-variable.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From 529d7d039a8783cb5745330c9731626a608553db Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Wed, 9 Nov 2022 05:09:40 -0500
|
||||
Subject: [PATCH 3/3] host-libusb: Remove unused variable
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
RH-MergeRequest: 122: Remove variables causing 'Unused but set variable' warning on Clang 15
|
||||
RH-Bugzilla: 2141218
|
||||
RH-Commit: [3/3] 460bd469b6f262074c407475c5003581f8993855 (mrezanin/centos-src-qemu-kvm)
|
||||
|
||||
Variable unconnected used in usb_host_auto_check function is only incremented
|
||||
but never read as line where it is read was disabled since introducing the code.
|
||||
This causes 'Unused but set variable' warning on Clang 15.0.1 compiler.
|
||||
|
||||
Removing the variable and disabled code to prevent the warning.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/usb/host-libusb.c | 15 ---------------
|
||||
1 file changed, 15 deletions(-)
|
||||
|
||||
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
|
||||
index 28f8af8941..176868d345 100644
|
||||
--- a/hw/usb/host-libusb.c
|
||||
+++ b/hw/usb/host-libusb.c
|
||||
@@ -1837,7 +1837,6 @@ static void usb_host_auto_check(void *unused)
|
||||
struct USBAutoFilter *f;
|
||||
libusb_device **devs = NULL;
|
||||
struct libusb_device_descriptor ddesc;
|
||||
- int unconnected = 0;
|
||||
int i, n;
|
||||
|
||||
if (usb_host_init() != 0) {
|
||||
@@ -1897,9 +1896,6 @@ static void usb_host_auto_check(void *unused)
|
||||
libusb_free_device_list(devs, 1);
|
||||
|
||||
QTAILQ_FOREACH(s, &hostdevs, next) {
|
||||
- if (s->dh == NULL) {
|
||||
- unconnected++;
|
||||
- }
|
||||
if (s->seen == 0) {
|
||||
if (s->dh) {
|
||||
usb_host_close(s);
|
||||
@@ -1908,17 +1904,6 @@ static void usb_host_auto_check(void *unused)
|
||||
}
|
||||
s->seen = 0;
|
||||
}
|
||||
-
|
||||
-#if 0
|
||||
- if (unconnected == 0) {
|
||||
- /* nothing to watch */
|
||||
- if (usb_auto_timer) {
|
||||
- timer_del(usb_auto_timer);
|
||||
- trace_usb_host_auto_scan_disabled();
|
||||
- }
|
||||
- return;
|
||||
- }
|
||||
-#endif
|
||||
}
|
||||
|
||||
if (!usb_vmstate) {
|
||||
--
|
||||
2.31.1
|
||||
|
45
kvm-qemu-img-remove-unused-variable.patch
Normal file
45
kvm-qemu-img-remove-unused-variable.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 2458bcc8497fb12ad81e9fd5d05a6164d25f00d6 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Wed, 9 Nov 2022 05:12:46 -0500
|
||||
Subject: [PATCH 2/3] qemu-img: remove unused variable
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
RH-MergeRequest: 122: Remove variables causing 'Unused but set variable' warning on Clang 15
|
||||
RH-Bugzilla: 2141218
|
||||
RH-Commit: [2/3] 9cd54891567781090accfb68aa5d80d2c6d68584 (mrezanin/centos-src-qemu-kvm)
|
||||
|
||||
Variable block_count used in img_dd function is only incremented but never read.
|
||||
This causes 'Unused but set variable' warning on Clang 15.0.1 compiler.
|
||||
|
||||
Removing the variable to prevent the warning.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
qemu-img.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/qemu-img.c b/qemu-img.c
|
||||
index 7d4b33b3da..987da256ef 100644
|
||||
--- a/qemu-img.c
|
||||
+++ b/qemu-img.c
|
||||
@@ -4919,7 +4919,7 @@ static int img_dd(int argc, char **argv)
|
||||
const char *out_fmt = "raw";
|
||||
const char *fmt = NULL;
|
||||
int64_t size = 0;
|
||||
- int64_t block_count = 0, out_pos, in_pos;
|
||||
+ int64_t out_pos, in_pos;
|
||||
bool force_share = false;
|
||||
struct DdInfo dd = {
|
||||
.flags = 0,
|
||||
@@ -5119,7 +5119,7 @@ static int img_dd(int argc, char **argv)
|
||||
|
||||
in.buf = g_new(uint8_t, in.bsz);
|
||||
|
||||
- for (out_pos = 0; in_pos < size; block_count++) {
|
||||
+ for (out_pos = 0; in_pos < size; ) {
|
||||
int bytes = (in_pos + in.bsz > size) ? size - in_pos : in.bsz;
|
||||
|
||||
ret = blk_pread(blk1, in_pos, bytes, in.buf, 0);
|
||||
--
|
||||
2.31.1
|
||||
|
44
kvm-rtl8139-Remove-unused-variable.patch
Normal file
44
kvm-rtl8139-Remove-unused-variable.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From a89fed7cdbee76f9a7083ca04e079ab991737eeb Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Wed, 9 Nov 2022 06:40:47 -0500
|
||||
Subject: [PATCH 1/3] rtl8139: Remove unused variable
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
RH-MergeRequest: 122: Remove variables causing 'Unused but set variable' warning on Clang 15
|
||||
RH-Bugzilla: 2141218
|
||||
RH-Commit: [1/3] ffec7ff0238c6859a5ddaea80fcd8e66049fd3fc (mrezanin/centos-src-qemu-kvm)
|
||||
|
||||
Variable send_count used in rtl8139_cplus_transmit_one function is only
|
||||
incremented but never read. This causes 'Unused but set variable' warning
|
||||
on Clang 15.0.1 compiler.
|
||||
|
||||
Removing the variable to prevent the warning.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/net/rtl8139.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
|
||||
index 75dacabc43..445cbd700c 100644
|
||||
--- a/hw/net/rtl8139.c
|
||||
+++ b/hw/net/rtl8139.c
|
||||
@@ -2156,7 +2156,6 @@ static int rtl8139_cplus_transmit_one(RTL8139State *s)
|
||||
ip_data_len, saved_size - ETH_HLEN, large_send_mss);
|
||||
|
||||
int tcp_send_offset = 0;
|
||||
- int send_count = 0;
|
||||
|
||||
/* maximum IP header length is 60 bytes */
|
||||
uint8_t saved_ip_header[60];
|
||||
@@ -2261,7 +2260,6 @@ static int rtl8139_cplus_transmit_one(RTL8139State *s)
|
||||
/* add transferred count to TCP sequence number */
|
||||
stl_be_p(&p_tcp_hdr->th_seq,
|
||||
chunk_size + ldl_be_p(&p_tcp_hdr->th_seq));
|
||||
- ++send_count;
|
||||
}
|
||||
|
||||
/* Stop sending this frame */
|
||||
--
|
||||
2.31.1
|
||||
|
@ -151,7 +151,7 @@ Obsoletes: %{name}-block-ssh <= %{epoch}:%{version} \
|
||||
Summary: QEMU is a machine emulator and virtualizer
|
||||
Name: qemu-kvm
|
||||
Version: 7.1.0
|
||||
Release: 4%{?rcrel}%{?dist}%{?cc_suffix}
|
||||
Release: 5%{?rcrel}%{?dist}%{?cc_suffix}
|
||||
# Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped
|
||||
# Epoch 15 used for RHEL 8
|
||||
# Epoch 17 used for RHEL 9 (due to release versioning offset in RHEL 8.5)
|
||||
@ -251,6 +251,12 @@ Patch46: kvm-Revert-Re-enable-capstone-internal-build.patch
|
||||
Patch47: kvm-target-i386-kvm-fix-kvmclock_current_nsec-Assertion-.patch
|
||||
# For bz#2126095 - [rhel9.2][intel_iommu]Booting guest with "-device intel-iommu,intremap=on,device-iotlb=on,caching-mode=on" causes kernel call trace
|
||||
Patch48: kvm-Revert-intel_iommu-Fix-irqchip-X2APIC-configuration-.patch
|
||||
# For bz#2141218 - qemu-kvm build fails with clang 15.0.1 due to false unused variable error
|
||||
Patch49: kvm-rtl8139-Remove-unused-variable.patch
|
||||
# For bz#2141218 - qemu-kvm build fails with clang 15.0.1 due to false unused variable error
|
||||
Patch50: kvm-qemu-img-remove-unused-variable.patch
|
||||
# For bz#2141218 - qemu-kvm build fails with clang 15.0.1 due to false unused variable error
|
||||
Patch51: kvm-host-libusb-Remove-unused-variable.patch
|
||||
|
||||
%if %{have_clang}
|
||||
BuildRequires: clang
|
||||
@ -1283,6 +1289,13 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 14 2022 Miroslav Rezanina <mrezanin@redhat.com> - 7.1.0-5
|
||||
- kvm-rtl8139-Remove-unused-variable.patch [bz#2141218]
|
||||
- kvm-qemu-img-remove-unused-variable.patch [bz#2141218]
|
||||
- kvm-host-libusb-Remove-unused-variable.patch [bz#2141218]
|
||||
- Resolves: bz#2141218
|
||||
(qemu-kvm build fails with clang 15.0.1 due to false unused variable error)
|
||||
|
||||
* Tue Nov 01 2022 Miroslav Rezanina <mrezanin@redhat.com> - 7.1.0-4
|
||||
- kvm-Revert-intel_iommu-Fix-irqchip-X2APIC-configuration-.patch [bz#2126095]
|
||||
- Resolves: bz#2126095
|
||||
|
Loading…
Reference in New Issue
Block a user