diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-12-10 10:48:50 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-12-10 10:49:49 +0100 |
commit | 71a1df3e42eed9005d55ff58161cfd239e6e462d (patch) | |
tree | c7585daebf70f2f275a974731dc5837203d2d9ba /graphite | |
parent | d0b590fe19b45e2248adff22c6fe61a4049a7db8 (diff) |
-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
Diffstat (limited to 'graphite')
-rw-r--r-- | graphite/UnpackedTarball_graphite.mk | 1 | ||||
-rw-r--r-- | graphite/graphite2.narrowing.patch.1 | 22 |
2 files changed, 23 insertions, 0 deletions
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<uint16>(silf.numClasses()), ++ static_cast<uint16>(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<byte>(silf.numUser())} + }; + + decoder dec(lims, *this); |