From e34456c2541731ad82a95f25250254739287f891 Mon Sep 17 00:00:00 2001 From: liuyifei Date: Thu, 23 Nov 2023 14:28:56 +0800 Subject: [PATCH] modify vsprintf warning Signed-off-by: liuyifei --- frameworks/libhilog/BUILD.gn | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frameworks/libhilog/BUILD.gn b/frameworks/libhilog/BUILD.gn index ff99027..6a20fa2 100644 --- a/frameworks/libhilog/BUILD.gn +++ b/frameworks/libhilog/BUILD.gn @@ -79,17 +79,15 @@ template("libhilog_source") { sources += vsnprintf_sources defines = [] + cflags_cc = [ "-Wno-deprecated-declarations" ] if (platform == "windows") { - cflags_cc = [ "-std=c++17" ] + cflags_cc += [ "-std=c++17" ] defines += [ "__WINDOWS__" ] } else if (platform == "mac") { - cflags_cc = [ - "-std=c++17", - "-Wno-deprecated-declarations", - ] + cflags_cc += [ "-std=c++17" ] defines += [ "__MAC__" ] } else if (platform == "linux") { - cflags_cc = [ "-std=c++17" ] + cflags_cc += [ "-std=c++17" ] defines += [ "__LINUX__" ] } else { defines = [ "__RECV_MSG_WITH_UCRED_" ] @@ -134,6 +132,7 @@ ohos_source_set("libhilog_base_source") { sources = [ "$libhilog_base_root/hilog_base.cpp" ] sources += vsnprintf_sources + cflags_c = [ "-Wno-deprecated-declarations" ] defines = [ "__RECV_MSG_WITH_UCRED_", "HILOG_PROHIBIT_ALLOCATION", -- Gitee