From 1875d373e5ec9b706312240b94698684da1505b5 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sat, 2 Sep 2023 05:53:56 +0200 Subject: [PATCH] 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. --- Ports/acpica-tools/package.sh | 4 +++ ...enity-definitions-for-LibC-includes.patch} | 0 ...ompiler-warnings-on-dangling-pointer.patch | 31 ------------------- ...arnings-for-Werror-bad-function-cast.patch | 21 ------------- Ports/acpica-tools/patches/ReadMe.md | 12 +------ 5 files changed, 5 insertions(+), 63 deletions(-) rename Ports/acpica-tools/patches/{0002-Add-serenity-definitions-for-LibC-includes.patch => 0001-Add-serenity-definitions-for-LibC-includes.patch} (100%) delete mode 100644 Ports/acpica-tools/patches/0001-Stop-compiler-warnings-on-dangling-pointer.patch delete mode 100644 Ports/acpica-tools/patches/0003-Disable-warnings-for-Werror-bad-function-cast.patch diff --git a/Ports/acpica-tools/package.sh b/Ports/acpica-tools/package.sh index 33b15b0c4a7..53033ff8f23 100755 --- a/Ports/acpica-tools/package.sh +++ b/Ports/acpica-tools/package.sh @@ -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' diff --git a/Ports/acpica-tools/patches/0002-Add-serenity-definitions-for-LibC-includes.patch b/Ports/acpica-tools/patches/0001-Add-serenity-definitions-for-LibC-includes.patch similarity index 100% rename from Ports/acpica-tools/patches/0002-Add-serenity-definitions-for-LibC-includes.patch rename to Ports/acpica-tools/patches/0001-Add-serenity-definitions-for-LibC-includes.patch diff --git a/Ports/acpica-tools/patches/0001-Stop-compiler-warnings-on-dangling-pointer.patch b/Ports/acpica-tools/patches/0001-Stop-compiler-warnings-on-dangling-pointer.patch deleted file mode 100644 index a2ed157395e..00000000000 --- a/Ports/acpica-tools/patches/0001-Stop-compiler-warnings-on-dangling-pointer.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Liav A -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) diff --git a/Ports/acpica-tools/patches/0003-Disable-warnings-for-Werror-bad-function-cast.patch b/Ports/acpica-tools/patches/0003-Disable-warnings-for-Werror-bad-function-cast.patch deleted file mode 100644 index 84d94d397c7..00000000000 --- a/Ports/acpica-tools/patches/0003-Disable-warnings-for-Werror-bad-function-cast.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Liav A -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\ diff --git a/Ports/acpica-tools/patches/ReadMe.md b/Ports/acpica-tools/patches/ReadMe.md index e481996e9e6..3d01d7cb29e 100644 --- a/Ports/acpica-tools/patches/ReadMe.md +++ b/Ports/acpica-tools/patches/ReadMe.md @@ -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 - -