diff --git a/meta-ohos-core/recipes-gnome/gtk+/gtk+3_%.bbappend b/meta-ohos-core/recipes-gnome/gtk+/gtk+3_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..5d45fda079f97d1f51ac9329ac61e3aad4bd59b4 --- /dev/null +++ b/meta-ohos-core/recipes-gnome/gtk+/gtk+3_%.bbappend @@ -0,0 +1,12 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# SPDX-License-Identifier: Apache-2.0 + +# gtk uses zero-length array tricks that trigger warnings with +# -Warray-bounds. +# +# Those have been verified to be harmless in 3.24.14. +# +# Removing -Werror=array-bounds here allows us to use -Werror=array-bounds +# globally in OPTIMIZE_FOR=security mode while keeping gtk building. + +TARGET_CFLAGS_remove = "-Werror=array-bounds"