mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
Due to the compiler change of openwrt, from gcc version 11 to gcc
version 12, we have now the following build errors.
../../../source/components/utilities/utdebug.c: In function
'AcpiUtInitStackPtrTrace':
../../../source/components/utilities/utdebug.c:188:31: error: storing
the address of local variable 'CurrentSp' in 'AcpiGbl_EntryStackPointer'
[-Werror=dangling-pointer=]
188 | AcpiGbl_EntryStackPointer = &CurrentSp;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
../../../source/components/utilities/utdebug.c:185:29: note: 'CurrentSp'
declared here
185 | ACPI_SIZE CurrentSp;
| ^~~~~~~~~
In file included from ../../../source/include/acpi.h:173,
from
../../../source/components/utilities/utdebug.c:154:
../../../source/include/acglobal.h:335:41: note:
'AcpiGbl_EntryStackPointer' declared here
335 | ACPI_GLOBAL (ACPI_SIZE *,
AcpiGbl_EntryStackPointer);
|
^~~~~~~~~~~~~~~~~~~~~~~~~
../../../source/include/acpixf.h:188:17: note: in definition of macro
'ACPI_GLOBAL'
188 | extern type name
| ^~~~
cc1: all warnings being treated as errors
make[4]: *** [../Makefile.rules:20: obj/utdebug.o] Error 1
This is already issue opend in the the upstream project acpica.
https://github.com/acpica/acpica/issues/771
There is already a fix available, but it has not yet been merged.
https://github.com/acpica/acpica/pull/776
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
23 lines
977 B
Diff
23 lines
977 B
Diff
From 0f814783ef9ed3a50e15cab08579218ec45b4640 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
|
|
Date: Sat, 21 May 2022 12:15:16 +0200
|
|
Subject: [PATCH 1/3] ACPI_CAST_PTR: cast through "void *"
|
|
|
|
Not all pointer are castable to integers directly and ACPI_UINTPTR_T is
|
|
not guaranteed to be "void *".
|
|
---
|
|
source/include/actypes.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/source/include/actypes.h
|
|
+++ b/source/include/actypes.h
|
|
@@ -649,7 +649,7 @@ typedef UINT64
|
|
|
|
/* Pointer manipulation */
|
|
|
|
-#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (p))
|
|
+#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (void *) (p))
|
|
#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (ACPI_UINTPTR_T) (p))
|
|
#define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) + (ACPI_SIZE)(b)))
|
|
#define ACPI_SUB_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) - (ACPI_SIZE)(b)))
|