From 62ea7a81654b671744732eb162a92ecb08957b36 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 22 Jun 2023 20:39:31 +0200 Subject: [PATCH] acpi/acpigen.c: Be explicit about char sign The sign of 'char' is not standardized and with GCC is architecture dependent. This fixes warnings when compiling this file on arm64. Signed-off-by: Arthur Heymans Change-Id: I53b99835b2ffec5d752fc531fd59e4715f61aced Reviewed-on: https://review.coreboot.org/c/coreboot/+/76006 Reviewed-by: Felix Singer Tested-by: build bot (Jenkins) --- src/acpi/acpigen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c index fb92b89f03..e61954fd7f 100644 --- a/src/acpi/acpigen.c +++ b/src/acpi/acpigen.c @@ -187,7 +187,7 @@ void acpigen_write_name_unicode(const char *name, const char *string) acpigen_write_len_f(); acpigen_write_integer(len); for (size_t i = 0; i < len; i++) { - const char c = string[i]; + const signed char c = string[i]; /* Simple ASCII to UTF-16 conversion, replace non ASCII characters */ acpigen_emit_word(c >= 0 ? c : '?'); }