From 410d8fa9a8e9b7873dcfbce8d58a156a1cea9af4 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Thu, 3 Apr 2008 12:52:25 +0000 Subject: clean up a couple warnings git-svn-id: svn://tug.org/texlive/trunk@7294 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/libs/teckit/source/Compiler.cpp | 4 ++-- Build/source/libs/teckit/source/Compiler.h | 1 - .../source/libs/teckit/source/Sample-tools/TECkit_Compile.cpp | 11 ++++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'Build') diff --git a/Build/source/libs/teckit/source/Compiler.cpp b/Build/source/libs/teckit/source/Compiler.cpp index f1597b4925f..66caa5cee45 100755 --- a/Build/source/libs/teckit/source/Compiler.cpp +++ b/Build/source/libs/teckit/source/Compiler.cpp @@ -608,7 +608,7 @@ Compiler::Compiler(const char* txt, UInt32 len, char inForm, bool cmp, bool genX if (inputForm != kForm_Bytes) { // discard initial BOM if present - currCh = getChar(); + UInt32 currCh = getChar(); if (currCh != 0xfeff) ungetChar(currCh); } @@ -1698,7 +1698,7 @@ void Compiler::SkipSpaces(void) { while (textPtr < textEnd) { - currCh = getChar(); + UInt32 currCh = getChar(); if (currCh != ' ' && currCh != '\t') { ungetChar(currCh); break; diff --git a/Build/source/libs/teckit/source/Compiler.h b/Build/source/libs/teckit/source/Compiler.h index fa3b4c682c3..b849821d10d 100755 --- a/Build/source/libs/teckit/source/Compiler.h +++ b/Build/source/libs/teckit/source/Compiler.h @@ -120,7 +120,6 @@ protected: char idBuffer[256]; // used by the front end parser - UInt32 currCh; UInt32 ungotten; Token tok; const unsigned char* tokStart; diff --git a/Build/source/libs/teckit/source/Sample-tools/TECkit_Compile.cpp b/Build/source/libs/teckit/source/Sample-tools/TECkit_Compile.cpp index cda7d74e66e..f61618394d1 100644 --- a/Build/source/libs/teckit/source/Sample-tools/TECkit_Compile.cpp +++ b/Build/source/libs/teckit/source/Sample-tools/TECkit_Compile.cpp @@ -8,6 +8,7 @@ 5-May-2005 jk added include to keep gcc happy 24-May-2005 jk change placement of CALLBACK for VC++6 (Ulrik) + 1-Apr-2008 jk extern "C" decl for errFunc; const char* progName */ #include "TECkit_Compiler.h" @@ -22,12 +23,16 @@ #include "console.h" #endif +extern "C" { + static void CALLBACK errFunc(void* userData, char* msg, char* param, UInt32 line); +}; + static void CALLBACK -errFunc(void* usedData, char* msg, char* param, UInt32 line) +errFunc(void* userData, char* msg, char* param, UInt32 line) { -#pragma unused(usedData) +#pragma unused(userData) fprintf(stderr, "%s", msg); if (param != 0) @@ -40,7 +45,7 @@ errFunc(void* usedData, char* msg, char* param, UInt32 line) int main(int argc, char** argv) { - char* progName = argv[0]; + const char* progName = argv[0]; char* mapFileName = 0; char* tecFileName = 0; int errorCount = 0; -- cgit v1.2.3