diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-03-19 08:34:43 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-03-19 08:34:43 +0000 |
commit | 429a2052f63a9f59296b57ceb09903c0cf50a119 (patch) | |
tree | 1b9c6d7787a31c72c189a4ba87c0f33fa1660469 /Build/source/libs/teckit/TECkit-2.5.3-PATCHES/patch-03-warnings | |
parent | b48c4e99a6b8e9722eb74ead044bc2d0014edd0a (diff) |
teckit 2.5.3
git-svn-id: svn://tug.org/texlive/trunk@25696 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/teckit/TECkit-2.5.3-PATCHES/patch-03-warnings')
-rw-r--r-- | Build/source/libs/teckit/TECkit-2.5.3-PATCHES/patch-03-warnings | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/Build/source/libs/teckit/TECkit-2.5.3-PATCHES/patch-03-warnings b/Build/source/libs/teckit/TECkit-2.5.3-PATCHES/patch-03-warnings new file mode 100644 index 00000000000..f90c2f819b6 --- /dev/null +++ b/Build/source/libs/teckit/TECkit-2.5.3-PATCHES/patch-03-warnings @@ -0,0 +1,104 @@ + Avoid more compiler warnings. + +diff -ur TECkit-2.5.3.orig/source/Compiler.cpp TECkit-2.5.3/source/Compiler.cpp +--- TECkit-2.5.3.orig/source/Compiler.cpp 2011-01-13 20:38:34.000000000 +0100 ++++ TECkit-2.5.3/source/Compiler.cpp 2012-03-17 17:43:26.000000000 +0100 +@@ -191,14 +191,14 @@ + free(table); + } + +-char* ++const char* + WINAPI + TECkit_GetUnicodeName(UInt32 usv) + { + const CharName *c = &gUnicodeNames[0]; + while (c->name != 0) + if (c->usv == usv) +- return (char*)c->name; ++ return c->name; + else + ++c; + return NULL; +@@ -2133,7 +2133,7 @@ + cout << " at line " << line << endl; + } + else +- (*errorFunction)(errFuncUserData, (char*)msg, (char*)s, line); ++ (*errorFunction)(errFuncUserData, msg, s, line); + errorState = true; + ++errorCount; + } +diff -ur TECkit-2.5.3.orig/source/Engine.cpp TECkit-2.5.3/source/Engine.cpp +--- TECkit-2.5.3.orig/source/Engine.cpp 2011-01-13 20:38:34.000000000 +0100 ++++ TECkit-2.5.3/source/Engine.cpp 2012-03-17 17:43:26.000000000 +0100 +@@ -1087,7 +1087,7 @@ + if (matchElems == 0 && allowInsertion == false) + continue; + patternLength = matchElems + READ(rule->postLength); +- pattern = (MatchElem*)(rule + 1); // point past the defined struct for the rule header ++ pattern = (const MatchElem*)(rule + 1); // point past the defined struct for the rule header + direction = 1; + infoLimit = matchElems; + +@@ -2185,7 +2185,7 @@ + status = kStatus_BadMappingVersion; + else { + const Byte* namePtr; +- if (getNamePtrFromTable((Byte*)fh, nameID, namePtr, *nameLength)) { ++ if (getNamePtrFromTable((const Byte*)fh, nameID, namePtr, *nameLength)) { + UInt16 copyBytes = *nameLength < bufferSize ? *nameLength : bufferSize; + if (copyBytes > 0) + memcpy(nameBuffer, namePtr, copyBytes); +diff -ur TECkit-2.5.3.orig/source/Engine.h TECkit-2.5.3/source/Engine.h +--- TECkit-2.5.3.orig/source/Engine.h 2011-01-13 20:38:34.000000000 +0100 ++++ TECkit-2.5.3/source/Engine.h 2012-03-17 17:43:26.000000000 +0100 +@@ -117,7 +117,7 @@ + + UInt32 match(int index, int repeats, int textLoc); + // returns 0 for no match, 1 for match, or kNeedMoreInput/kInvalidChar +- MatchElem* pattern; ++ const MatchElem* pattern; + int patternLength; + int direction; + MatchInfo info[256]; +diff -ur TECkit-2.5.3.orig/source/Public-headers/TECkit_Compiler.h TECkit-2.5.3/source/Public-headers/TECkit_Compiler.h +--- TECkit-2.5.3.orig/source/Public-headers/TECkit_Compiler.h 2011-01-13 20:38:34.000000000 +0100 ++++ TECkit-2.5.3/source/Public-headers/TECkit_Compiler.h 2012-03-17 17:43:26.000000000 +0100 +@@ -56,7 +56,7 @@ + #define kCompilerOpts_Compress 0x00000010 /* generate compressed mapping table */ + #define kCompilerOpts_XML 0x00000020 /* instead of a compiled binary table, generate an XML representation of the mapping */ + +-typedef void (CALLBACK *TECkit_ErrorFn)(void* userData, char* msg, char* param, UInt32 line); ++typedef void (CALLBACK *TECkit_ErrorFn)(void* userData, const char* msg, const char* param, UInt32 line); + + TECkit_Status + WINAPI EXPORTED +@@ -75,7 +75,7 @@ + TECkit_GetCompilerVersion(); + + /* new APIs for looking up Unicode names (as NUL-terminated C strings) */ +-char* ++const char* + WINAPI EXPORTED + TECkit_GetUnicodeName(UInt32 usv); + /* returns the Unicode name of usv, if available, else NULL */ +diff -ur TECkit-2.5.3.orig/source/Sample-tools/TECkit_Compile.cpp TECkit-2.5.3/source/Sample-tools/TECkit_Compile.cpp +--- TECkit-2.5.3.orig/source/Sample-tools/TECkit_Compile.cpp 2011-01-13 20:38:34.000000000 +0100 ++++ TECkit-2.5.3/source/Sample-tools/TECkit_Compile.cpp 2012-03-17 17:43:26.000000000 +0100 +@@ -24,13 +24,13 @@ + #endif + + extern "C" { +- static void CALLBACK errFunc(void* userData, char* msg, char* param, UInt32 line); ++ static void CALLBACK errFunc(void* userData, const char* msg, const char* param, UInt32 line); + }; + + static + void + CALLBACK +-errFunc(void* userData, char* msg, char* param, UInt32 line) ++errFunc(void* userData, const char* msg, const char* param, UInt32 line) + { + #pragma unused(userData) + |