From 71a1df3e42eed9005d55ff58161cfd239e6e462d Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 10 Dec 2012 10:48:50 +0100 Subject: -Wc++11-narrowing "non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'uint16' (aka 'unsigned short') in initializer list" etc. with Clang -std=c++11 Change-Id: I15ff37bbc3d20c14db850678a9b9e295b900de85 --- graphite/UnpackedTarball_graphite.mk | 1 + graphite/graphite2.narrowing.patch.1 | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 graphite/graphite2.narrowing.patch.1 (limited to 'graphite') diff --git a/graphite/UnpackedTarball_graphite.mk b/graphite/UnpackedTarball_graphite.mk index 53b73b197922..25638dad8ea6 100644 --- a/graphite/UnpackedTarball_graphite.mk +++ b/graphite/UnpackedTarball_graphite.mk @@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,graphite,$(GRAPHITE_TARBALL))) $(eval $(call gb_UnpackedTarball_add_patches,graphite,\ graphite/graphite2.patch \ graphite/graphite2.issue1030.patch.1 \ + graphite/graphite2.narrowing.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/graphite/graphite2.narrowing.patch.1 b/graphite/graphite2.narrowing.patch.1 new file mode 100644 index 000000000000..f19c8a3749f4 --- /dev/null +++ b/graphite/graphite2.narrowing.patch.1 @@ -0,0 +1,22 @@ +--- graphite/src/Code.cpp ++++ graphite/src/Code.cpp +@@ -169,8 +169,8 @@ Machine::Code::Code(bool is_constraint, + bytecode_end, + pre_context, + rule_length, +- silf.numClasses(), +- face.glyphs().numAttrs(), ++ static_cast(silf.numClasses()), ++ static_cast(face.glyphs().numAttrs()), + face.numFeatures(), + {1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,255, +@@ -178,7 +178,7 @@ Machine::Code::Code(bool is_constraint, + 1,1,1,1,1,1,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, +- 0,0,0,0,0,0,0, silf.numUser()} ++ 0,0,0,0,0,0,0, static_cast(silf.numUser())} + }; + + decoder dec(lims, *this); -- cgit