[Wconversion] Suppress warnings
Bug: 56258
Bug: 58162
Change-Id: Id8b2eeba114652527710affe3f35483cb0d6e9b6
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/freetype2/+/422715
Reviewed-by: Petr Hosek <phosek@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 6e6f987..680534d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -27,9 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
config("freetype_config") {
- include_dirs = [
- "include",
- ]
+ include_dirs = [ "include" ]
cflags = []
@@ -45,25 +43,21 @@
# Without `-fPIC`, we get the error:
# > ld.lld: error: can't create dynamic relocation R_X86_64_64 against local symbol in readonly
# > segment
- cflags = ["-fPIC"]
+ cflags = [ "-fPIC" ]
}
#TODO(mikejurka): Remove once we've migrated to the freetype2 target everywhere
group("freetype") {
- public_deps = [
- ":freetype2",
- ]
+ public_deps = [ ":freetype2" ]
}
template("freetype_library") {
target(invoker.library_type, target_name) {
- forward_variables_from(invoker, "*")
-
if (!defined(rust_host)) {
rust_host = false
}
- shared_lib = (library_type == "shared_library")
+ shared_lib = library_type == "shared_library"
sources = [
"src/autofit/autofit.c",
@@ -77,9 +71,9 @@
"src/base/ftinit.c",
"src/base/ftmm.c",
"src/base/ftstroke.c",
+ "src/base/ftsynth.c",
"src/base/ftsystem.c",
"src/base/fttype1.c",
- "src/base/ftsynth.c",
"src/gzip/ftgzip.c",
"src/lzw/ftlzw.c",
"src/psaux/psaux.c",
@@ -89,13 +83,15 @@
"src/smooth/smooth.c",
# Font Drivers. Drivers need to be enabled in ftmodule.h explicitly.
- "src/cff/cff.c", # OpenType, (.cff, .cef)
- "src/truetype/truetype.c", # TrueType
+ "src/cff/cff.c", # OpenType, (.cff, .cef)
+ "src/truetype/truetype.c", # TrueType
]
# TODO(46923): UBSan has found an instance of undefined behavior in this target.
# Disable UBSan for this target temporarily until it is migrated into CI/CQ.
configs += [ "//build/config:temporarily_disable_ubsan_do_not_use" ]
+ # TODO(fxb/58162): delete the below and fix compiler warnings
+ configs += [ "//build/config:Wno-conversion" ]
defines = [
"FT2_BUILD_LIBRARY",
@@ -124,15 +120,15 @@
public_configs = [ ":freetype_config" ]
if (rust_host) {
- public_configs += [":freetype_config_for_rust_host"]
+ public_configs += [ ":freetype_config_for_rust_host" ]
}
if (rust_host) {
- deps = ["//third_party/zlib:zlib_for_rust_host"]
+ deps = [ "//third_party/zlib:zlib_for_rust_host" ]
} else {
deps = [
"//third_party/libpng",
- "//third_party/zlib"
+ "//third_party/zlib",
]
}
}