From 3bbdff1826c5b3931e24aff72b787adc67dff111 Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Tue, 10 Jan 2023 18:45:41 +0530 Subject: [PATCH] Fix build warnings due to unsupported cflags for clang This commit removes following cflags from tizen build that are not supported for clang. -Wno-unused-but-set-variable -Wno-null-pointer-subtraction Change-Id: Idde981cf2bc247de0a60aca8b2c6c215baf0caa9 Signed-off-by: Chandan Padhi --- build/config/compiler/BUILD.gn | 2 +- third_party/wtl/BUILD.gn | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index c4f2a94..2f9b4f1 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -1754,7 +1754,7 @@ config("no_chromium_code") { # third-party libraries. "-Wno-c++11-narrowing", ] - if (!is_nacl) { + if (!is_nacl && !is_tizen) { cflags += [ # Disabled for similar reasons as -Wunused-variable. "-Wno-unused-but-set-variable", diff --git a/third_party/wtl/BUILD.gn b/third_party/wtl/BUILD.gn index 5576766..5ce8053 100644 --- a/third_party/wtl/BUILD.gn +++ b/third_party/wtl/BUILD.gn @@ -8,8 +8,10 @@ config("wtl_includes") { if (is_clang) { defines = [ "_WTL_NO_AUTOMATIC_NAMESPACE" ] - # See https://crbug.com/1208419. - cflags = [ "-Wno-null-pointer-subtraction" ] + if (!is_tizen) { + # See https://crbug.com/1208419. + cflags = [ "-Wno-null-pointer-subtraction" ] + } } } -- 2.7.4