summaryrefslogtreecommitdiff
path: root/Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-01-warnings
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-01-warnings')
-rw-r--r--Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-01-warnings282
1 files changed, 282 insertions, 0 deletions
diff --git a/Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-01-warnings b/Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-01-warnings
new file mode 100644
index 00000000000..79eb38fcdda
--- /dev/null
+++ b/Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-01-warnings
@@ -0,0 +1,282 @@
+diff -ur -N engine-2.3.1.orig/src/font/TtfUtil.cpp engine-2.3.1/src/font/TtfUtil.cpp
+--- engine-2.3.1.orig/src/font/TtfUtil.cpp 2009-01-29 09:33:19.000000000 +0100
++++ engine-2.3.1/src/font/TtfUtil.cpp 2009-10-01 22:48:21.000000000 +0200
+@@ -1223,7 +1223,7 @@
+ (&pGlyph->end_pts_of_contours[cContours]);
+
+ // skip over hints & point to first flag
+- int cbHints = read(*(uint16 *)pbGlyph);
++ int cbHints = read(*(const uint16 *)pbGlyph);
+ pbGlyph += sizeof(uint16);
+ pbGlyph += cbHints;
+
+@@ -1277,7 +1277,7 @@
+ }
+ else
+ {
+- prgnX[iFlag] = read(*(int16 *)pbGlyph);
++ prgnX[iFlag] = read(*(const int16 *)pbGlyph);
+ pbGlyph += sizeof(int16);
+ }
+ }
+@@ -1306,7 +1306,7 @@
+ }
+ else
+ {
+- prgnY[iFlag] = read(*(int16 *)pbGlyph);
++ prgnY[iFlag] = read(*(const int16 *)pbGlyph);
+ pbGlyph += sizeof(int16);
+ }
+ }
+@@ -1342,9 +1342,9 @@
+ size_t iCurrentComp = 0;
+ do
+ {
+- GlyphFlags = read(*((uint16 *)pbGlyph));
++ GlyphFlags = read(*((const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+- prgnCompId[iCurrentComp++] = read(*((uint16 *)pbGlyph));
++ prgnCompId[iCurrentComp++] = read(*((const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+ if (iCurrentComp >= cnCompIdTotal)
+ return false;
+@@ -1386,18 +1386,18 @@
+ uint16 GlyphFlags;
+ do
+ {
+- GlyphFlags = read(*((uint16 *)pbGlyph));
++ GlyphFlags = read(*((const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+- if (read(*((uint16 *)pbGlyph)) == nCompId)
++ if (read(*((const uint16 *)pbGlyph)) == nCompId)
+ {
+ pbGlyph += sizeof(uint16); // skip over glyph id of component
+ fOffset = (GlyphFlags & CompoundGlyph::ArgsAreXYValues) == CompoundGlyph::ArgsAreXYValues;
+
+ if (GlyphFlags & CompoundGlyph::Arg1Arg2Words )
+ {
+- a = read(*(int16 *)pbGlyph);
++ a = read(*(const int16 *)pbGlyph);
+ pbGlyph += sizeof(int16);
+- b = read(*(int16 *)pbGlyph);
++ b = read(*(const int16 *)pbGlyph);
+ pbGlyph += sizeof(int16);
+ }
+ else
+@@ -1451,9 +1451,9 @@
+ uint16 GlyphFlags;
+ do
+ {
+- GlyphFlags = read(*((uint16 *)pbGlyph));
++ GlyphFlags = read(*((const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+- if (read(*((uint16 *)pbGlyph)) == nCompId)
++ if (read(*((const uint16 *)pbGlyph)) == nCompId)
+ {
+ pbGlyph += sizeof(uint16); // skip over glyph id of component
+ pbGlyph += GlyphFlags & CompoundGlyph::Arg1Arg2Words ? 4 : 2; // skip over placement data
+@@ -1465,7 +1465,7 @@
+
+ if (GlyphFlags & CompoundGlyph::HaveScale)
+ {
+- flt11 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt11 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+ flt12 = 0;
+ flt21 = 0;
+@@ -1473,22 +1473,22 @@
+ }
+ else if (GlyphFlags & CompoundGlyph::HaveXAndYScale)
+ {
+- flt11 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt11 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+ flt12 = 0;
+ flt21 = 0;
+- flt22 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt22 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+ }
+ else if (GlyphFlags & CompoundGlyph::HaveTwoByTwo)
+ {
+- flt11 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt11 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+- flt12 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt12 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+- flt21 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt21 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+- flt22 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt22 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+ }
+ else
+diff -ur -N engine-2.3.1.orig/src/segment/FileInput.cpp engine-2.3.1/src/segment/FileInput.cpp
+--- engine-2.3.1.orig/src/segment/FileInput.cpp 2009-01-21 23:36:42.000000000 +0100
++++ engine-2.3.1/src/segment/FileInput.cpp 2009-10-01 23:08:51.000000000 +0200
+@@ -90,7 +90,7 @@
+ /*----------------------------------------------------------------------------------------------
+ Initialize the stream to a buffer.
+ ----------------------------------------------------------------------------------------------*/
+-bool GrBufferIStream::OpenBuffer(byte * pbBuffer, int cb)
++bool GrBufferIStream::OpenBuffer(const byte * pbBuffer, int cb)
+ {
+ Assert(m_pbStart == NULL);
+ Assert(m_pbNext == NULL);
+@@ -133,7 +133,7 @@
+ ----------------------------------------------------------------------------------------------*/
+ short GrBufferIStream::ReadShortFromFont()
+ {
+- short snInput = *(short *)m_pbNext;
++ short snInput = *(const short *)m_pbNext;
+ m_pbNext += isizeof(short);
+ if (m_pbLim && m_pbNext > m_pbLim)
+ THROW(kresReadFault);
+@@ -147,7 +147,7 @@
+ ----------------------------------------------------------------------------------------------*/
+ utf16 GrBufferIStream::ReadUShortFromFont()
+ {
+- utf16 chwInput = *(utf16 *)m_pbNext;
++ utf16 chwInput = *(const utf16 *)m_pbNext;
+ m_pbNext += isizeof(utf16);
+ if (m_pbLim && m_pbNext > m_pbLim)
+ THROW(kresReadFault);
+@@ -161,7 +161,7 @@
+ ----------------------------------------------------------------------------------------------*/
+ int GrBufferIStream::ReadIntFromFont()
+ {
+- int nInput = *(int *)m_pbNext;
++ int nInput = *(const int *)m_pbNext;
+ m_pbNext += isizeof(int);
+ if (m_pbLim && m_pbNext > m_pbLim)
+ THROW(kresReadFault);
+diff -ur -N engine-2.3.1.orig/src/segment/FileInput.h engine-2.3.1/src/segment/FileInput.h
+--- engine-2.3.1.orig/src/segment/FileInput.h 2009-01-21 23:36:42.000000000 +0100
++++ engine-2.3.1/src/segment/FileInput.h 2009-10-01 23:02:12.000000000 +0200
+@@ -54,7 +54,7 @@
+ virtual void GetPositionInFont(long * plPos) = 0;
+ virtual void SetPositionInFont(long lPos) = 0;
+
+- virtual bool OpenBuffer(byte * pbBuffer, int cb) = 0;
++ virtual bool OpenBuffer(const byte * pbBuffer, int cb) = 0;
+ virtual void CloseBuffer() = 0;
+
+ protected:
+@@ -87,16 +87,16 @@
+ virtual void GetPositionInFont(long * plPos);
+ virtual void SetPositionInFont(long lPos);
+
+- virtual bool OpenBuffer(byte * pbBuffer, int cb);
++ virtual bool OpenBuffer(const byte * pbBuffer, int cb);
+ virtual void CloseBuffer()
+ {
+ Close();
+ }
+
+ protected:
+- byte * m_pbStart;
+- byte * m_pbNext;
+- byte * m_pbLim;
++ const byte * m_pbStart;
++ const byte * m_pbNext;
++ const byte * m_pbLim;
+ };
+
+ } // namespace gr
+diff -ur -N engine-2.3.1.orig/src/segment/FontFace.cpp engine-2.3.1/src/segment/FontFace.cpp
+--- engine-2.3.1.orig/src/segment/FontFace.cpp 2009-01-21 23:36:42.000000000 +0100
++++ engine-2.3.1/src/segment/FontFace.cpp 2009-10-01 23:05:26.000000000 +0200
+@@ -340,9 +340,9 @@
+
+ // ibGlocStart = cbGlatTbl;
+ fOk = CheckTableVersions(&grstrm,
+- (byte *)pSilfTbl, 0,
+- (byte *)pGlocTbl, 0,
+- (byte *)pFeatTbl, 0,
++ (const byte *)pSilfTbl, 0,
++ (const byte *)pGlocTbl, 0,
++ (const byte *)pFeatTbl, 0,
+ &m_fxdBadVersion);
+ if (!fOk)
+ {
+@@ -376,7 +376,7 @@
+ try
+ {
+ // Parse the "Silf" table.
+- grstrm.OpenBuffer((byte*)pSilfTbl, cbSilfSz);
++ grstrm.OpenBuffer((const byte*)pSilfTbl, cbSilfSz);
+ int chwGlyphIDMax, fxdVersion;
+ bool f = ReadSilfTable(grstrm, 0, 0, &chwGlyphIDMax, &fxdVersion);
+ grstrm.Close();
+@@ -391,8 +391,8 @@
+ {
+ GrBufferIStream grstrmGlat;
+
+- grstrm.OpenBuffer((byte *)pGlocTbl, cbGlocSz);
+- grstrmGlat.OpenBuffer((byte *)pGlatTbl, cbGlatSz);
++ grstrm.OpenBuffer((const byte *)pGlocTbl, cbGlocSz);
++ grstrmGlat.OpenBuffer((const byte *)pGlatTbl, cbGlatSz);
+ f = ReadGlocAndGlatTables(grstrm, 0, grstrmGlat, 0, chwGlyphIDMax, fxdVersion);
+ grstrm.Close();
+ grstrmGlat.Close();
+@@ -405,7 +405,7 @@
+ }
+
+ // Parse the "Feat" table.
+- grstrm.OpenBuffer((byte *)pFeatTbl, cbFeatSz);
++ grstrm.OpenBuffer((const byte *)pFeatTbl, cbFeatSz);
+ f = ReadFeatTable(grstrm, 0);
+ grstrm.Close();
+ if (!f)
+@@ -418,7 +418,7 @@
+ // Parse the "Sill" table.
+ if (pSillTbl)
+ {
+- grstrm.OpenBuffer((byte *)pSillTbl, cbFeatSz);
++ grstrm.OpenBuffer((const byte *)pSillTbl, cbFeatSz);
+ f = ReadSillTable(grstrm, 0);
+ grstrm.Close();
+ if (!f)
+@@ -551,7 +551,7 @@
+
+ if (!m_fNameTblCopy)
+ {
+- res = (pNameTbl = (byte *)pfont->getTable(TtfUtil::TableIdTag(ktiName), &cbNameSz)) ? kresOk : kresFail;
++ res = (pNameTbl = (const byte *)pfont->getTable(TtfUtil::TableIdTag(ktiName), &cbNameSz)) ? kresOk : kresFail;
+ fOk = pNameTbl && (cbNameSz == 0 || TtfUtil::CheckTable(ktiName, pNameTbl, cbNameSz));
+ if (!fOk)
+ {
+diff -ur -N engine-2.3.1.orig/src/segment/GrEngine.cpp engine-2.3.1/src/segment/GrEngine.cpp
+--- engine-2.3.1.orig/src/segment/GrEngine.cpp 2009-01-28 03:01:29.000000000 +0100
++++ engine-2.3.1/src/segment/GrEngine.cpp 2009-10-01 23:05:27.000000000 +0200
+@@ -891,9 +891,9 @@
+ implementation of the engine can't handle.
+ ----------------------------------------------------------------------------------------------*/
+ bool GrEngine::CheckTableVersions(GrIStream * pgrstrm,
+- byte *pSilfTbl, int lSilfStart,
+- byte *pGlobTbl, int lGlocStart,
+- byte *pFeatTbl, int lFeatStart,
++ const byte *pSilfTbl, int lSilfStart,
++ const byte *pGlobTbl, int lGlocStart,
++ const byte *pFeatTbl, int lFeatStart,
+ int * pfxdBadVersion)
+ {
+ pgrstrm->OpenBuffer(pSilfTbl, isizeof(int));
+diff -ur -N engine-2.3.1.orig/src/segment/GrEngine.h engine-2.3.1/src/segment/GrEngine.h
+--- engine-2.3.1.orig/src/segment/GrEngine.h 2009-01-21 23:36:42.000000000 +0100
++++ engine-2.3.1/src/segment/GrEngine.h 2009-10-01 23:05:29.000000000 +0200
+@@ -541,9 +541,9 @@
+ void DestroyEverything();
+
+ bool CheckTableVersions(GrIStream * pgrstrm,
+- byte *silf_tbl, int lSilfStart,
+- byte *gloc_tbl, int lGlocStart,
+- byte *feat_tbl, int lFeatStart,
++ const byte *silf_tbl, int lSilfStart,
++ const byte *gloc_tbl, int lGlocStart,
++ const byte *feat_tbl, int lFeatStart,
+ int * pfxdBadVersion);
+ //bool ReadSileTable(GrIStream & grstrm, long lTableSTart,
+ // int * pmFontEmUnits, bool * pfMismatchedBase);