On a Thursday in 2021, Daniel Henrique Barboza wrote:
x86Compute() is a static function called only by virCPUx86Compare()
which passes NULL to the 'guest' parameter of x86Compute().
The last caller of x86Compute() that used it with 'guest' != NULL
was an API called 'cpuGuestData'. This API was dropped by commit
03fa904c0c0cb2 a few years ago. Since then all callers of x86Compute()
uses it with 'guest' = NULL.
Removing the 'guest' parameter allow us to remove a good chunk of
logic that isn't being used for awhile.
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/cpu/cpu_x86.c | 38 +-------------------------------------
1 file changed, 1 insertion(+), 37 deletions(-)
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 54cfed3fe6..e396bbb4e4 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -1833,7 +1833,6 @@ virCPUx86DataParse(xmlNodePtr node)
static virCPUCompareResult
x86Compute(virCPUDef *host,
virCPUDef *cpu,
- virCPUData **guest,
char **message)
{
virCPUx86Map *map = NULL;
@@ -1848,7 +1847,6 @@ x86Compute(virCPUDef *host,
g_autoptr(virCPUData) guestData = NULL;
virCPUCompareResult ret;
virCPUx86CompareResult result;
- virArch arch;
size_t i;
../../work/libvirt/src/cpu/cpu_x86.c:1846:31: error: unused variable 'guest_model'
[-Werror,-Wunused-variable]
g_autoptr(virCPUx86Model) guest_model = NULL;
^
../../work/libvirt/src/cpu/cpu_x86.c:1847:27: error: unused variable 'guestData'
[-Werror,-Wunused-variable]
g_autoptr(virCPUData) guestData = NULL;
if (cpu->arch != VIR_ARCH_NONE) {
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano