diff --git a/meta-oniro-core/recipes-extended/shadow/shadow_%.bbappend b/meta-oniro-core/recipes-extended/shadow/shadow_%.bbappend
index 8f88b53a2f6b75201aa85e047fa053f725847095..43d22ca9fd2e51e079a33c706f71aaa5d6fbaf87 100644
--- a/meta-oniro-core/recipes-extended/shadow/shadow_%.bbappend
+++ b/meta-oniro-core/recipes-extended/shadow/shadow_%.bbappend
@@ -10,4 +10,4 @@
 # -Werror=format-nonliteral globally in OPTIMIZE_FOR=security mode
 # while keeping shadow building.
 
-TARGET_CFLAGS_remove = "-Werror=format-nonliteral"
+TARGET_CFLAGS:remove = "-Werror=format-nonliteral"