mirror of
https://codeberg.org/canoeboot/cbmk.git
synced 2025-05-13 02:45:20 +01:00

while cherry picking other recent lbmk changes, i skipped the coreboot updates, because the lbmk ones were done in mayn commits. it's more efficient just to do it all in bulk, when adapting for canoeboot. Signed-off-by: Leah Rowe <leah@libreboot.org>
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
From b38aff748d74a75ad82317426cd5b0d682e00bbf Mon Sep 17 00:00:00 2001
|
|
From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
|
Date: Tue, 29 Apr 2025 17:31:13 +0300
|
|
Subject: [PATCH 09/15] WIP: Fix build with GCC 15 as host compiler
|
|
|
|
GCC 15 now considers the unterminated-string-initialization warning as
|
|
part of -Werror by default. Coreboot compiles host utilities with the
|
|
system compiler, which results in getting this error in some files.
|
|
|
|
Mark a hexadecimal translation table in cbfstool code as "nonstring" to
|
|
avoid the warning-turned-error.
|
|
|
|
The bios log prefixes are non-null-terminated as well, but I couldn't
|
|
figure out how to mark them as non-strings. Temporarily disable the
|
|
warning with a pragma to avoid the error. That pragma causes an error on
|
|
GCC 14, so disable pragma warnings along with it to avoid that as well.
|
|
|
|
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
|
---
|
|
util/cbfstool/common.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
|
|
index c1725dc903..930c04e63a 100644
|
|
--- a/util/cbfstool/common.c
|
|
+++ b/util/cbfstool/common.c
|
|
@@ -202,7 +202,7 @@ uint64_t intfiletype(const char *name)
|
|
|
|
char *bintohex(uint8_t *data, size_t len)
|
|
{
|
|
- static const char translate[16] = "0123456789abcdef";
|
|
+ static const char translate[16] __attribute__((__nonstring__)) = "0123456789abcdef";
|
|
|
|
char *result = malloc(len * 2 + 1);
|
|
if (result == NULL)
|
|
--
|
|
2.39.5
|
|
|