Description: Use an enum constant for FWTS_ASSERT to fix GCC 14 build failure
 The fwts_firmware_feature_string() function declared
 "const int n = FWTS_ARRAY_SIZE(feature_names);" and passed expressions
 using n to the compile-time assertion macro FWTS_ASSERT(), which expands
 to "enum { ... = 1 / !!(e) }". A const-qualified variable is not an
 integer constant expression in C, so GCC 14+ rejects it with
 "enumerator value is not an integer constant".
 Change the declaration to "enum { n = FWTS_ARRAY_SIZE(feature_names) };"
 so n is a real integer constant expression, preserving the compile-time
 assertions.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Origin: other
Forwarded: not-needed
Last-Update: 2026-09-02

--- fwts-26.03.00.orig/src/lib/src/fwts_firmware.c
+++ fwts-26.03.00/src/lib/src/fwts_firmware.c
@@ -79,7 +79,7 @@ const char *fwts_firmware_feature_string
 		{ FWTS_FW_FEATURE_IPMI,		"IPMI" },
 	};
 
-	const int n = FWTS_ARRAY_SIZE(feature_names);
+	enum { n = FWTS_ARRAY_SIZE(feature_names) };
 	static const char sep[] = ", ";
 	static char str[60];
 	size_t len;
