Skip to content

Commit df03dae

Browse files
committed
Fix fuchsia unused field/variable compile error
Skia's fOwnedEnd gets written in the constructor init list and is never read again. Looks like this might have to do with a change in std::vector<>::const_iterator where it was previously not triggering a warning but now is. Fuchsia uses clang's libc++ whereas the other embedders use Flutter's own copy, which is unaffected by toolchain rolls. This also fixes an unused variable in ParagraphImpl.cpp. Issue: flutter#192609
1 parent ea6123f commit df03dae

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

‎engine/src/build/config/BUILDCONFIG.gn‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,10 @@ if (!is_component_build) {
532532
}
533533
}
534534

535+
# Applied by Skia's skia_* target templates. See
536+
# //flutter/third_party/skia/gn/skia.gni.
537+
skia_target_default_configs = [ "//flutter/build/config/skia:warnings" ]
538+
535539
# Test defaults.
536540
set_defaults("test") {
537541
if (is_android) {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright 2013 The Flutter Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
# Applied to Skia's targets only, via skia_target_default_configs in
6+
# //build/config/BUILDCONFIG.gn.
7+
config("warnings") {
8+
cflags = []
9+
10+
if (is_fuchsia && is_clang) {
11+
# Dead declarations in Skia that only warn against the libc++ headers
12+
# bundled in the Fuchsia toolchain.
13+
# TODO(chrisbracken): remove once fixed upstream in Skia.
14+
# https://github.com/flutter/flutter/issues/192609
15+
cflags += [
16+
"-Wno-unused-private-field",
17+
"-Wno-unused-variable",
18+
]
19+
}
20+
}

0 commit comments

Comments
 (0)