diff --git a/meta-oniro-core/recipes-core/ncurses/ncurses_%.bbappend b/meta-oniro-core/recipes-core/ncurses/ncurses_%.bbappend
index 208b41155767302bc4c91a0ac1247d377303440c..af393c14eb8207d30b4c99ec2c276948c9701c18 100644
--- a/meta-oniro-core/recipes-core/ncurses/ncurses_%.bbappend
+++ b/meta-oniro-core/recipes-core/ncurses/ncurses_%.bbappend
@@ -10,4 +10,4 @@
 # -Werror=format-nonliteral globally in OPTIMIZE_FOR=security mode
 # while keeping ncurses building.
 
-TARGET_CFLAGS_remove = "-Werror=format-nonliteral"
+TARGET_CFLAGS:remove = "-Werror=format-nonliteral"