diff --git a/meta-ohos-core/recipes-extended/ltp/ltp_%.bbappend b/meta-ohos-core/recipes-extended/ltp/ltp_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..fcd38d72e8f05594eeeedf3fa747c7bb1b6d2280 --- /dev/null +++ b/meta-ohos-core/recipes-extended/ltp/ltp_%.bbappend @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# SPDX-License-Identifier: Apache-2.0 + +# ltp uses zero-length array tricks causing array-bounds warnings. +# The warnings have been verifited to be harmless in 20200120; for extra +# security, this should be re-checked after updating. +# +# Removing -Werror=array-bounds here allows us to use -Werror=array-bounds +# globally in OPTIMIZE_FOR=security mode. + +TARGET_CFLAGS_remove = "-Werror=array-bounds"