Ports/acpica-tools: Don't treat warnings as errors

This also removes existing patches that were trying to fix warnings
one-by-one.

Note that the patch making `CurrentSp` static was incorrect, the
variable needs to be on the stack for us to retrieve the current stack
address.
This commit is contained in:
Tim Schumacher 2023-09-02 05:53:56 +02:00 committed by Andrew Kaster
parent 54e79aa1d9
commit 1875d373e5
Notes: sideshowbarker 2024-07-17 05:09:48 +09:00
5 changed files with 5 additions and 63 deletions

View File

@ -15,3 +15,7 @@ build() {
run make acpisrc
run make acpibin
}
# acpica contains unknown warning flags (on Clang) and is generally littered with warnings,
# some of them intentional. Make sure that we at least don't error on them.
export NOWERROR='TRUE'

View File

@ -1,31 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Liav A <liavalb@gmail.com>
Date: Fri, 14 Jul 2023 16:05:27 +0300
Subject: [PATCH] Stop compiler warnings on dangling pointer
---
source/components/utilities/utdebug.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/components/utilities/utdebug.c b/source/components/utilities/utdebug.c
index 82e8a62050beec30d3b067a8516bb23f3808182a..f4b40bb5b10e8e3d9bf3d60b7332ba70aa40a2c6 100644
--- a/source/components/utilities/utdebug.c
+++ b/source/components/utilities/utdebug.c
@@ -182,7 +182,7 @@ void
AcpiUtInitStackPtrTrace (
void)
{
- ACPI_SIZE CurrentSp;
+ static ACPI_SIZE CurrentSp;
#pragma GCC diagnostic push
@@ -210,7 +210,7 @@ void
AcpiUtTrackStackPtr (
void)
{
- ACPI_SIZE CurrentSp;
+ static ACPI_SIZE CurrentSp;
if (&CurrentSp < AcpiGbl_LowestStackPointer)

View File

@ -1,21 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Liav A <liavalb@gmail.com>
Date: Fri, 21 Jul 2023 10:27:26 +0300
Subject: [PATCH] Disable warnings for Werror=bad-function-cast
---
generate/unix/Makefile.config | 1 +
1 file changed, 1 insertion(+)
diff --git a/generate/unix/Makefile.config b/generate/unix/Makefile.config
index 0deeb14115c1473ef0e1b55f6e174122ae52633d..0374e09d880f0ecec165acc32e7b30a4dbb0c8cc 100644
--- a/generate/unix/Makefile.config
+++ b/generate/unix/Makefile.config
@@ -202,6 +202,7 @@ CWARNINGFLAGS = \
-std=c99\
-Wall\
-Wbad-function-cast\
+ -Wno-error=bad-function-cast\
-Wdeclaration-after-statement\
-Wformat=2\
-Wmissing-declarations\

View File

@ -1,18 +1,8 @@
# Patches for acpica-tools on SerenityOS
## `0001-Stop-compiler-warnings-on-dangling-pointer.patch`
Stop compiler warnings on dangling pointer
## `0002-Add-serenity-definitions-for-LibC-includes.patch`
## `0001-Add-serenity-definitions-for-LibC-includes.patch`
Add serenity definitions for LibC includes
We use the netbsd "acnetbsd.h" file here as a template.
## `0003-Disable-warnings-for-Werror-bad-function-cast.patch`
Disable warnings for Werror=bad-function-cast