From 53aa1109dd88ae3bade21e596bbca6b153c81829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= <bernhard.rosenkraenzer.ext@huawei.com> Date: Fri, 3 Sep 2021 15:52:16 +0200 Subject: [PATCH] hdparm: Remove -Werror=format-nonliteral from compiler flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hdparm's sysfs I/O functions trigger warnings with -Wformat-nonliteral, but the format strings are checked by other means. This has been verified to be harmless in 9.58. Removing -Werror=format-nonliteral here allows us to use -Werror=format-nonliteral globally in OPTIMIZE_FOR=security mode while keeping hdparm building. Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com> --- .../recipes-extended/hdparm/hdparm_%.bbappend | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 meta-ohos-core/recipes-extended/hdparm/hdparm_%.bbappend diff --git a/meta-ohos-core/recipes-extended/hdparm/hdparm_%.bbappend b/meta-ohos-core/recipes-extended/hdparm/hdparm_%.bbappend new file mode 100644 index 00000000..b65112b0 --- /dev/null +++ b/meta-ohos-core/recipes-extended/hdparm/hdparm_%.bbappend @@ -0,0 +1,13 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# SPDX-License-Identifier: Apache-2.0 + +# hdparm's sysfs I/O functions trigger warnings with +# -Wformat-nonliteral, but the format strings are checked +# by other means. +# This has been verified to be harmless in 9.58. +# +# Removing -Werror=format-nonliteral here allows us to use +# -Werror=format-nonliteral globally in OPTIMIZE_FOR=security mode +# while keeping hdparm building. + +TARGET_CFLAGS_remove = "-Werror=format-nonliteral" -- GitLab