From f84dc957fd2ff041010655f277c5b10573a44c57 Mon Sep 17 00:00:00 2001 From: Erik Kaneda Date: Wed, 8 Apr 2020 09:30:23 -0700 Subject: IVRS table: fix potentially uninitialized variable warning Some compilers catch potential uninitialized variables. This is done by examining branches of if/else statements. This change replaces an "else if" with an "else" to fix the uninitialized variable warning. Signed-off-by: Erik Kaneda --- source/common/dmtbdump2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/common/dmtbdump2.c b/source/common/dmtbdump2.c index 688a2cf94..45484825a 100644 --- a/source/common/dmtbdump2.c +++ b/source/common/dmtbdump2.c @@ -528,8 +528,10 @@ AcpiDmDumpIvrs ( DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable, sizeof (ACPI_IVRS_HARDWARE1)); } - else if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE2) + else { + /* ACPI_IVRS_TYPE_HARDWARE2 subtable type */ + EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE2); DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable, sizeof (ACPI_IVRS_HARDWARE2)); -- cgit v1.2.1