Skip to content

Commit

Permalink
acpi: ignore new gcc 9 warning
Browse files Browse the repository at this point in the history
gcc 9 started to give us the following warnings:

external/x64/acpica/source/components/tables/tbfind.c:162:5: error: ‘strncpy’ specified bound 6 equals destination size [-Werror=stringop-truncation]
  162 |     ACPI_STRNCPY (Header.OemId, OemId, ACPI_OEM_ID_SIZE);
      |     ^~~~~~~~~~~~

Let's just turn of this warning for the ACPI files. We're not going
to fix problems in that library (and I'm not even sure it is a real
problem, I don't know if "OemId" is really guaranteed to be null
terminated).

Signed-off-by: Nadav Har'El <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
nyh authored and Waldemar Kozaczuk committed May 19, 2019
1 parent 51722a9 commit c4c155c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ acpi-defines = -DACPI_MACHINE_WIDTH=64 -DACPI_USE_LOCAL_CACHE
acpi-source := $(shell find external/$(arch)/acpica/source/components -type f -name '*.c')
acpi = $(patsubst %.c, %.o, $(acpi-source))

$(acpi:%=$(out)/%): CFLAGS += -fno-strict-aliasing
$(acpi:%=$(out)/%): CFLAGS += -fno-strict-aliasing -Wno-stringop-truncation

endif # x64

Expand Down

0 comments on commit c4c155c

Please sign in to comment.