diff mbox series

[3/3] acpi: hest: Remove unused variable to avoid compiler warning

Message ID 20260507065638.2809947-4-thuth@redhat.com
State Accepted
Headers show
Series Fix compiler warnings with GCC v16 | expand

Commit Message

Thomas Huth May 7, 2026, 6:56 a.m. UTC
From: Thomas Huth <thuth@redhat.com>

With GCC 16, the compilation fails with:

 acpi/hest/hest.c: In function ‘hest_test1’:
 acpi/hest/hest.c:790:18: error: variable ‘hest_type_11_count’ set but not used
  [-Werror=unused-but-set-variable=]
   790 |                  hest_type_11_count = 0;
       |                  ^~~~~~~~~~~~~~~~~~
 cc1: all warnings being treated as errors

Remove the unused variable to fix the problem.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 src/acpi/hest/hest.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/src/acpi/hest/hest.c b/src/acpi/hest/hest.c
index e0da7f4a..5313fa7c 100644
--- a/src/acpi/hest/hest.c
+++ b/src/acpi/hest/hest.c
@@ -786,8 +786,7 @@  static int hest_test1(fwts_framework *fw)
         ssize_t length = (ssize_t)hest->header.length;
 	uint32_t hest_type_00_count = 0,
 		 hest_type_01_count = 0,
-		 hest_type_02_count = 0,
-		 hest_type_11_count = 0;
+		 hest_type_02_count = 0;
 
 	if (!fwts_acpi_table_length(fw, "HEST", table->length, sizeof(fwts_acpi_table_hest))) {
 		passed = false;
@@ -835,7 +834,6 @@  static int hest_test1(fwts_framework *fw)
 		case 11:
 			/* the structure of type 11 is the same as type 1 */
 			hest_check_ia32_arch_corrected_machine_check(fw, &length, &data, &passed);
-			hest_type_11_count++;
 			break;
 		default:
 			fwts_failed(fw, LOG_LEVEL_HIGH,