diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-03-08 12:45:58 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-03-08 12:45:58 +0000 |
commit | fb769976952944b4e9bfb668cdce9c401ff1e01a (patch) | |
tree | 9ff1a55f55f2a85c89ea205ff61e60f0687b07e4 | |
parent | 95fac51f4c3e437a3c361c5d6c44bcc680a23743 (diff) |
lcdf-typetools: a few compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@21646 c570f23f-e606-0410-a88d-b1316a301751
4 files changed, 41 insertions, 3 deletions
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.85-PATCHES/ChangeLog b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.85-PATCHES/ChangeLog index 38e86dc3e1a..8601fbc8e66 100644 --- a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.85-PATCHES/ChangeLog +++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.85-PATCHES/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-02-warnings (new): Remove unused variables; add explicit + cast for `-1' used as `uint32_t'. + 2010-10-04 Peter Breitenlohner <peb@mppmu.mpg.de> Import lcdf-typetools-2.85. diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.85-PATCHES/patch-02-warnings b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.85-PATCHES/patch-02-warnings new file mode 100644 index 00000000000..a1d7d715c61 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.85-PATCHES/patch-02-warnings @@ -0,0 +1,35 @@ + Avoid some compiler warnings: + remove unused variables + add explicit cast for `-1' used as `uint32_t' + +diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.85.orig/liblcdf/straccum.cc lcdf-typetools-2.85/liblcdf/straccum.cc +--- lcdf-typetools-2.85.orig/liblcdf/straccum.cc 2010-09-06 20:55:31.000000000 +0200 ++++ lcdf-typetools-2.85/liblcdf/straccum.cc 2011-03-08 11:13:12.000000000 +0100 +@@ -139,7 +139,6 @@ + else { + unsigned char *old_s = _s; + int old_len = _len; +- int old_cap = _cap; + + _s = 0; + _len = 0; +diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.85.orig/otftotfm/dvipsencoding.cc lcdf-typetools-2.85/otftotfm/dvipsencoding.cc +--- lcdf-typetools-2.85.orig/otftotfm/dvipsencoding.cc 2010-09-27 04:17:32.000000000 +0200 ++++ lcdf-typetools-2.85/otftotfm/dvipsencoding.cc 2011-03-08 11:24:32.000000000 +0100 +@@ -30,7 +30,7 @@ + GLYPHLIST_USEMAP = GLYPHLIST_ALTERNATIVE, + U_EMPTYSLOT = 0xD801, + U_ALTSELECTOR = 0xD802 }; +-static HashMap<String, uint32_t> glyphlist(-1); ++static HashMap<String, uint32_t> glyphlist((uint32_t)-1); + static Vector<uint32_t> glyphmap; + static PermString::Initializer perm_initializer; + PermString DvipsEncoding::dot_notdef(".notdef"); +@@ -162,7 +162,6 @@ + // 16.Aug.2008: Some texnansx.enc have incorrect "Uni" + // prefix, but we might as well understand it. + || memcmp(component.data(), "Uni", 3) == 0)) { +- int old_size = unis.size(); + for (const char *s = component.begin() + 3; + s < component.end(); + s += 4) diff --git a/Build/source/texk/lcdf-typetools/liblcdf/straccum.cc b/Build/source/texk/lcdf-typetools/liblcdf/straccum.cc index e472d3c06d5..90c8366b125 100644 --- a/Build/source/texk/lcdf-typetools/liblcdf/straccum.cc +++ b/Build/source/texk/lcdf-typetools/liblcdf/straccum.cc @@ -139,7 +139,6 @@ StringAccum::append_internal_data(const char *s, int len) else { unsigned char *old_s = _s; int old_len = _len; - int old_cap = _cap; _s = 0; _len = 0; diff --git a/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.cc b/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.cc index 5ca912ee58d..7ff0dd3f49f 100644 --- a/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.cc +++ b/Build/source/texk/lcdf-typetools/otftotfm/dvipsencoding.cc @@ -30,7 +30,7 @@ enum { GLYPHLIST_ALTERNATIVE = 0x40000000, GLYPHLIST_USEMAP = GLYPHLIST_ALTERNATIVE, U_EMPTYSLOT = 0xD801, U_ALTSELECTOR = 0xD802 }; -static HashMap<String, uint32_t> glyphlist(-1); +static HashMap<String, uint32_t> glyphlist((uint32_t)-1); static Vector<uint32_t> glyphmap; static PermString::Initializer perm_initializer; PermString DvipsEncoding::dot_notdef(".notdef"); @@ -162,7 +162,6 @@ DvipsEncoding::glyphname_unicode(String gn, Vector<uint32_t> &unis) // 16.Aug.2008: Some texnansx.enc have incorrect "Uni" // prefix, but we might as well understand it. || memcmp(component.data(), "Uni", 3) == 0)) { - int old_size = unis.size(); for (const char *s = component.begin() + 3; s < component.end(); s += 4) |