diff options
58 files changed, 830 insertions, 283 deletions
diff --git a/.fossil-settings/binary-glob b/.fossil-settings/binary-glob index ec574be..2a205a1 100644 --- a/.fossil-settings/binary-glob +++ b/.fossil-settings/binary-glob @@ -1,9 +1,11 @@ -compat/zlib/win32/zdll.lib -compat/zlib/win32/zlib1.dll -compat/zlib/win64/zdll.lib -compat/zlib/win64/zlib1.dll -compat/zlib/win64/libz.dll.a -compat/zlib/zlib.3.pdf -*.bmp +*.a +*.dll +*.exe *.gif -*.png
\ No newline at end of file +*.gz +*.jpg +*.lib +*.pdf +*.png +*.xlsx +*.zip diff --git a/.gitattributes b/.gitattributes index 82bed50..e9a67c8 100755 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,6 @@ # Set the default behavior, in case people don't have core.autocrlf set. -* text eol=lf +* eol=lf +* text=auto # Explicitly declare text files you want to always be normalized and converted # to native line endings on checkout. @@ -20,15 +21,16 @@ *.test text # Declare files that will always have CRLF line endings on checkout. -*.bat text eol=crlf -*.sln text eol=crlf -*.vc text eol=crlf +*.bat eol=crlf +*.sln eol=crlf +*.vc eol=crlf # Denote all files that are truly binary and should not be modified. *.a binary *.dll binary *.exe binary *.gif binary +*.gz binary *.jpg binary *.lib binary *.pdf binary diff --git a/.travis.yml b/.travis.yml index 73e3fc2..1d5f4dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -339,10 +339,65 @@ matrix: script: - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols -f makefile.vc all tcltest' - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols -f makefile.vc test' +# Test on Windows with GCC native + - name: "Windows/GCC/Shared" + os: windows + compiler: gcc + env: + - BUILD_DIR=win + - CFGOPT="--enable-64bit" + before_install: + - choco install make + - cd ${BUILD_DIR} + - name: "Windows/GCC/Shared: UTF_MAX=6" + os: windows + compiler: gcc + env: + - BUILD_DIR=win + - CFGOPT="--enable-64bit CFLAGS=-DTCL_UTF_MAX=6" + before_install: + - choco install make + - cd ${BUILD_DIR} + - name: "Windows/GCC/Shared: UTF_MAX=3" + os: windows + compiler: gcc + env: + - BUILD_DIR=win + - CFGOPT="--enable-64bit CFLAGS=-DTCL_UTF_MAX=3" + before_install: + - choco install make + - cd ${BUILD_DIR} + - name: "Windows/GCC/Shared: NO_DEPRECATED" + os: windows + compiler: gcc + env: + - BUILD_DIR=win + - CFGOPT="--enable-64bit CFLAGS=-DTCL_NO_DEPRECATED=1" + before_install: + - choco install make + - cd ${BUILD_DIR} + - name: "Windows/GCC/Static" + os: windows + compiler: gcc + env: + - BUILD_DIR=win + - CFGOPT="--enable-64bit --disable-shared" + before_install: + - choco install make + - cd ${BUILD_DIR} + - name: "Windows/GCC/Debug" + os: windows + compiler: gcc + env: + - BUILD_DIR=win + - CFGOPT="--enable-64bit --enable-symbols" + before_install: + - choco install make + - cd ${BUILD_DIR} before_install: - cd ${BUILD_DIR} install: - - ./configure ${CFGOPT} --prefix=$HOME + - ./configure ${CFGOPT} --prefix=$HOME || (cat config.log && exit 1) before_script: - export ERROR_ON_FAILURES=1 script: diff --git a/doc/StringObj.3 b/doc/StringObj.3 index e011c27..12fc413 100644 --- a/doc/StringObj.3 +++ b/doc/StringObj.3 @@ -91,7 +91,7 @@ Points to the first byte of an array of UTF-8-encoded bytes used to set or append to a string value. This byte array may contain embedded null characters unless \fInumChars\fR is negative. (Applications needing null bytes -should represent them as the two-byte sequence \fI\e700\e600\fR, use +should represent them as the two-byte sequence \fI\e300\e200\fR, use \fBTcl_ExternalToUtf\fR to convert, or \fBTcl_NewByteArrayObj\fR if the string is a collection of uninterpreted bytes.) .AP int length in diff --git a/generic/regc_lex.c b/generic/regc_lex.c index 4c8f15f..d299b49 100644 --- a/generic/regc_lex.c +++ b/generic/regc_lex.c @@ -905,9 +905,7 @@ lexescape( v->now = save; - /* - * And fall through into octal number. - */ + /* FALLTHRU */ case CHR('0'): NOTE(REG_UUNPORT); diff --git a/generic/regc_nfa.c b/generic/regc_nfa.c index 240fcfe..7507137 100644 --- a/generic/regc_nfa.c +++ b/generic/regc_nfa.c @@ -2978,6 +2978,9 @@ dumpnfa( dumpcolors(nfa->cm, f); } fflush(f); +#else + (void)nfa; + (void)f; #endif } @@ -3157,6 +3160,9 @@ dumpcnfa( dumpcstate(st, cnfa, f); } fflush(f); +#else + (void)cnfa; + (void)f; #endif } diff --git a/generic/regcomp.c b/generic/regcomp.c index 093cb95..e8c4721 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -59,7 +59,6 @@ static void wordchrs(struct vars *); static struct subre *subre(struct vars *, int, int, struct state *, struct state *); static void freesubre(struct vars *, struct subre *); static void freesrnode(struct vars *, struct subre *); -static void optst(struct vars *, struct subre *); static int numst(struct subre *, int); static void markst(struct subre *); static void cleanst(struct vars *); @@ -394,7 +393,6 @@ compile( dumpnfa(v->nfa, debug); dumpst(v->tree, debug, 1); } - optst(v, v->tree); v->ntree = numst(v->tree, 1); markst(v->tree); cleanst(v); @@ -922,7 +920,7 @@ parseqatom( */ NOTE(REG_UPBOTCH); - /* fallthrough into case PLAIN */ + /* FALLTHRU */ case PLAIN: onechr(v, v->nextvalue, lp, rp); okcolors(v->nfa, v->cm); @@ -1811,25 +1809,6 @@ freesrnode( } /* - - optst - optimize a subRE subtree - ^ static void optst(struct vars *, struct subre *); - */ -static void -optst( - struct vars *v, - struct subre *t) -{ - /* - * DGP (2007-11-13): I assume it was the programmer's intent to eventually - * come back and add code to optimize subRE trees, but the routine coded - * just spends effort traversing the tree and doing nothing. We can do - * nothing with less effort. - */ - - return; -} - -/* - numst - number tree nodes (assigning "id" indexes) ^ static int numst(struct subre *, int); */ @@ -2100,6 +2079,9 @@ dump( } fprintf(f, "\n"); dumpst(g->tree, f, 0); +#else + (void)re; + (void)f; #endif } diff --git a/generic/regerror.c b/generic/regerror.c index 49d93ed..f783217 100644 --- a/generic/regerror.c +++ b/generic/regerror.c @@ -58,7 +58,6 @@ static const struct rerr { size_t /* Actual space needed (including NUL) */ regerror( int code, /* Error code, or REG_ATOI or REG_ITOA */ - const regex_t *preg, /* Associated regex_t (unused at present) */ char *errbuf, /* Result buffer (unless errbuf_size==0) */ size_t errbuf_size) /* Available space in errbuf, can be 0 */ { diff --git a/generic/regex.h b/generic/regex.h index f3159c6..dba3ab4 100644 --- a/generic/regex.h +++ b/generic/regex.h @@ -232,7 +232,7 @@ typedef struct { * of character is used for error reports is independent of what kind is used * in matching. * - ^ extern size_t regerror(int, const regex_t *, char *, size_t); + ^ extern size_t regerror(int, char *, size_t); */ #define REG_OKAY 0 /* no errors detected */ #define REG_NOMATCH 1 /* failed to match */ @@ -283,7 +283,7 @@ int regexec(regex_t *, const char *, size_t, regmatch_t [], int); MODULE_SCOPE int __REG_WIDE_EXEC(regex_t *, const __REG_WIDE_T *, size_t, rm_detail_t *, size_t, regmatch_t [], int); #endif MODULE_SCOPE void regfree(regex_t *); -MODULE_SCOPE size_t regerror(int, const regex_t *, char *, size_t); +MODULE_SCOPE size_t regerror(int, char *, size_t); /* automatically gathered by fwd; do not hand-edit */ /* =====^!^===== end forwards =====^!^===== */ diff --git a/generic/regexec.c b/generic/regexec.c index 24c4eac..b5f161b 100644 --- a/generic/regexec.c +++ b/generic/regexec.c @@ -128,7 +128,7 @@ int exec(regex_t *, const chr *, size_t, rm_detail_t *, size_t, regmatch_t [], i static struct dfa *getsubdfa(struct vars *, struct subre *); static int simpleFind(struct vars *const, struct cnfa *const, struct colormap *const); static int complicatedFind(struct vars *const, struct cnfa *const, struct colormap *const); -static int complicatedFindLoop(struct vars *const, struct cnfa *const, struct colormap *const, struct dfa *const, struct dfa *const, chr **const); +static int complicatedFindLoop(struct vars *const, struct dfa *const, struct dfa *const, chr **const); static void zapallsubs(regmatch_t *const, const size_t); static void zaptreesubs(struct vars *const, struct subre *const); static void subset(struct vars *const, struct subre *const, chr *const, chr *const); @@ -433,7 +433,7 @@ complicatedFind( return v->err; } - ret = complicatedFindLoop(v, cnfa, cm, d, s, &cold); + ret = complicatedFindLoop(v, d, s, &cold); freeDFA(d); freeDFA(s); @@ -452,14 +452,12 @@ complicatedFind( /* - complicatedFindLoop - the heart of complicatedFind - ^ static int complicatedFindLoop(struct vars *, struct cnfa *, struct colormap *, + ^ static int complicatedFindLoop(struct vars *, ^ struct dfa *, struct dfa *, chr **); */ static int complicatedFindLoop( struct vars *const v, - struct cnfa *const cnfa, - struct colormap *const cm, struct dfa *const d, struct dfa *const s, chr **const coldp) /* where to put coldstart pointer */ diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index 8e2edcf..6cad61a 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -287,8 +287,7 @@ static int GetIntegerOperand(AssemblyEnv*, Tcl_Token**, int*); static int GetNextOperand(AssemblyEnv*, Tcl_Token**, Tcl_Obj**); static void LookForFreshCatches(BasicBlock*, BasicBlock**); static void MoveCodeForJumps(AssemblyEnv*, int); -static void MoveExceptionRangesToBasicBlock(AssemblyEnv*, int, - int); +static void MoveExceptionRangesToBasicBlock(AssemblyEnv*, int); static AssemblyEnv* NewAssemblyEnv(CompileEnv*, int); static int ProcessCatches(AssemblyEnv*); static int ProcessCatchesInBasicBlock(AssemblyEnv*, BasicBlock*, @@ -773,7 +772,7 @@ BBEmitInst1or4( int Tcl_AssembleObjCmd( - ClientData dummy, /* Not used. */ + ClientData clientData, /* clientData */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -783,7 +782,7 @@ Tcl_AssembleObjCmd( * because there needs to be one in place to execute bytecode. */ - return Tcl_NRCallObjProc(interp, TclNRAssembleObjCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNRAssembleObjCmd, clientData, objc, objv); } int @@ -797,6 +796,7 @@ TclNRAssembleObjCmd( Tcl_Obj* backtrace; /* Object where extra error information is * constructed. */ + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "bytecodeList"); return TCL_ERROR; @@ -970,7 +970,7 @@ TclCompileAssembleCmd( int numCommands = envPtr->numCommands; int offset = envPtr->codeNext - envPtr->codeStart; int depth = envPtr->currStackDepth; - + (void)cmdPtr; /* * Make sure that the command has a single arg that is a simple word. */ @@ -1820,7 +1820,6 @@ CompileEmbeddedScript( int savedStackDepth = envPtr->currStackDepth; int savedMaxStackDepth = envPtr->maxStackDepth; - int savedCodeIndex = envPtr->codeNext - envPtr->codeStart; int savedExceptArrayNext = envPtr->exceptArrayNext; envPtr->currStackDepth = 0; @@ -1853,8 +1852,7 @@ CompileEmbeddedScript( * need to be fixed up once the stack depth is known. */ - MoveExceptionRangesToBasicBlock(assemEnvPtr, savedCodeIndex, - savedExceptArrayNext); + MoveExceptionRangesToBasicBlock(assemEnvPtr, savedExceptArrayNext); /* * Flush the current basic block. @@ -1913,7 +1911,6 @@ SyncStackDepth( static void MoveExceptionRangesToBasicBlock( AssemblyEnv* assemEnvPtr, /* Assembly environment */ - int savedCodeIndex, /* Start of the embedded code */ int savedExceptArrayNext) /* Saved index of the end of the exception * range array */ { @@ -4322,6 +4319,8 @@ DupAssembleCodeInternalRep( Tcl_Obj *srcPtr, Tcl_Obj *copyPtr) { + (void)srcPtr; + (void)copyPtr; return; } diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 89a6f98..eed4345 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -106,7 +106,7 @@ typedef struct { char *result; /* The script cancellation result or NULL for * a default result. */ int length; /* Length of the above error message. */ - ClientData clientData; /* Ignored */ + ClientData clientData; /* Not used. */ int flags; /* Additional flags */ } CancelInfo; static Tcl_HashTable cancelTable; @@ -1384,6 +1384,8 @@ BadEnsembleSubcommand( Tcl_Obj *const objv[]) { const UnsafeEnsembleInfo *infoPtr = (const UnsafeEnsembleInfo *)clientData; + (void)objc; + (void)objv; Tcl_SetObjResult(interp, Tcl_ObjPrintf( "not allowed to invoke subcommand %s of %s", @@ -3321,12 +3323,13 @@ Tcl_GetCommandInfoFromToken( const char * Tcl_GetCommandName( - Tcl_Interp *interp, /* Interpreter containing the command. */ + Tcl_Interp *dummy, /* Not used. */ Tcl_Command command) /* Token for command returned by a previous * call to Tcl_CreateCommand. The command must * not have been deleted. */ { Command *cmdPtr = (Command *) command; + (void)dummy; if ((cmdPtr == NULL) || (cmdPtr->hPtr == NULL)) { /* @@ -3769,11 +3772,12 @@ CallCommandTraces( static int CancelEvalProc( ClientData clientData, /* Interp to cancel the script in progress. */ - Tcl_Interp *interp, /* Ignored */ + Tcl_Interp *dummy, /* Not used. */ int code) /* Current return code from command. */ { CancelInfo *cancelInfo = (CancelInfo *)clientData; Interp *iPtr; + (void)dummy; if (cancelInfo != NULL) { Tcl_MutexLock(&cancelLock); @@ -4625,6 +4629,7 @@ EvalObjvCore( Interp *iPtr = (Interp *) interp; Namespace *lookupNsPtr = NULL; int enterTracesDone = 0; + (void)result; /* * Push records for task to be done on return, in INVERSE order. First, if @@ -4783,6 +4788,7 @@ Dispatch( int objc = PTR2INT(data[2]); Tcl_Obj **objv = (Tcl_Obj **)data[3]; Interp *iPtr = (Interp *) interp; + (void)result; #ifdef USE_DTRACE if (TCL_DTRACE_CMD_ARGS_ENABLED()) { @@ -6872,8 +6878,8 @@ Tcl_ExprLongObj( return TCL_ERROR; } resultPtr = Tcl_NewBignumObj(&big); - /* FALLTHROUGH */ } + /* FALLTHRU */ case TCL_NUMBER_INT: case TCL_NUMBER_BIG: result = TclGetLongFromObj(interp, resultPtr, ptr); @@ -7035,7 +7041,7 @@ TclObjInvoke( int TclNRInvoke( - ClientData clientData, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -7045,6 +7051,7 @@ TclNRInvoke( const char *cmdName; /* Name of the command from objv[0]. */ Tcl_HashEntry *hPtr = NULL; Command *cmdPtr; + (void)dummy; cmdName = TclGetString(objv[0]); hTblPtr = iPtr->hiddenCmdTablePtr; @@ -7078,11 +7085,13 @@ TclNRInvoke( static int NRPostInvoke( - ClientData clientData[], + ClientData dummy[], /* Not used. */ Tcl_Interp *interp, int result) { Interp *iPtr = (Interp *)interp; + (void)dummy; + iPtr->numLevels--; return result; } @@ -7517,7 +7526,7 @@ Tcl_GetVersion( static int ExprCeilFunc( - ClientData clientData, /* Ignored */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ @@ -7526,6 +7535,7 @@ ExprCeilFunc( int code; double d; mp_int big; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -7557,7 +7567,7 @@ ExprCeilFunc( static int ExprFloorFunc( - ClientData clientData, /* Ignored */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ @@ -7566,6 +7576,7 @@ ExprFloorFunc( int code; double d; mp_int big; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -7597,7 +7608,7 @@ ExprFloorFunc( static int ExprIsqrtFunc( - ClientData clientData, /* Ignored */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute. */ int objc, /* Actual parameter count. */ Tcl_Obj *const *objv) /* Actual parameter list. */ @@ -7609,6 +7620,7 @@ ExprIsqrtFunc( mp_int big; int exact = 0; /* Flag ==1 if the argument can be represented * in a double as an exact integer. */ + (void)dummy; /* * Check syntax. @@ -7697,7 +7709,7 @@ ExprIsqrtFunc( static int ExprSqrtFunc( - ClientData clientData, /* Ignored */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ @@ -7706,6 +7718,7 @@ ExprSqrtFunc( int code; double d; mp_int big; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -7858,7 +7871,7 @@ ExprBinaryFunc( static int ExprAbsFunc( - ClientData clientData, /* Ignored. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ @@ -7867,6 +7880,7 @@ ExprAbsFunc( ClientData ptr; int type; mp_int big; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -7953,13 +7967,14 @@ ExprAbsFunc( static int ExprBoolFunc( - ClientData clientData, /* Ignored. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ Tcl_Obj *const *objv) /* Actual parameter vector. */ { int value; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -7974,13 +7989,14 @@ ExprBoolFunc( static int ExprDoubleFunc( - ClientData clientData, /* Ignored. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ Tcl_Obj *const *objv) /* Actual parameter vector. */ { double dResult; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -8001,7 +8017,7 @@ ExprDoubleFunc( static int ExprIntFunc( - ClientData clientData, /* Ignored. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ @@ -8010,6 +8026,7 @@ ExprIntFunc( double d; int type; ClientData ptr; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -8057,13 +8074,14 @@ ExprIntFunc( static int ExprWideFunc( - ClientData clientData, /* Ignored. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ Tcl_Obj *const *objv) /* Actual parameter vector. */ { Tcl_WideInt wResult; + (void)dummy; if (ExprIntFunc(NULL, interp, objc, objv) != TCL_OK) { return TCL_ERROR; @@ -8078,7 +8096,7 @@ ExprWideFunc( */ static int ExprMaxMinFunc( - ClientData clientData, /* Ignored. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ @@ -8089,6 +8107,7 @@ ExprMaxMinFunc( double d; int type, i; ClientData ptr; + (void)dummy; if (objc < 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -8118,29 +8137,31 @@ ExprMaxMinFunc( static int ExprMaxFunc( - ClientData clientData, /* Ignored. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ Tcl_Obj *const *objv) /* Actual parameter vector. */ { - return ExprMaxMinFunc(clientData, interp, objc, objv, MP_GT); + (void)dummy; + return ExprMaxMinFunc(NULL, interp, objc, objv, MP_GT); } static int ExprMinFunc( - ClientData clientData, /* Ignored. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ Tcl_Obj *const *objv) /* Actual parameter vector. */ { - return ExprMaxMinFunc(clientData, interp, objc, objv, MP_LT); + (void)dummy; + return ExprMaxMinFunc(NULL, interp, objc, objv, MP_LT); } static int ExprRandFunc( - ClientData clientData, /* Ignored. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ @@ -8151,6 +8172,7 @@ ExprRandFunc( long tmp; /* Algorithm assumes at least 32 bits. Only * long guarantees that. See below. */ Tcl_Obj *oResult; + (void)dummy; if (objc != 1) { MathFuncWrongNumArgs(interp, 1, objc, objv); @@ -8233,7 +8255,7 @@ ExprRandFunc( static int ExprRoundFunc( - ClientData clientData, /* Ignored. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ @@ -8242,6 +8264,7 @@ ExprRoundFunc( double d; ClientData ptr; int type; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -8308,7 +8331,7 @@ ExprRoundFunc( static int ExprSrandFunc( - ClientData clientData, /* Ignored. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count. */ @@ -8316,6 +8339,7 @@ ExprSrandFunc( { Interp *iPtr = (Interp *) interp; Tcl_WideInt w = 0; /* Initialized to avoid compiler warning. */ + (void)dummy; /* * Convert argument and use it to reset the seed. @@ -8347,7 +8371,7 @@ ExprSrandFunc( * will always succeed. */ - return ExprRandFunc(clientData, interp, 1, objv); + return ExprRandFunc(NULL, interp, 1, objv); } /* @@ -8497,7 +8521,7 @@ ClassifyDouble( static int ExprIsFiniteFunc( - ClientData ignored, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count */ @@ -8506,6 +8530,7 @@ ExprIsFiniteFunc( double d; ClientData ptr; int type, result = 0; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -8528,7 +8553,7 @@ ExprIsFiniteFunc( static int ExprIsInfinityFunc( - ClientData ignored, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count */ @@ -8537,6 +8562,7 @@ ExprIsInfinityFunc( double d; ClientData ptr; int type, result = 0; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -8558,7 +8584,7 @@ ExprIsInfinityFunc( static int ExprIsNaNFunc( - ClientData ignored, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count */ @@ -8567,6 +8593,7 @@ ExprIsNaNFunc( double d; ClientData ptr; int type, result = 1; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -8588,7 +8615,7 @@ ExprIsNaNFunc( static int ExprIsNormalFunc( - ClientData ignored, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count */ @@ -8597,6 +8624,7 @@ ExprIsNormalFunc( double d; ClientData ptr; int type, result = 0; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -8618,7 +8646,7 @@ ExprIsNormalFunc( static int ExprIsSubnormalFunc( - ClientData ignored, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count */ @@ -8627,6 +8655,7 @@ ExprIsSubnormalFunc( double d; ClientData ptr; int type, result = 0; + (void)dummy; if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); @@ -8648,7 +8677,7 @@ ExprIsSubnormalFunc( static int ExprIsUnorderedFunc( - ClientData ignored, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count */ @@ -8657,6 +8686,7 @@ ExprIsUnorderedFunc( double d; ClientData ptr; int type, result = 0; + (void)dummy; if (objc != 3) { MathFuncWrongNumArgs(interp, 3, objc, objv); @@ -8689,7 +8719,7 @@ ExprIsUnorderedFunc( static int FloatClassifyObjCmd( - ClientData ignored, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interpreter in which to execute the * function. */ int objc, /* Actual parameter count */ @@ -8699,6 +8729,7 @@ FloatClassifyObjCmd( Tcl_Obj *objPtr; ClientData ptr; int type; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "floatValue"); @@ -8806,6 +8837,7 @@ DTraceObjCmd( if (TCL_DTRACE_TCL_PROBE_ENABLED()) { char *a[10]; int i = 0; + (void)dummy; while (i++ < 10) { a[i-1] = i < objc ? TclGetString(objv[i]) : NULL; @@ -9182,12 +9214,13 @@ TclSetTailcall( int TclNRTailcallObjCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Interp *iPtr = (Interp *) interp; + (void)dummy; if (objc < 1) { Tcl_WrongNumArgs(interp, 1, objv, "?command? ?arg ...?"); @@ -9287,10 +9320,12 @@ TclNRTailcallEval( int TclNRReleaseValues( ClientData data[], - Tcl_Interp *interp, + Tcl_Interp *dummy, int result) { int i = 0; + (void)dummy; + while (i < 4) { if (data[i]) { Tcl_DecrRefCount((Tcl_Obj *) data[i]); @@ -9374,7 +9409,7 @@ TclNRYieldObjCmd( int TclNRYieldToObjCmd( - ClientData clientData, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -9382,6 +9417,7 @@ TclNRYieldToObjCmd( CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; Tcl_Obj *listPtr, *nsObjPtr; Tcl_Namespace *nsPtr = TclGetCurrentNamespace(interp); + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command ?arg ...?"); @@ -9430,6 +9466,7 @@ RewindCoroutineCallback( Tcl_Interp *interp, int result) { + (void)result; return Tcl_RestoreInterpState(interp, (Tcl_InterpState)data[0]); } @@ -9585,6 +9622,7 @@ TclNRCoroutineActivateCallback( int type = PTR2INT(data[1]); int numLevels, unused; int *stackLevel = &unused; + (void)result; if (!corPtr->stackLevel) { /* @@ -9663,6 +9701,7 @@ TclNREvalList( int objc; Tcl_Obj **objv; Tcl_Obj *listPtr = (Tcl_Obj *)data[0]; + (void)result; Tcl_IncrRefCount(listPtr); @@ -9684,13 +9723,14 @@ TclNREvalList( static int CoroTypeObjCmd( - ClientData clientData, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Command *cmdPtr; CoroutineData *corPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "coroName"); @@ -9774,13 +9814,14 @@ GetCoroutineFromObj( static int TclNRCoroInjectObjCmd( - ClientData clientData, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { CoroutineData *corPtr; ExecEnv *savedEEPtr = iPtr->execEnvPtr; + (void)dummy; /* * Usage more or less like tailcall: @@ -9819,7 +9860,7 @@ TclNRCoroInjectObjCmd( static int TclNRCoroProbeObjCmd( - ClientData clientData, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -9828,6 +9869,7 @@ TclNRCoroProbeObjCmd( ExecEnv *savedEEPtr = iPtr->execEnvPtr; int numLevels, unused; int *stackLevel = &unused; + (void)dummy; /* * Usage more or less like tailcall: @@ -9926,6 +9968,7 @@ InjectHandler( ClientData isProbe = data[3]; int objc; Tcl_Obj **objv; + (void)result; if (!isProbe) { /* @@ -10012,13 +10055,14 @@ InjectHandlerPostCall( static int NRInjectObjCmd( - ClientData clientData, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { CoroutineData *corPtr; ExecEnv *savedEEPtr = iPtr->execEnvPtr; + (void)dummy; /* * Usage more or less like tailcall: @@ -10132,6 +10176,7 @@ TclNRCoroutineObjCmd( Namespace *nsPtr, *altNsPtr, *cxtNsPtr, *inNsPtr = (Namespace *)TclGetCurrentNamespace(interp); Namespace *lookupNsPtr = iPtr->varFramePtr->nsPtr; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "name cmd ?arg ...?"); @@ -10254,12 +10299,13 @@ TclNRCoroutineObjCmd( int TclInfoCoroutineCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); diff --git a/generic/tclBinary.c b/generic/tclBinary.c index f3744d8..31eaa2c 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -370,6 +370,8 @@ Tcl_DbNewByteArrayObj( Tcl_SetByteArrayObj(objPtr, bytes, length); return objPtr; #else /* if not TCL_MEM_DEBUG */ + (void)file; + (void)line; return Tcl_NewByteArrayObj(bytes, length); #endif /* TCL_MEM_DEBUG */ } @@ -547,7 +549,7 @@ Tcl_SetByteArrayLength( static int SetByteArrayFromAny( - Tcl_Interp *interp, /* Not used. */ + Tcl_Interp *dummy, /* Not used. */ Tcl_Obj *objPtr) /* The object to convert to type ByteArray. */ { size_t length; @@ -557,6 +559,7 @@ SetByteArrayFromAny( Tcl_UniChar ch = 0; ByteArray *byteArrayPtr; Tcl_ObjIntRep ir; + (void)dummy; if (TclHasIntRep(objPtr, &properByteArrayType)) { return TCL_OK; @@ -912,6 +915,7 @@ BinaryFormatCmd( const char *errorString; const char *errorValue, *str; int offset, size, length; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "formatString ?arg ...?"); @@ -1413,12 +1417,12 @@ BinaryScanCmd( unsigned char *buffer; /* Start of result buffer. */ const char *errorString; const char *str; - int offset, size, length; + int offset, size, length, i; - int i; Tcl_Obj *valuePtr, *elementPtr; Tcl_HashTable numberCacheHash; Tcl_HashTable *numberCachePtr; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, @@ -2462,7 +2466,7 @@ DeleteScanNumberCache( static int BinaryEncodeHex( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -2471,6 +2475,7 @@ BinaryEncodeHex( unsigned char *data = NULL; unsigned char *cursor = NULL; int offset = 0, count = 0; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "data"); @@ -2506,7 +2511,7 @@ BinaryEncodeHex( static int BinaryDecodeHex( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -2517,6 +2522,7 @@ BinaryDecodeHex( int i, index, value, size, count = 0, cut = 0, strict = 0; enum {OPT_STRICT }; static const char *const optStrings[] = { "-strict", NULL }; + (void)dummy; if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "?options? data"); @@ -2625,7 +2631,7 @@ BinaryDecodeHex( static int BinaryEncode64( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -2638,6 +2644,7 @@ BinaryEncode64( int offset, i, index, size, outindex = 0, count = 0; enum { OPT_MAXLEN, OPT_WRAPCHAR }; static const char *const optStrings[] = { "-maxlen", "-wrapchar", NULL }; + (void)dummy; if (objc < 2 || objc % 2 != 0) { Tcl_WrongNumArgs(interp, 1, objv, @@ -2731,7 +2738,7 @@ BinaryEncode64( static int BinaryEncodeUu( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -2745,6 +2752,7 @@ BinaryEncodeUu( int wrapcharlen = sizeof(SingleNewline); enum { OPT_MAXLEN, OPT_WRAPCHAR }; static const char *const optStrings[] = { "-maxlen", "-wrapchar", NULL }; + (void)dummy; if (objc < 2 || objc % 2 != 0) { Tcl_WrongNumArgs(interp, 1, objv, @@ -2848,7 +2856,7 @@ BinaryEncodeUu( static int BinaryDecodeUu( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -2860,6 +2868,7 @@ BinaryDecodeUu( unsigned char c; enum { OPT_STRICT }; static const char *const optStrings[] = { "-strict", NULL }; + (void)dummy; if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "?options? data"); @@ -3011,7 +3020,7 @@ BinaryDecodeUu( static int BinaryDecode64( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -3024,6 +3033,7 @@ BinaryDecode64( int i, index, size, cut = 0, count = 0; enum { OPT_STRICT }; static const char *const optStrings[] = { "-strict", NULL }; + (void)dummy; if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "?options? data"); diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index d60633b..57f65c8 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -1121,6 +1121,8 @@ Tcl_AttemptDbCkalloc( int line) { char *result; + (void)file; + (void)line; result = (char *) TclpAlloc(size); return result; @@ -1200,6 +1202,8 @@ Tcl_AttemptDbCkrealloc( int line) { char *result; + (void)file; + (void)line; result = (char *) TclpRealloc(ptr, size); return result; @@ -1230,6 +1234,8 @@ Tcl_DbCkfree( const char *file, int line) { + (void)file; + (void)line; TclpFree(ptr); } @@ -1248,12 +1254,14 @@ void Tcl_InitMemory( Tcl_Interp *interp) { + (void)interp; } int Tcl_DumpActiveMemory( const char *fileName) { + (void)fileName; return TCL_OK; } @@ -1262,6 +1270,8 @@ Tcl_ValidateAllMemory( const char *file, int line) { + (void)file; + (void)line; } int @@ -1269,6 +1279,8 @@ TclDumpMemoryInfo( ClientData clientData, int flags) { + (void)clientData; + (void)flags; return 1; } diff --git a/generic/tclClock.c b/generic/tclClock.c index aec9714..95c4d46 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -1652,6 +1652,7 @@ ClockGetenvObjCmd( { const char *varName; const char *varValue; + (void)clientData; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1744,6 +1745,7 @@ ClockClicksObjCmd( int index = CLICKS_NATIVE; Tcl_Time now; Tcl_WideInt clicks = 0; + (void)clientData; switch (objc) { case 1: @@ -1806,6 +1808,7 @@ ClockMillisecondsObjCmd( Tcl_Obj *const *objv) /* Parameter values */ { Tcl_Time now; + (void)clientData; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1842,6 +1845,7 @@ ClockMicrosecondsObjCmd( int objc, /* Parameter count */ Tcl_Obj *const *objv) /* Parameter values */ { + (void)clientData; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; @@ -1994,6 +1998,7 @@ ClockSecondsObjCmd( Tcl_Obj *const *objv) /* Parameter values */ { Tcl_Time now; + (void)clientData; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index ff0f398..f2db757 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -135,6 +135,8 @@ Tcl_BreakObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; @@ -173,6 +175,7 @@ Tcl_CaseObjCmd( const char *stringPtr, *arg; Tcl_Obj *const *caseObjv; Tcl_Obj *armPtr; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, @@ -317,6 +320,7 @@ TclNRCatchObjCmd( Tcl_Obj *varNamePtr = NULL; Tcl_Obj *optionVarNamePtr = NULL; Interp *iPtr = (Interp *) interp; + (void)dummy; if ((objc < 2) || (objc > 4)) { Tcl_WrongNumArgs(interp, 1, objv, @@ -412,6 +416,7 @@ Tcl_CdObjCmd( { Tcl_Obj *dir; int result; + (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?dirName?"); @@ -466,6 +471,8 @@ Tcl_ConcatObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + if (objc >= 2) { Tcl_SetObjResult(interp, Tcl_ConcatObj(objc-1, objv+1)); } @@ -501,6 +508,8 @@ Tcl_ContinueObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; @@ -566,6 +575,7 @@ EncodingConvertfromObjCmd( Tcl_Encoding encoding; /* Encoding to use */ int length; /* Length of the byte array being converted */ const char *bytesPtr; /* Pointer to the first byte of the array */ + (void)dummy; if (objc == 2) { encoding = Tcl_GetEncoding(interp, NULL); @@ -628,6 +638,7 @@ EncodingConverttoObjCmd( Tcl_Encoding encoding; /* Encoding to use */ int length; /* Length of the string being converted */ const char *stringPtr; /* Pointer to the first byte of the string */ + (void)dummy; /* TODO - ADJUST OBJ INDICES WHEN ENSEMBLIFYING THIS */ @@ -688,6 +699,7 @@ EncodingDirsObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *dirListObj; + (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?dirList?"); @@ -725,11 +737,14 @@ EncodingDirsObjCmd( */ int -EncodingNamesObjCmd(ClientData dummy, /* Unused */ +EncodingNamesObjCmd( + ClientData dummy, /* Not used. */ Tcl_Interp* interp, /* Tcl interpreter */ int objc, /* Number of command line args */ Tcl_Obj* const objv[]) /* Vector of command line args */ { + (void)dummy; + if (objc > 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; @@ -755,11 +770,14 @@ EncodingNamesObjCmd(ClientData dummy, /* Unused */ */ int -EncodingSystemObjCmd(ClientData dummy, /* Unused */ +EncodingSystemObjCmd( + ClientData dummy, /* Not used. */ Tcl_Interp* interp, /* Tcl interpreter */ int objc, /* Number of command line args */ Tcl_Obj* const objv[]) /* Vector of command line args */ { + (void)dummy; + if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?encoding?"); return TCL_ERROR; @@ -799,6 +817,7 @@ Tcl_ErrorObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *options, *optName; + (void)dummy; if ((objc < 2) || (objc > 4)) { Tcl_WrongNumArgs(interp, 1, objv, "message ?errorInfo? ?errorCode?"); @@ -843,10 +862,12 @@ Tcl_ErrorObjCmd( /* ARGSUSED */ static int EvalCmdErrMsg( - ClientData data[], + ClientData dummy[], Tcl_Interp *interp, int result) { + (void)dummy; + if (result == TCL_ERROR) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (\"eval\" body line %d)", Tcl_GetErrorLine(interp))); @@ -875,6 +896,7 @@ TclNREvalObjCmd( Interp *iPtr = (Interp *) interp; CmdFrame *invoker = NULL; int word = 0; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "arg ?arg ...?"); @@ -932,6 +954,7 @@ Tcl_ExitObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_WideInt value; + (void)dummy; if ((objc != 1) && (objc != 2)) { Tcl_WrongNumArgs(interp, 1, objv, "?returnCode?"); @@ -991,6 +1014,7 @@ TclNRExprObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *resultPtr, *objPtr; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "arg ?arg ...?"); @@ -1121,13 +1145,14 @@ TclInitFileCmd( static int FileAttrAccessTimeCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_StatBuf buf; struct utimbuf tval; + (void)dummy; if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "name ?time?"); @@ -1203,13 +1228,14 @@ FileAttrAccessTimeCmd( static int FileAttrModifyTimeCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_StatBuf buf; struct utimbuf tval; + (void)dummy; if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "name ?time?"); @@ -1282,12 +1308,13 @@ FileAttrModifyTimeCmd( static int FileAttrLinkStatCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_StatBuf buf; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "name varName"); @@ -1318,12 +1345,13 @@ FileAttrLinkStatCmd( static int FileAttrStatCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_StatBuf buf; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "name varName"); @@ -1354,12 +1382,13 @@ FileAttrStatCmd( static int FileAttrTypeCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_StatBuf buf; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1392,12 +1421,13 @@ FileAttrTypeCmd( static int FileAttrSizeCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_StatBuf buf; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1429,13 +1459,14 @@ FileAttrSizeCmd( static int FileAttrIsDirectoryCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_StatBuf buf; int value = 0; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1467,11 +1498,13 @@ FileAttrIsDirectoryCmd( static int FileAttrIsExecutableCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { + (void)dummy; + if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); return TCL_ERROR; @@ -1498,11 +1531,13 @@ FileAttrIsExecutableCmd( static int FileAttrIsExistingCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { + (void)dummy; + if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); return TCL_ERROR; @@ -1529,13 +1564,14 @@ FileAttrIsExistingCmd( static int FileAttrIsFileCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_StatBuf buf; int value = 0; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1567,7 +1603,7 @@ FileAttrIsFileCmd( static int FileAttrIsOwnedCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1579,6 +1615,7 @@ FileAttrIsOwnedCmd( Tcl_StatBuf buf; #endif int value = 0; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1614,11 +1651,13 @@ FileAttrIsOwnedCmd( static int FileAttrIsReadableCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { + (void)dummy; + if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); return TCL_ERROR; @@ -1645,11 +1684,13 @@ FileAttrIsReadableCmd( static int FileAttrIsWritableCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { + (void)dummy; + if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); return TCL_ERROR; @@ -1676,12 +1717,13 @@ FileAttrIsWritableCmd( static int PathDirNameCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *dirPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1715,12 +1757,13 @@ PathDirNameCmd( static int PathExtensionCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *dirPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1754,12 +1797,13 @@ PathExtensionCmd( static int PathRootNameCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *dirPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1793,12 +1837,13 @@ PathRootNameCmd( static int PathTailCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *dirPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1832,12 +1877,13 @@ PathTailCmd( static int PathFilesystemCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *fsInfo; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1873,11 +1919,13 @@ PathFilesystemCmd( static int PathJoinCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { + (void)dummy; + if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "name ?name ...?"); return TCL_ERROR; @@ -1905,12 +1953,13 @@ PathJoinCmd( static int PathNativeNameCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_DString ds; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1942,12 +1991,13 @@ PathNativeNameCmd( static int PathNormalizeCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *fileName; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1980,12 +2030,13 @@ PathNormalizeCmd( static int PathSplitCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *res; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -2023,12 +2074,13 @@ PathSplitCmd( static int PathTypeCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *typeName; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -2071,11 +2123,13 @@ PathTypeCmd( static int FilesystemSeparatorCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { + (void)dummy; + if (objc < 1 || objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?name?"); return TCL_ERROR; @@ -2126,11 +2180,13 @@ FilesystemSeparatorCmd( static int FilesystemVolumesCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { + (void)dummy; + if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; @@ -2404,6 +2460,7 @@ TclNRForObjCmd( { Interp *iPtr = (Interp *) interp; ForIterData *iterPtr; + (void)dummy; if (objc != 5) { Tcl_WrongNumArgs(interp, 1, objv, "start test next command"); @@ -2597,6 +2654,8 @@ TclNRForeachCmd( int objc, Tcl_Obj *const objv[]) { + (void)dummy; + return EachloopCmd(interp, TCL_EACH_KEEP_NONE, objc, objv); } @@ -2617,6 +2676,7 @@ TclNRLmapCmd( int objc, Tcl_Obj *const objv[]) { + (void)dummy; return EachloopCmd(interp, TCL_EACH_COLLECT, objc, objv); } @@ -2906,6 +2966,7 @@ Tcl_FormatObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *resultPtr; /* Where result is stored finally. */ + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "formatString ?arg ...?"); diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 3a83712..a2858fa 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -222,6 +222,7 @@ TclNRIfObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *boolObj; + (void)dummy; if (objc <= 1) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( @@ -395,6 +396,7 @@ Tcl_IncrObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *newValuePtr, *incrPtr; + (void)dummy; if ((objc != 2) && (objc != 3)) { Tcl_WrongNumArgs(interp, 1, objv, "varName ?increment?"); @@ -480,6 +482,7 @@ InfoArgsCmd( Proc *procPtr; CompiledLocal *localPtr; Tcl_Obj *listObjPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "procname"); @@ -542,6 +545,7 @@ InfoBodyCmd( const char *name, *bytes; Proc *procPtr; int numBytes; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "procname"); @@ -600,6 +604,7 @@ InfoCmdCountCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; + (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -652,6 +657,7 @@ InfoCommandsCmd( int specificNsInPattern = 0;/* Init. to avoid compiler warning. */ Tcl_Command cmd; int i; + (void)dummy; /* * Get the pattern and find the "effective namespace" in which to list @@ -918,6 +924,8 @@ InfoCompleteCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "command"); return TCL_ERROR; @@ -960,6 +968,7 @@ InfoDefaultCmd( Proc *procPtr; CompiledLocal *localPtr; Tcl_Obj *valueObjPtr; + (void)dummy; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "procname arg varname"); @@ -1039,6 +1048,7 @@ InfoErrorStackCmd( { Tcl_Interp *target; Interp *iPtr; + (void)dummy; if ((objc != 1) && (objc != 2)) { Tcl_WrongNumArgs(interp, 1, objv, "?interp?"); @@ -1088,6 +1098,7 @@ TclInfoExistsCmd( { const char *varName; Var *varPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "varName"); @@ -1136,6 +1147,7 @@ InfoFrameCmd( CmdFrame *framePtr, **cmdFramePtrPtr = &iPtr->cmdFramePtr; CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; int topLevel = 0; + (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?number?"); @@ -1473,6 +1485,7 @@ InfoFunctionsCmd( { Tcl_Obj *script; int code; + (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?pattern?"); @@ -1537,6 +1550,7 @@ InfoHostnameCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { const char *name; + (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1583,6 +1597,7 @@ InfoLevelCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; + (void)dummy; if (objc == 1) { /* Just "info level" */ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(iPtr->varFramePtr->level)); @@ -1657,6 +1672,7 @@ InfoLibraryCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { const char *libDirName; + (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1704,6 +1720,7 @@ InfoLoadedCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { const char *interpName, *packageName; + (void)dummy; if (objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "?interp? ?packageName?"); @@ -1751,6 +1768,8 @@ InfoNameOfExecutableCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; @@ -1788,6 +1807,7 @@ InfoPatchLevelCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { const char *patchlevel; + (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1846,6 +1866,7 @@ InfoProcsCmd( Tcl_HashEntry *entryPtr; Tcl_HashSearch search; Command *cmdPtr, *realCmdPtr; + (void)dummy; /* * Get the pattern and find the "effective namespace" in which to list @@ -2022,6 +2043,8 @@ InfoScriptCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; + (void)dummy; + if ((objc != 1) && (objc != 2)) { Tcl_WrongNumArgs(interp, 1, objv, "?filename?"); return TCL_ERROR; @@ -2068,6 +2091,8 @@ InfoSharedlibCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; @@ -2107,6 +2132,7 @@ InfoTclVersionCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *version; + (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -2150,6 +2176,7 @@ InfoCmdTypeCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Command command; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "commandName"); @@ -2202,6 +2229,7 @@ Tcl_JoinObjCmd( { int length, listLen; Tcl_Obj *resObjPtr = NULL, *joinObjPtr, **elemPtrs; + (void)dummy; if ((objc < 2) || (objc > 3)) { Tcl_WrongNumArgs(interp, 1, objv, "list ?joinString?"); @@ -2289,6 +2317,7 @@ Tcl_LassignObjCmd( Tcl_Obj **listObjv; /* The contents of the list. */ int listObjc; /* The length of the list. */ int code = TCL_OK; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "list ?varName ...?"); @@ -2359,8 +2388,8 @@ Tcl_LindexObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - Tcl_Obj *elemPtr; /* Pointer to the element being extracted. */ + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "list ?index ...?"); @@ -2420,6 +2449,7 @@ Tcl_LinsertObjCmd( { Tcl_Obj *listPtr; int index, len, result; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "list index ?element ...?"); @@ -2501,6 +2531,7 @@ Tcl_ListObjCmd( Tcl_Obj *const objv[]) /* The argument objects. */ { + (void)dummy; /* * If there are no list elements, the result is an empty object. * Otherwise set the interpreter's result object to be a list object. @@ -2538,6 +2569,7 @@ Tcl_LlengthObjCmd( /* Argument objects. */ { int listLen, result; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "list"); @@ -2577,7 +2609,7 @@ Tcl_LlengthObjCmd( int Tcl_LpopObjCmd( - ClientData notUsed, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) @@ -2586,6 +2618,7 @@ Tcl_LpopObjCmd( int listLen, result; Tcl_Obj *elemPtr, *stored; Tcl_Obj *listPtr, **elemPtrs; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "listvar ?index?"); @@ -2670,13 +2703,14 @@ Tcl_LpopObjCmd( int Tcl_LrangeObjCmd( - ClientData notUsed, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { int listLen, first, last, result; + (void)dummy; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "list first last"); @@ -2738,7 +2772,7 @@ LremoveIndexCompare( int Tcl_LremoveObjCmd( - ClientData notUsed, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -2746,6 +2780,7 @@ Tcl_LremoveObjCmd( int i, idxc; int listLen, *idxv, prevIdx, first, num; Tcl_Obj *listObj; + (void)dummy; /* * Parse the arguments. @@ -2865,6 +2900,7 @@ Tcl_LrepeatObjCmd( { int elementCount, i, totalElems; Tcl_Obj *listPtr, **dataArray = NULL; + (void)dummy; /* * Check arguments for legality: @@ -2973,6 +3009,7 @@ Tcl_LreplaceObjCmd( { Tcl_Obj *listPtr; int first, last, listLen, numToDelete, result; + (void)dummy; if (objc < 4) { Tcl_WrongNumArgs(interp, 1, objv, @@ -3067,13 +3104,14 @@ Tcl_LreplaceObjCmd( int Tcl_LreverseObjCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { Tcl_Obj **elemv; int elemc, i, j; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "list"); @@ -3146,7 +3184,7 @@ Tcl_LreverseObjCmd( int Tcl_LsearchObjCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ @@ -3183,6 +3221,7 @@ Tcl_LsearchObjCmd( EXACT, GLOB, REGEXP, SORTED }; enum modes mode; + (void)dummy; mode = GLOB; dataType = ASCII; @@ -3898,13 +3937,14 @@ Tcl_LsearchObjCmd( int Tcl_LsetObjCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { Tcl_Obj *listPtr; /* Pointer to the list being altered. */ Tcl_Obj *finalValuePtr; /* Value finally assigned to the variable. */ + (void)dummy; /* * Check parameter count. @@ -3983,7 +4023,7 @@ Tcl_LsetObjCmd( int Tcl_LsortObjCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ @@ -4011,6 +4051,7 @@ Tcl_LsortObjCmd( LSORT_INCREASING, LSORT_INDEX, LSORT_INDICES, LSORT_INTEGER, LSORT_NOCASE, LSORT_REAL, LSORT_STRIDE, LSORT_UNIQUE }; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "?-option value ...? list"); diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 69e752e..56efe7b 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -88,6 +88,7 @@ Tcl_PwdObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *retVal; + (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -142,6 +143,7 @@ Tcl_RegexpObjCmd( REGEXP_EXPANDED,REGEXP_LINE, REGEXP_LINESTOP,REGEXP_LINEANCHOR, REGEXP_NOCASE, REGEXP_START, REGEXP_LAST }; + (void)dummy; indices = 0; about = 0; @@ -504,6 +506,7 @@ Tcl_RegsubObjCmd( REGSUB_LINESTOP, REGSUB_LINEANCHOR, REGSUB_NOCASE, REGSUB_START, REGSUB_LAST }; + (void)dummy; cflags = TCL_REG_ADVANCED; all = 0; @@ -1002,12 +1005,13 @@ Tcl_RegsubObjCmd( int Tcl_RenameObjCmd( - ClientData dummy, /* Arbitrary value passed to the command. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { const char *oldName, *newName; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "oldName newName"); @@ -1053,6 +1057,7 @@ Tcl_ReturnObjCmd( int explicitResult = (0 == (objc % 2)); int numOptionWords = objc - 1 - explicitResult; + (void)dummy; if (TCL_ERROR == TclMergeReturnOptions(interp, numOptionWords, objv+1, &returnOpts, &code, &level)) { @@ -1105,6 +1110,7 @@ TclNRSourceObjCmd( int result; void **pkgFiles = NULL; void *names = NULL; + (void)dummy; if (objc < 2 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "?-encoding name? fileName"); @@ -1181,6 +1187,7 @@ Tcl_SplitObjCmd( const char *end; int splitCharLen, stringLen; Tcl_Obj *listPtr, *objPtr; + (void)dummy; if (objc == 2) { splitChars = " \n\t\r"; @@ -1323,6 +1330,7 @@ StringFirstCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int start = 0; + (void)dummy; if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, @@ -1368,6 +1376,7 @@ StringLastCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int last = INT_MAX - 1; + (void)dummy; if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, @@ -1413,6 +1422,7 @@ StringIndexCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int length, index; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "string charIndex"); @@ -1485,6 +1495,7 @@ StringInsertCmd( int length; /* String length */ int index; /* Insert index */ Tcl_Obj *outObj; /* Output object */ + (void)dummy; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "string index insertString"); @@ -1568,6 +1579,7 @@ StringIsCmd( enum isOptions { OPT_STRICT, OPT_FAILIDX }; + (void)dummy; if (objc < 3 || objc > 6) { Tcl_WrongNumArgs(interp, 1, objv, @@ -1983,6 +1995,7 @@ StringMapCmd( Tcl_Obj **mapElemv, *sourceObj, *resultPtr; Tcl_UniChar *ustring1, *ustring2, *p, *end; int (*strCmpFn)(const Tcl_UniChar*, const Tcl_UniChar*, unsigned long); + (void)dummy; if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "?-nocase? charMap string"); @@ -2250,6 +2263,7 @@ StringMatchCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int nocase = 0; + (void)dummy; if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "?-nocase? pattern string"); @@ -2302,6 +2316,7 @@ StringRangeCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int length, first, last; + (void)dummy; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "string first last"); @@ -2359,6 +2374,7 @@ StringReptCmd( { int count; Tcl_Obj *resultPtr; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "string count"); @@ -2414,6 +2430,7 @@ StringRplcCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int first, last, length, end; + (void)dummy; if (objc < 4 || objc > 5) { Tcl_WrongNumArgs(interp, 1, objv, "string first last ?string?"); @@ -2489,6 +2506,8 @@ StringRevCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "string"); return TCL_ERROR; @@ -2527,6 +2546,7 @@ StringStartCmd( Tcl_UniChar ch = 0; const char *p, *string; int cur, index, length, numChars; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "string index"); @@ -2588,6 +2608,7 @@ StringEndCmd( Tcl_UniChar ch = 0; const char *p, *end, *string; int cur, index, length, numChars; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "string index"); @@ -2655,6 +2676,7 @@ StringEqualCmd( const char *string2; int length, i, match, nocase = 0, reqlength = -1; + (void)dummy; if (objc < 3 || objc > 6) { str_cmp_args: @@ -2729,6 +2751,7 @@ StringCmpCmd( */ int match, nocase, reqlength, status; + (void)dummy; status = TclStringCmpOpts(interp, objc, objv, &nocase, &reqlength); if (status != TCL_OK) { @@ -2811,6 +2834,7 @@ StringCatCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *objResultPtr; + (void)dummy; if (objc < 2) { /* @@ -2856,6 +2880,7 @@ StringBytesCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int length; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "string"); @@ -2892,6 +2917,8 @@ StringLenCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "string"); return TCL_ERROR; @@ -2929,6 +2956,7 @@ StringLowerCmd( int length1, length2; const char *string1; char *string2; + (void)dummy; if (objc < 2 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "string ?first? ?last?"); @@ -3014,6 +3042,7 @@ StringUpperCmd( int length1, length2; const char *string1; char *string2; + (void)dummy; if (objc < 2 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "string ?first? ?last?"); @@ -3099,6 +3128,7 @@ StringTitleCmd( int length1, length2; const char *string1; char *string2; + (void)dummy; if (objc < 2 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "string ?first? ?last?"); @@ -3183,6 +3213,7 @@ StringTrimCmd( { const char *string1, *string2; int triml, trimr, length1, length2; + (void)dummy; if (objc == 3) { string2 = TclGetStringFromObj(objv[2], &length2); @@ -3230,6 +3261,7 @@ StringTrimLCmd( { const char *string1, *string2; int trim, length1, length2; + (void)dummy; if (objc == 3) { string2 = TclGetStringFromObj(objv[2], &length2); @@ -3276,6 +3308,7 @@ StringTrimRCmd( { const char *string1, *string2; int trim, length1, length2; + (void)dummy; if (objc == 3) { string2 = TclGetStringFromObj(objv[2], &length2); @@ -3428,6 +3461,7 @@ TclNRSubstObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int flags; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, @@ -3502,6 +3536,7 @@ TclNRSwitchObjCmd( }; typedef int (*strCmpFn_t)(const char *, const char *); strCmpFn_t strCmpFn = TclUtfCmp; + (void)dummy; mode = OPT_EXACT; foundmode = 0; @@ -4000,6 +4035,7 @@ Tcl_ThrowObjCmd( { Tcl_Obj *options; int len; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "type message"); @@ -4070,6 +4106,7 @@ Tcl_TimeObjCmd( #else Tcl_WideInt start, stop; #endif + (void)dummy; if (objc == 2) { count = 1; @@ -4188,6 +4225,7 @@ Tcl_TimeRateObjCmd( }; NRE_callback *rootPtr; ByteCode *codePtr = NULL; + (void)dummy; for (i = 1; i < objc - 1; i++) { int index; @@ -4438,6 +4476,7 @@ Tcl_TimeRateObjCmd( */ threshold = 1; maxcnt = 0; + /* FALLTHRU */ case TCL_CONTINUE: result = TCL_OK; break; @@ -4718,6 +4757,7 @@ TclNRTryObjCmd( enum Handlers { TryFinally, TryOn, TryTrap }; + (void)clientData; /* * Parse the arguments. The handlers are passed to subsequent callbacks as @@ -5287,6 +5327,7 @@ TclNRWhileObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { ForIterData *iterPtr; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "test command"); diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index a2c1c43..35501d2 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -267,6 +267,7 @@ TclCompileArrayExistsCmd( DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr; int isScalar, localIndex; + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -522,7 +523,7 @@ TclCompileArrayUnsetCmd( int TclCompileBreakCmd( - Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Interp *dummy, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ Command *cmdPtr, /* Points to defintion of command being @@ -531,6 +532,8 @@ TclCompileBreakCmd( { ExceptionRange *rangePtr; ExceptionAux *auxPtr; + (void)dummy; + (void)cmdPtr; if (parsePtr->numWords != 1) { return TCL_ERROR; @@ -592,6 +595,7 @@ TclCompileCatchCmd( int resultIndex, optsIndex, range, dropScript = 0; DefineLineInformation; /* TIP #280 */ int depth = TclGetStackDepth(envPtr); + (void)cmdPtr; /* * If syntax does not match what we expect for [catch], do not compile. @@ -765,7 +769,7 @@ TclCompileCatchCmd( int TclCompileClockClicksCmd( - Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Interp* dummy, /* Tcl interpreter */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ Command *cmdPtr, /* Points to defintion of command being @@ -773,6 +777,8 @@ TclCompileClockClicksCmd( CompileEnv *envPtr) /* Holds resulting instructions. */ { Tcl_Token* tokenPtr; + (void)dummy; + (void)cmdPtr; switch (parsePtr->numWords) { case 1: @@ -829,13 +835,15 @@ TclCompileClockClicksCmd( int TclCompileClockReadingCmd( - Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Interp* dummy, /* Tcl interpreter */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ Command *cmdPtr, /* Points to defintion of command being * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { + (void)dummy; + if (parsePtr->numWords != 1) { return TCL_ERROR; } @@ -876,6 +884,7 @@ TclCompileConcatCmd( Tcl_Obj *objPtr, *listObj; Tcl_Token *tokenPtr; int i; + (void)cmdPtr; /* TODO: Consider compiling expansion case. */ if (parsePtr->numWords == 1) { @@ -952,7 +961,7 @@ TclCompileConcatCmd( int TclCompileContinueCmd( - Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Interp *dummy, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ Command *cmdPtr, /* Points to defintion of command being @@ -961,6 +970,8 @@ TclCompileContinueCmd( { ExceptionRange *rangePtr; ExceptionAux *auxPtr; + (void)dummy; + (void)cmdPtr; /* * There should be no argument after the "continue". @@ -1026,6 +1037,7 @@ TclCompileDictSetCmd( int i, dictVarIndex; DefineLineInformation; /* TIP #280 */ Tcl_Token *varTokenPtr; + (void)cmdPtr; /* * There must be at least one argument after the command. @@ -1151,6 +1163,7 @@ TclCompileDictGetCmd( Tcl_Token *tokenPtr; int i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * There must be at least two arguments after the command (the single-arg @@ -1188,6 +1201,7 @@ TclCompileDictGetWithDefaultCmd( Tcl_Token *tokenPtr; int i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * There must be at least three arguments after the command. @@ -1220,6 +1234,7 @@ TclCompileDictExistsCmd( Tcl_Token *tokenPtr; int i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * There must be at least two arguments after the command (the single-arg @@ -2315,6 +2330,8 @@ PrintDictUpdateInfo( { DictUpdateInfo *duiPtr = (DictUpdateInfo *)clientData; int i; + (void)codePtr; + (void)pcOffset; for (i=0 ; i<duiPtr->length ; i++) { if (i) { @@ -2334,6 +2351,8 @@ DisassembleDictUpdateInfo( DictUpdateInfo *duiPtr = (DictUpdateInfo *)clientData; int i; Tcl_Obj *variables = Tcl_NewObj(); + (void)codePtr; + (void)pcOffset; for (i=0 ; i<duiPtr->length ; i++) { Tcl_ListObjAppendElement(NULL, variables, @@ -2376,6 +2395,7 @@ TclCompileErrorCmd( Tcl_Token *tokenPtr; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (parsePtr->numWords < 2 || parsePtr->numWords > 4) { return TCL_ERROR; @@ -2445,6 +2465,7 @@ TclCompileExprCmd( CompileEnv *envPtr) /* Holds resulting instructions. */ { Tcl_Token *firstWordPtr; + (void)cmdPtr; if (parsePtr->numWords == 1) { return TCL_ERROR; @@ -2494,6 +2515,7 @@ TclCompileForCmd( int bodyCodeOffset, nextCodeOffset, jumpDist; int bodyRange, nextRange; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (parsePtr->numWords != 5) { return TCL_ERROR; @@ -2712,6 +2734,7 @@ CompileEachloopCmd( int numWords, numLists, i, j, code = TCL_OK; Tcl_Obj *varListObj = NULL; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * If the foreach command isn't in a procedure, don't compile it inline: @@ -3000,6 +3023,8 @@ PrintForeachInfo( ForeachInfo *infoPtr = (ForeachInfo *)clientData; ForeachVarList *varsPtr; int i, j; + (void)codePtr; + (void)pcOffset; Tcl_AppendToObj(appendObj, "data=[", -1); @@ -3040,6 +3065,8 @@ PrintNewForeachInfo( ForeachInfo *infoPtr = (ForeachInfo *)clientData; ForeachVarList *varsPtr; int i, j; + (void)codePtr; + (void)pcOffset; Tcl_AppendPrintfToObj(appendObj, "jumpOffset=%+d, vars=", infoPtr->loopCtTemp); @@ -3071,6 +3098,8 @@ DisassembleForeachInfo( ForeachVarList *varsPtr; int i, j; Tcl_Obj *objPtr, *innerPtr; + (void)codePtr; + (void)pcOffset; /* * Data stores. @@ -3118,6 +3147,8 @@ DisassembleNewForeachInfo( ForeachVarList *varsPtr; int i, j; Tcl_Obj *objPtr, *innerPtr; + (void)codePtr; + (void)pcOffset; /* * Jump offset. @@ -3176,6 +3207,7 @@ TclCompileFormatCmd( Tcl_Obj **objv, *formatObj, *tmpObj; const char *bytes, *start; int i, j, len; + (void)cmdPtr; /* * Don't handle any guaranteed-error cases. diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c index c282849..513aa7d 100644 --- a/generic/tclCompCmdsGR.c +++ b/generic/tclCompCmdsGR.c @@ -93,6 +93,7 @@ TclCompileGlobalCmd( Tcl_Token *varTokenPtr; int localIndex, numWords, i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* TODO: Consider support for compiling expanded args. */ numWords = parsePtr->numWords; @@ -188,6 +189,7 @@ TclCompileIfCmd( int boolVal; /* Value of static condition. */ int compileScripts = 1; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * Only compile the "if" command if all arguments are simple words, in @@ -478,6 +480,7 @@ TclCompileIncrCmd( Tcl_Token *varTokenPtr, *incrTokenPtr; int isScalar, localIndex, haveImmValue, immValue; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if ((parsePtr->numWords != 2) && (parsePtr->numWords != 3)) { return TCL_ERROR; @@ -640,13 +643,15 @@ TclCompileInfoCommandsCmd( int TclCompileInfoCoroutineCmd( - Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Interp *dummy, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ Command *cmdPtr, /* Points to defintion of command being * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { + (void)dummy; + (void)cmdPtr; /* * Only compile [info coroutine] without arguments. */ @@ -675,6 +680,7 @@ TclCompileInfoExistsCmd( Tcl_Token *tokenPtr; int isScalar, localIndex; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -721,6 +727,7 @@ TclCompileInfoLevelCmd( * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { + (void)cmdPtr; /* * Only compile [info level] without arguments or with a single argument. */ @@ -758,6 +765,7 @@ TclCompileInfoObjectClassCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr); + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -778,6 +786,7 @@ TclCompileInfoObjectIsACmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr); + (void)cmdPtr; /* * We only handle [info object isa object <somevalue>]. The first three @@ -814,6 +823,7 @@ TclCompileInfoObjectNamespaceCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr); + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -853,6 +863,7 @@ TclCompileLappendCmd( Tcl_Token *varTokenPtr, *valueTokenPtr; int isScalar, localIndex, numWords, i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* TODO: Consider support for compiling expanded args. */ numWords = parsePtr->numWords; @@ -969,6 +980,7 @@ TclCompileLassignCmd( Tcl_Token *tokenPtr; int isScalar, localIndex, numWords, idx; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; numWords = parsePtr->numWords; @@ -1073,6 +1085,7 @@ TclCompileLindexCmd( Tcl_Token *idxTokenPtr, *valTokenPtr; int i, idx, numWords = parsePtr->numWords; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * Quit if too few args. @@ -1165,6 +1178,7 @@ TclCompileListCmd( Tcl_Token *valueTokenPtr; int i, numWords, concat, build; Tcl_Obj *listObj, *objPtr; + (void)cmdPtr; if (parsePtr->numWords == 1) { /* @@ -1277,6 +1291,7 @@ TclCompileLlengthCmd( { Tcl_Token *varTokenPtr; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -1311,6 +1326,7 @@ TclCompileLrangeCmd( Tcl_Token *tokenPtr, *listTokenPtr; DefineLineInformation; /* TIP #280 */ int idx1, idx2; + (void)cmdPtr; if (parsePtr->numWords != 4) { return TCL_ERROR; @@ -1372,6 +1388,7 @@ TclCompileLinsertCmd( Tcl_Token *tokenPtr, *listTokenPtr; DefineLineInformation; /* TIP #280 */ int idx, i; + (void)cmdPtr; if (parsePtr->numWords < 3) { return TCL_ERROR; @@ -1476,6 +1493,7 @@ TclCompileLreplaceCmd( DefineLineInformation; /* TIP #280 */ int idx1, idx2, i; int emptyPrefix=1, suffixStart = 0; + (void)cmdPtr; if (parsePtr->numWords < 4) { return TCL_ERROR; @@ -1644,6 +1662,7 @@ TclCompileLsetCmd( int isScalar; /* Flag == 1 if scalar, 0 if array. */ int i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * Check argument count. @@ -1776,13 +1795,15 @@ TclCompileLsetCmd( int TclCompileNamespaceCurrentCmd( - Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Interp *dummy, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ Command *cmdPtr, /* Points to defintion of command being * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { + (void)dummy; + (void)cmdPtr; /* * Only compile [namespace current] without arguments. */ @@ -1810,6 +1831,7 @@ TclCompileNamespaceCodeCmd( { Tcl_Token *tokenPtr; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -1860,6 +1882,7 @@ TclCompileNamespaceOriginCmd( { Tcl_Token *tokenPtr; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -1883,6 +1906,7 @@ TclCompileNamespaceQualifiersCmd( Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr); DefineLineInformation; /* TIP #280 */ int off; + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -1919,6 +1943,7 @@ TclCompileNamespaceTailCmd( Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr); DefineLineInformation; /* TIP #280 */ JumpFixup jumpFixup; + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -1956,6 +1981,7 @@ TclCompileNamespaceUpvarCmd( Tcl_Token *tokenPtr, *otherTokenPtr, *localTokenPtr; int localIndex, numWords, i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (envPtr->procPtr == NULL) { return TCL_ERROR; @@ -2017,6 +2043,7 @@ TclCompileNamespaceWhichCmd( DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr, *opt; int idx; + (void)cmdPtr; if (parsePtr->numWords < 2 || parsePtr->numWords > 3) { return TCL_ERROR; @@ -2083,6 +2110,7 @@ TclCompileRegexpCmd( int i, len, nocase, exact, sawLast, simple; const char *str; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * We are only interested in compiling simple regexp cases. Currently @@ -2269,6 +2297,7 @@ TclCompileRegsubCmd( Tcl_DString pattern; const char *bytes; int len, exact, quantified, result = TCL_ERROR; + (void)cmdPtr; if (parsePtr->numWords < 5 || parsePtr->numWords > 6) { return TCL_ERROR; @@ -2429,6 +2458,7 @@ TclCompileReturnCmd( Tcl_Obj *returnOpts, **objv; Tcl_Token *wordTokenPtr = TokenAfter(parsePtr->tokenPtr); DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* * Check for special case which can always be compiled: @@ -2674,6 +2704,7 @@ TclCompileUpvarCmd( int localIndex, numWords, i; DefineLineInformation; /* TIP #280 */ Tcl_Obj *objPtr; + (void)cmdPtr; if (envPtr->procPtr == NULL) { return TCL_ERROR; @@ -2780,6 +2811,7 @@ TclCompileVariableCmd( Tcl_Token *varTokenPtr, *valueTokenPtr; int localIndex, numWords, i; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; numWords = parsePtr->numWords; if (numWords < 2) { @@ -2855,7 +2887,7 @@ TclCompileVariableCmd( static int IndexTailVarIfKnown( - Tcl_Interp *interp, + Tcl_Interp *dummy, Tcl_Token *varTokenPtr, /* Token representing the variable name */ CompileEnv *envPtr) /* Holds resulting instructions. */ { @@ -2864,6 +2896,7 @@ IndexTailVarIfKnown( int len, n = varTokenPtr->numComponents; Tcl_Token *lastTokenPtr; int full, localIndex; + (void)dummy; /* * Determine if the tail is (a) known at compile time, and (b) not an @@ -2954,6 +2987,7 @@ TclCompileObjectNextCmd( DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr = parsePtr->tokenPtr; int i; + (void)cmdPtr; if (parsePtr->numWords > 255) { return TCL_ERROR; @@ -2979,6 +3013,7 @@ TclCompileObjectNextToCmd( DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr = parsePtr->tokenPtr; int i; + (void)cmdPtr; if (parsePtr->numWords < 2 || parsePtr->numWords > 255) { return TCL_ERROR; @@ -2994,13 +3029,15 @@ TclCompileObjectNextToCmd( int TclCompileObjectSelfCmd( - Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Interp *dummy, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ Command *cmdPtr, /* Points to defintion of command being * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { + (void)dummy; + (void)cmdPtr; /* * We only handle [self] and [self object] (which is the same operation). * These are the only very common operations on [self] for which diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index b24397a..b9ef056 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -45,13 +45,12 @@ static int CompileUnaryOpCmd(Tcl_Interp *interp, CompileEnv *envPtr); static void IssueSwitchChainedTests(Tcl_Interp *interp, CompileEnv *envPtr, int mode, int noCase, - int valueIndex, int numWords, - Tcl_Token **bodyToken, int *bodyLines, - int **bodyNext); -static void IssueSwitchJumpTable(Tcl_Interp *interp, - CompileEnv *envPtr, int valueIndex, int numWords, Tcl_Token **bodyToken, - int *bodyLines, int **bodyContLines); + int *bodyLines, int **bodyNext); +static void IssueSwitchJumpTable(Tcl_Interp *interp, + CompileEnv *envPtr, int numWords, + Tcl_Token **bodyToken, int *bodyLines, + int **bodyContLines); static int IssueTryClausesInstructions(Tcl_Interp *interp, CompileEnv *envPtr, Tcl_Token *bodyToken, int numHandlers, int *matchCodes, @@ -138,6 +137,7 @@ TclCompileSetCmd( Tcl_Token *varTokenPtr, *valueTokenPtr; int isAssignment, isScalar, localIndex, numWords; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; numWords = parsePtr->numWords; if ((numWords != 2) && (numWords != 3)) { @@ -233,6 +233,7 @@ TclCompileStringCatCmd( Tcl_Token *wordTokenPtr; Tcl_Obj *obj, *folded; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* Trivial case, no arg */ @@ -303,6 +304,7 @@ TclCompileStringCmpCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr; + (void)cmdPtr; /* * We don't support any flags; the bytecode isn't that sophisticated. @@ -335,6 +337,7 @@ TclCompileStringEqualCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr; + (void)cmdPtr; /* * We don't support any flags; the bytecode isn't that sophisticated. @@ -367,6 +370,7 @@ TclCompileStringFirstCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr; + (void)cmdPtr; /* * We don't support any flags; the bytecode isn't that sophisticated. @@ -399,6 +403,7 @@ TclCompileStringLastCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr; + (void)cmdPtr; /* * We don't support any flags; the bytecode isn't that sophisticated. @@ -431,6 +436,7 @@ TclCompileStringIndexCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr; + (void)cmdPtr; if (parsePtr->numWords != 3) { return TCL_ERROR; @@ -460,6 +466,7 @@ TclCompileStringInsertCmd( Tcl_Token *tokenPtr; DefineLineInformation; /* TIP #280 */ int idx; + (void)cmdPtr; if (parsePtr->numWords != 4) { return TCL_ERROR; @@ -885,6 +892,7 @@ TclCompileStringLenCmd( DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr; Tcl_Obj *objPtr; + (void)cmdPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; @@ -988,6 +996,7 @@ TclCompileStringRangeCmd( DefineLineInformation; /* TIP #280 */ Tcl_Token *stringTokenPtr, *fromTokenPtr, *toTokenPtr; int idx1, idx2; + (void)cmdPtr; if (parsePtr->numWords != 4) { return TCL_ERROR; @@ -1064,6 +1073,7 @@ TclCompileStringReplaceCmd( Tcl_Token *tokenPtr, *valueTokenPtr; DefineLineInformation; /* TIP #280 */ int first, last; + (void)cmdPtr; if (parsePtr->numWords < 4 || parsePtr->numWords > 5) { return TCL_ERROR; @@ -1262,6 +1272,7 @@ TclCompileStringTrimLCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr; + (void)cmdPtr; if (parsePtr->numWords != 2 && parsePtr->numWords != 3) { return TCL_ERROR; @@ -1290,6 +1301,7 @@ TclCompileStringTrimRCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr; + (void)cmdPtr; if (parsePtr->numWords != 2 && parsePtr->numWords != 3) { return TCL_ERROR; @@ -1318,6 +1330,7 @@ TclCompileStringTrimCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr; + (void)cmdPtr; if (parsePtr->numWords != 2 && parsePtr->numWords != 3) { return TCL_ERROR; @@ -1472,6 +1485,7 @@ TclCompileSubstCmd( Tcl_Token *wordTokenPtr = TokenAfter(parsePtr->tokenPtr); int code = TCL_ERROR; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (numArgs == 0) { return TCL_ERROR; @@ -1816,6 +1830,7 @@ TclCompileSwitchCmd( int result = TCL_ERROR; DefineLineInformation; /* TIP #280 */ int *clNext = envPtr->clNext; + (void)cmdPtr; /* * Only handle the following versions: @@ -2080,10 +2095,10 @@ TclCompileSwitchCmd( CompileWord(envPtr, valueTokenPtr, interp, valueIndex); if (mode == Switch_Exact) { - IssueSwitchJumpTable(interp, envPtr, valueIndex, numWords, bodyToken, + IssueSwitchJumpTable(interp, envPtr, numWords, bodyToken, bodyLines, bodyContLines); } else { - IssueSwitchChainedTests(interp, envPtr, mode, noCase, valueIndex, + IssueSwitchChainedTests(interp, envPtr, mode, noCase, numWords, bodyToken, bodyLines, bodyContLines); } result = TCL_OK; @@ -2124,7 +2139,6 @@ IssueSwitchChainedTests( CompileEnv *envPtr, /* Holds resulting instructions. */ int mode, /* Exact, Glob or Regexp */ int noCase, /* Case-insensitivity flag. */ - int valueIndex, /* The value to match against. */ int numBodyTokens, /* Number of tokens describing things the * switch can match against and bodies to * execute when the match succeeds. */ @@ -2373,7 +2387,6 @@ static void IssueSwitchJumpTable( Tcl_Interp *interp, /* Context for compiling script bodies. */ CompileEnv *envPtr, /* Holds resulting instructions. */ - int valueIndex, /* The value to match against. */ int numBodyTokens, /* Number of tokens describing things the * switch can match against and bodies to * execute when the match succeeds. */ @@ -2607,6 +2620,7 @@ PrintJumptableInfo( Tcl_HashSearch search; const char *keyPtr; int offset, i = 0; + (void)codePtr; hPtr = Tcl_FirstHashEntry(&jtPtr->hashTable, &search); for (; hPtr ; hPtr = Tcl_NextHashEntry(&search)) { @@ -2637,6 +2651,8 @@ DisassembleJumptableInfo( Tcl_HashSearch search; const char *keyPtr; int offset; + (void)codePtr; + (void)pcOffset; hPtr = Tcl_FirstHashEntry(&jtPtr->hashTable, &search); for (; hPtr ; hPtr = Tcl_NextHashEntry(&search)) { @@ -2678,6 +2694,7 @@ TclCompileTailcallCmd( DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr = parsePtr->tokenPtr; int i; + (void)cmdPtr; if (parsePtr->numWords < 2 || parsePtr->numWords > 256 || envPtr->procPtr == NULL) { @@ -2727,6 +2744,7 @@ TclCompileThrowCmd( Tcl_Token *codeToken, *msgToken; Tcl_Obj *objPtr; int codeKnown, codeIsList, codeIsValid, len; + (void)cmdPtr; if (numWords != 3) { return TCL_ERROR; @@ -2832,6 +2850,7 @@ TclCompileTryCmd( Tcl_Obj **matchClauses = NULL; int *matchCodes=NULL, *resultVarIndices=NULL, *optionVarIndices=NULL; int i; + (void)cmdPtr; if (numWords < 2) { return TCL_ERROR; @@ -3639,6 +3658,7 @@ TclCompileUnsetCmd( Tcl_Token *varTokenPtr; int isScalar, localIndex, flags = 1, i, varCount = 0, haveFlags = 0; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; /* TODO: Consider support for compiling expanded args. */ @@ -3781,6 +3801,7 @@ TclCompileWhileCmd( * infinite loop. */ Tcl_Obj *boolObj; DefineLineInformation; /* TIP #280 */ + (void)cmdPtr; if (parsePtr->numWords != 3) { return TCL_ERROR; @@ -3952,6 +3973,8 @@ TclCompileYieldCmd( * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { + (void)cmdPtr; + if (parsePtr->numWords < 1 || parsePtr->numWords > 2) { return TCL_ERROR; } @@ -3998,6 +4021,7 @@ TclCompileYieldToCmd( DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr); int i; + (void)cmdPtr; if (parsePtr->numWords < 2) { return TCL_ERROR; @@ -4245,6 +4269,7 @@ TclCompileInvertOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileUnaryOpCmd(interp, parsePtr, INST_BITNOT, envPtr); } @@ -4256,6 +4281,7 @@ TclCompileNotOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileUnaryOpCmd(interp, parsePtr, INST_LNOT, envPtr); } @@ -4267,6 +4293,7 @@ TclCompileAddOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileAssociativeBinaryOpCmd(interp, parsePtr, "0", INST_ADD, envPtr); } @@ -4279,6 +4306,7 @@ TclCompileMulOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileAssociativeBinaryOpCmd(interp, parsePtr, "1", INST_MULT, envPtr); } @@ -4291,6 +4319,7 @@ TclCompileAndOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileAssociativeBinaryOpCmd(interp, parsePtr, "-1", INST_BITAND, envPtr); } @@ -4303,6 +4332,7 @@ TclCompileOrOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileAssociativeBinaryOpCmd(interp, parsePtr, "0", INST_BITOR, envPtr); } @@ -4315,6 +4345,7 @@ TclCompileXorOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileAssociativeBinaryOpCmd(interp, parsePtr, "0", INST_BITXOR, envPtr); } @@ -4335,6 +4366,7 @@ TclCompilePowOpCmd( Tcl_Token *tokenPtr = parsePtr->tokenPtr; DefineLineInformation; /* TIP #280 */ int words; + (void)cmdPtr; for (words=1 ; words<parsePtr->numWords ; words++) { tokenPtr = TokenAfter(tokenPtr); @@ -4358,6 +4390,7 @@ TclCompileLshiftOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_LSHIFT, envPtr); } @@ -4369,6 +4402,7 @@ TclCompileRshiftOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_RSHIFT, envPtr); } @@ -4380,6 +4414,7 @@ TclCompileModOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_MOD, envPtr); } @@ -4391,6 +4426,7 @@ TclCompileNeqOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_NEQ, envPtr); } @@ -4402,6 +4438,7 @@ TclCompileStrneqOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_STR_NEQ, envPtr); } @@ -4413,6 +4450,7 @@ TclCompileInOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_LIST_IN, envPtr); } @@ -4424,6 +4462,7 @@ TclCompileNiOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_LIST_NOT_IN, envPtr); } @@ -4436,6 +4475,7 @@ TclCompileLessOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileComparisonOpCmd(interp, parsePtr, INST_LT, envPtr); } @@ -4447,6 +4487,7 @@ TclCompileLeqOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileComparisonOpCmd(interp, parsePtr, INST_LE, envPtr); } @@ -4458,6 +4499,7 @@ TclCompileGreaterOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileComparisonOpCmd(interp, parsePtr, INST_GT, envPtr); } @@ -4469,6 +4511,7 @@ TclCompileGeqOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileComparisonOpCmd(interp, parsePtr, INST_GE, envPtr); } @@ -4480,6 +4523,7 @@ TclCompileEqOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileComparisonOpCmd(interp, parsePtr, INST_EQ, envPtr); } @@ -4491,6 +4535,7 @@ TclCompileStreqOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileComparisonOpCmd(interp, parsePtr, INST_STR_EQ, envPtr); } @@ -4502,6 +4547,7 @@ TclCompileStrLtOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileComparisonOpCmd(interp, parsePtr, INST_STR_LT, envPtr); } @@ -4513,6 +4559,7 @@ TclCompileStrLeOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileComparisonOpCmd(interp, parsePtr, INST_STR_LE, envPtr); } @@ -4524,6 +4571,7 @@ TclCompileStrGtOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileComparisonOpCmd(interp, parsePtr, INST_STR_GT, envPtr); } @@ -4535,6 +4583,7 @@ TclCompileStrGeOpCmd( * compiled. */ CompileEnv *envPtr) { + (void)cmdPtr; return CompileComparisonOpCmd(interp, parsePtr, INST_STR_GE, envPtr); } @@ -4549,6 +4598,7 @@ TclCompileMinusOpCmd( Tcl_Token *tokenPtr = parsePtr->tokenPtr; DefineLineInformation; /* TIP #280 */ int words; + (void)cmdPtr; /* TODO: Consider support for compiling expanded args. */ if (parsePtr->numWords == 1) { @@ -4595,6 +4645,7 @@ TclCompileDivOpCmd( Tcl_Token *tokenPtr = parsePtr->tokenPtr; DefineLineInformation; /* TIP #280 */ int words; + (void)cmdPtr; /* TODO: Consider support for compiling expanded args. */ if (parsePtr->numWords == 1) { diff --git a/generic/tclCompile.c b/generic/tclCompile.c index a7543c5..5899c9b 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -712,7 +712,7 @@ static void StartExpanding(CompileEnv *envPtr); * commands. */ static void EnterCmdWordData(ExtCmdLoc *eclPtr, int srcOffset, - Tcl_Token *tokenPtr, const char *cmd, int len, + Tcl_Token *tokenPtr, const char *cmd, int numWords, int line, int *clNext, int **lines, CompileEnv *envPtr); static void ReleaseCmdWordData(ExtCmdLoc *eclPtr); @@ -965,6 +965,8 @@ DupByteCodeInternalRep( Tcl_Obj *srcPtr, /* Object with internal rep to copy. */ Tcl_Obj *copyPtr) /* Object with internal rep to set. */ { + (void)srcPtr; + (void)copyPtr; return; } @@ -1174,11 +1176,12 @@ CleanupByteCode( static int IsCompactibleCompileEnv( - Tcl_Interp *interp, + Tcl_Interp *dummy, CompileEnv *envPtr) { unsigned char *pc; int size; + (void)dummy; /* * Special: procedures in the '::tcl' namespace (or its children) are @@ -2065,7 +2068,7 @@ CompileCommandTokens( EnterCmdWordData(eclPtr, parsePtr->commandStart - envPtr->source, parsePtr->tokenPtr, parsePtr->commandStart, - parsePtr->commandSize, parsePtr->numWords, cmdLine, + parsePtr->numWords, cmdLine, clNext, &wlines, envPtr); wlineat = eclPtr->nuloc - 1; @@ -2709,6 +2712,7 @@ TclCompileNoOp( { Tcl_Token *tokenPtr; int i; + (void)cmdPtr; tokenPtr = parsePtr->tokenPtr; for (i = 1; i < parsePtr->numWords; i++) { @@ -3274,7 +3278,6 @@ EnterCmdWordData( int srcOffset, /* Offset of first char of the command. */ Tcl_Token *tokenPtr, const char *cmd, - int len, int numWords, int line, int *clNext, diff --git a/generic/tclConfig.c b/generic/tclConfig.c index fe95eba..e7e521a 100644 --- a/generic/tclConfig.c +++ b/generic/tclConfig.c @@ -392,9 +392,10 @@ GetConfigDict( static void ConfigDictDeleteProc( ClientData clientData, /* Pointer to Tcl_Obj. */ - Tcl_Interp *interp) /* Interpreter being deleted. */ + Tcl_Interp *dummy) /* Interpreter being deleted. */ { Tcl_Obj *pDB = (Tcl_Obj *)clientData; + (void)dummy; Tcl_DecrRefCount(pDB); } diff --git a/generic/tclDate.c b/generic/tclDate.c index 2c1b20d..d31badd 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2744,7 +2744,7 @@ TclDatelex( int TclClockOldscanObjCmd( - void *clientData, /* Unused */ + void *dummy, /* Unused */ Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Count of paraneters */ Tcl_Obj *const *objv) /* Parameters */ @@ -2754,6 +2754,7 @@ TclClockOldscanObjCmd( DateInfo dateInfo; DateInfo* info = &dateInfo; int status; + (void)dummy; if (objc != 5) { Tcl_WrongNumArgs(interp, 1, objv, diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 4b81565..ec94445 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -245,6 +245,7 @@ AllocChainEntry( { Tcl_Obj *objPtr = (Tcl_Obj *)keyPtr; ChainEntry *cPtr; + (void)tablePtr; cPtr = (ChainEntry *)ckalloc(sizeof(ChainEntry)); cPtr->entry.key.objPtr = objPtr; @@ -1480,6 +1481,8 @@ Tcl_DbNewDictObj( DictSetIntRep(dictPtr, dict); return dictPtr; #else /* !TCL_MEM_DEBUG */ + (void)file; + (void)line; return Tcl_NewDictObj(); #endif } @@ -1506,13 +1509,14 @@ Tcl_DbNewDictObj( static int DictCreateCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Tcl_Obj *dictObj; int i; + (void)dummy; /* * Must have an even number of arguments; note that number of preceding @@ -1556,13 +1560,14 @@ DictCreateCmd( static int DictGetCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Tcl_Obj *dictPtr, *valuePtr = NULL; int result; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?key ...?"); @@ -1649,7 +1654,7 @@ DictGetCmd( static int DictGetDefCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -1657,6 +1662,7 @@ DictGetDefCmd( Tcl_Obj *dictPtr, *keyPtr, *valuePtr, *defaultPtr; Tcl_Obj *const *keyPath; int numKeys; + (void)dummy; if (objc < 4) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?key ...? key default"); @@ -1714,13 +1720,14 @@ DictGetDefCmd( static int DictReplaceCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Tcl_Obj *dictPtr; int i; + (void)dummy; if ((objc < 2) || (objc & 1)) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?key value ...?"); @@ -1762,13 +1769,14 @@ DictReplaceCmd( static int DictRemoveCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Tcl_Obj *dictPtr; int i; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?key ...?"); @@ -1810,7 +1818,7 @@ DictRemoveCmd( static int DictMergeCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -1819,6 +1827,7 @@ DictMergeCmd( int allocatedDict = 0; int i, done; Tcl_DictSearch search; + (void)dummy; if (objc == 1) { /* @@ -1897,13 +1906,14 @@ DictMergeCmd( static int DictKeysCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Tcl_Obj *listPtr; const char *pattern = NULL; + (void)dummy; if (objc!=2 && objc!=3) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?pattern?"); @@ -1976,7 +1986,7 @@ DictKeysCmd( static int DictValuesCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -1985,6 +1995,7 @@ DictValuesCmd( Tcl_DictSearch search; int done; const char *pattern; + (void)dummy; if (objc!=2 && objc!=3) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?pattern?"); @@ -2036,12 +2047,13 @@ DictValuesCmd( static int DictSizeCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { int result, size; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary"); @@ -2074,12 +2086,13 @@ DictSizeCmd( static int DictExistsCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Tcl_Obj *dictPtr, *valuePtr; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary key ?key ...?"); @@ -2116,13 +2129,14 @@ DictExistsCmd( static int DictInfoCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Dict *dict; char *statsStr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary"); @@ -2160,13 +2174,14 @@ DictInfoCmd( static int DictIncrCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { int code = TCL_OK; Tcl_Obj *dictPtr, *valuePtr = NULL; + (void)dummy; if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "dictVarName key ?increment?"); @@ -2280,13 +2295,14 @@ DictIncrCmd( static int DictLappendCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Tcl_Obj *dictPtr, *valuePtr, *resultPtr; int i, allocatedDict = 0, allocatedValue = 0; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "dictVarName key ?value ...?"); @@ -2367,13 +2383,14 @@ DictLappendCmd( static int DictAppendCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Tcl_Obj *dictPtr, *valuePtr, *resultPtr; int allocatedDict = 0; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "dictVarName key ?value ...?"); @@ -2469,7 +2486,7 @@ DictAppendCmd( static int DictForNRCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -2479,6 +2496,7 @@ DictForNRCmd( Tcl_Obj **varv, *keyObj, *valueObj; Tcl_DictSearch *searchPtr; int varc, done; + (void)dummy; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, @@ -2664,7 +2682,7 @@ DictForLoopCallback( static int DictMapNRCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -2673,6 +2691,7 @@ DictMapNRCmd( Tcl_Obj **varv, *keyObj, *valueObj; DictMapStorage *storagePtr; int varc, done; + (void)dummy; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, @@ -2876,13 +2895,14 @@ DictMapLoopCallback( static int DictSetCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Tcl_Obj *dictPtr, *resultPtr; int result, allocatedDict = 0; + (void)dummy; if (objc < 4) { Tcl_WrongNumArgs(interp, 1, objv, "dictVarName key ?key ...? value"); @@ -2936,13 +2956,14 @@ DictSetCmd( static int DictUnsetCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Tcl_Obj *dictPtr, *resultPtr; int result, allocatedDict = 0; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "dictVarName key ?key ...?"); @@ -2995,7 +3016,7 @@ DictUnsetCmd( static int DictFilterCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -3012,6 +3033,7 @@ DictFilterCmd( Tcl_DictSearch search; int index, varc, done, result, satisfied; const char *pattern; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary filterType ?arg ...?"); @@ -3211,6 +3233,7 @@ DictFilterCmd( Tcl_ResetResult(interp); Tcl_DictObjDone(&search); + /* FALLTHRU */ case TCL_CONTINUE: result = TCL_OK; break; @@ -3287,6 +3310,7 @@ DictUpdateCmd( Interp *iPtr = (Interp *) interp; Tcl_Obj *dictPtr, *objPtr; int i, dummy; + (void)clientData; if (objc < 5 || !(objc & 1)) { Tcl_WrongNumArgs(interp, 1, objv, @@ -3437,13 +3461,14 @@ FinalizeDictUpdate( static int DictWithCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Interp *iPtr = (Interp *) interp; Tcl_Obj *dictPtr, *keysPtr, *pathPtr; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "dictVarName ?key ...? script"); diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c index 657bc2f..548534f 100644 --- a/generic/tclDisassemble.c +++ b/generic/tclDisassemble.c @@ -23,8 +23,7 @@ static Tcl_Obj * DisassembleByteCodeAsDicts(Tcl_Interp *interp, Tcl_Obj *objPtr); -static Tcl_Obj * DisassembleByteCodeObj(Tcl_Interp *interp, - Tcl_Obj *objPtr); +static Tcl_Obj * DisassembleByteCodeObj(Tcl_Obj *objPtr); static int FormatInstruction(ByteCode *codePtr, const unsigned char *pc, Tcl_Obj *bufferObj); static void GetLocationInformation(Proc *procPtr, @@ -135,7 +134,7 @@ TclPrintByteCodeObj( Tcl_Interp *interp, /* Used only for getting location info. */ Tcl_Obj *objPtr) /* The bytecode object to disassemble. */ { - Tcl_Obj *bufPtr = DisassembleByteCodeObj(interp, objPtr); + Tcl_Obj *bufPtr = DisassembleByteCodeObj(objPtr); fprintf(stdout, "\n%s", TclGetString(bufPtr)); Tcl_DecrRefCount(bufPtr); @@ -251,7 +250,6 @@ TclPrintSource( static Tcl_Obj * DisassembleByteCodeObj( - Tcl_Interp *interp, Tcl_Obj *objPtr) /* The bytecode object to disassemble. */ { ByteCode *codePtr; @@ -952,8 +950,7 @@ PrintSourceToObj( static Tcl_Obj * DisassembleByteCodeAsDicts( - Tcl_Interp *interp, /* Used for looking up the CmdFrame for the - * procedure, if one exists. */ + Tcl_Interp *dummy, /* Not used. */ Tcl_Obj *objPtr) /* The bytecode-holding value to take apart */ { ByteCode *codePtr; @@ -962,6 +959,7 @@ DisassembleByteCodeAsDicts( unsigned char *pc, *opnd, *codeOffPtr, *codeLenPtr, *srcOffPtr, *srcLenPtr; int codeOffset, codeLength, sourceOffset, sourceLength; int i, val, line; + (void)dummy; ByteCodeGetIntRep(objPtr, &tclByteCodeType, codePtr); @@ -1627,7 +1625,7 @@ Tcl_DisassembleObjCmd( DisassembleByteCodeAsDicts(interp, codeObjPtr)); } else { Tcl_SetObjResult(interp, - DisassembleByteCodeObj(interp, codeObjPtr)); + DisassembleByteCodeObj(codeObjPtr)); } return TCL_OK; } diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 5db2c78..6b7d8b2 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -1232,7 +1232,7 @@ Tcl_ExternalToUtfDString( int Tcl_ExternalToUtf( - Tcl_Interp *interp, /* Interp for error return, if not NULL. */ + Tcl_Interp *dummy, /* Interp for error return, if not NULL. */ Tcl_Encoding encoding, /* The encoding for the source string, or NULL * for the default system encoding. */ const char *src, /* Source string in specified encoding. */ @@ -1266,6 +1266,7 @@ Tcl_ExternalToUtf( int charLimited = (flags & TCL_ENCODING_CHAR_LIMIT) && dstCharsPtr; int maxChars = INT_MAX; Tcl_EncodingState state; + (void)dummy; if (encoding == NULL) { encoding = systemEncoding; @@ -1424,7 +1425,7 @@ Tcl_UtfToExternalDString( int Tcl_UtfToExternal( - Tcl_Interp *interp, /* Interp for error return, if not NULL. */ + Tcl_Interp *dummy, /* Interp for error return, if not NULL. */ Tcl_Encoding encoding, /* The encoding for the converted string, or * NULL for the default system encoding. */ const char *src, /* Source string in UTF-8. */ @@ -1455,6 +1456,7 @@ Tcl_UtfToExternal( const Encoding *encodingPtr; int result, srcRead, dstWrote, dstChars; Tcl_EncodingState state; + (void)dummy; if (encoding == NULL) { encoding = systemEncoding; @@ -2185,6 +2187,8 @@ BinaryProc( * output buffer. */ { int result; + (void)clientData; + (void)statePtr; result = TCL_OK; dstLen -= TCL_UTF_MAX - 1; @@ -2356,6 +2360,7 @@ UtfToUtfProc( const char *dstStart, *dstEnd; int result, numChars, charLimit = INT_MAX; Tcl_UniChar *chPtr = (Tcl_UniChar *) statePtr; + (void)clientData; if (flags & TCL_ENCODING_START) { *statePtr = 0; @@ -2480,6 +2485,7 @@ Utf16ToUtfProc( const char *dstEnd, *dstStart; int result, numChars, charLimit = INT_MAX; unsigned short ch; + (void)statePtr; if (flags & TCL_ENCODING_CHAR_LIMIT) { charLimit = *dstCharsPtr; @@ -2695,6 +2701,7 @@ UtfToUcs2Proc( int len; #endif Tcl_UniChar ch = 0; + (void)statePtr; srcStart = src; srcEnd = src + srcLen; @@ -2805,6 +2812,7 @@ TableToUtfProc( const unsigned short *const *toUnicode; const unsigned short *pageZero; TableEncodingData *dataPtr = (TableEncodingData *)clientData; + (void)statePtr; if (flags & TCL_ENCODING_CHAR_LIMIT) { charLimit = *dstCharsPtr; @@ -2917,6 +2925,7 @@ TableFromUtfProc( int result, len, word, numChars; TableEncodingData *dataPtr = (TableEncodingData *)clientData; const unsigned short *const *fromUnicode; + (void)statePtr; result = TCL_OK; @@ -3039,6 +3048,8 @@ Iso88591ToUtfProc( const char *srcStart, *srcEnd; const char *dstEnd, *dstStart; int result, numChars, charLimit = INT_MAX; + (void)clientData; + (void)statePtr; if (flags & TCL_ENCODING_CHAR_LIMIT) { charLimit = *dstCharsPtr; @@ -3122,9 +3133,10 @@ Iso88591FromUtfProc( { const char *srcStart, *srcEnd, *srcClose; const char *dstStart, *dstEnd; - int result, numChars; - - result = TCL_OK; + int result = TCL_OK, numChars; + Tcl_UniChar ch = 0; + (void)clientData; + (void)statePtr; srcStart = src; srcEnd = src + srcLen; @@ -3137,7 +3149,6 @@ Iso88591FromUtfProc( dstEnd = dst + dstLen - 1; for (numChars = 0; src < srcEnd; numChars++) { - Tcl_UniChar ch = 0; int len; if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) { diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 227af0d..654f33e 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -151,7 +151,7 @@ NewNsObj( int TclNamespaceEnsembleCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -164,6 +164,7 @@ TclNamespaceEnsembleCmd( Tcl_Obj *listObj; const char *simpleName; int index, done; + (void)dummy; if (nsPtr == NULL || nsPtr->flags & NS_DYING) { if (!Tcl_InterpDeleted(interp)) { @@ -1987,10 +1988,11 @@ NsEnsembleImplementationCmdNR( int TclClearRootEnsemble( - ClientData data[], + ClientData dummy[], Tcl_Interp *interp, int result) { + (void)dummy; TclResetRewriteEnsemble(interp, 1); return result; } @@ -2094,11 +2096,12 @@ TclResetRewriteEnsemble( static int FreeER( ClientData data[], - Tcl_Interp *interp, + Tcl_Interp *dummy, int result) { Tcl_Obj **tmp = (Tcl_Obj **) data[0]; Tcl_Obj **store = (Tcl_Obj **) data[1]; + (void)dummy; ckfree(store); ckfree(tmp); diff --git a/generic/tclEnv.c b/generic/tclEnv.c index da4bfe3..3ed889f 100644 --- a/generic/tclEnv.c +++ b/generic/tclEnv.c @@ -579,7 +579,7 @@ TclGetEnv( /* ARGSUSED */ static char * EnvTraceProc( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Interpreter whose "env" variable is being * modified. */ const char *name1, /* Better be "env". */ @@ -587,6 +587,7 @@ EnvTraceProc( * whole array is being deleted (UTF-8). */ int flags) /* Indicates what's happening. */ { + (void)dummy; /* * For array traces, let TclSetupEnv do all the work. */ diff --git a/generic/tclExecute.c b/generic/tclExecute.c index cf133c4..828d7d2 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -2069,7 +2069,7 @@ TEBCresume( int cleanup = PTR2INT(data[2]); Tcl_Obj *objResultPtr; - int checkInterp; /* Indicates when a check of interp readyness + int checkInterp = 0; /* Indicates when a check of interp readyness * is necessary. Set by CACHE_STACK_INFO() */ /* @@ -2104,7 +2104,6 @@ TEBCresume( if (!pc) { /* bytecode is starting from scratch */ - checkInterp = 0; pc = codePtr->codeStart; goto cleanup0; } else { @@ -2126,8 +2125,9 @@ TEBCresume( goto abnormalReturn; } if (codePtr->flags & TCL_BYTECODE_RECOMPILE) { - iPtr->flags |= ERR_ALREADY_LOGGED; codePtr->flags &= ~TCL_BYTECODE_RECOMPILE; + checkInterp = 1; + iPtr->flags |= ERR_ALREADY_LOGGED; } if (result != TCL_OK) { @@ -2187,10 +2187,12 @@ TEBCresume( objPtr = POP_OBJECT(); TclDecrRefCount(objPtr); } + /* FALLTHRU */ case 2: cleanup2_pushObjResultPtr: objPtr = POP_OBJECT(); TclDecrRefCount(objPtr); + /* FALLTHRU */ case 1: cleanup1_pushObjResultPtr: objPtr = OBJ_AT_TOS; @@ -2207,14 +2209,17 @@ TEBCresume( objPtr = POP_OBJECT(); TclDecrRefCount(objPtr); } + /* FALLTHRU */ case 2: cleanup2: objPtr = POP_OBJECT(); TclDecrRefCount(objPtr); + /* FALLTHRU */ case 1: cleanup1: objPtr = POP_OBJECT(); TclDecrRefCount(objPtr); + /* FALLTHRU */ case 0: /* * We really want to do nothing now, but this is needed for some @@ -2302,12 +2307,12 @@ TEBCresume( iPtr->cmdCount += TclGetUInt4AtPtr(pc+5); if (checkInterp) { - checkInterp = 0; if (((codePtr->compileEpoch != iPtr->compileEpoch) || (codePtr->nsEpoch != iPtr->varFramePtr->nsPtr->resolverEpoch)) && !(codePtr->flags & TCL_BYTECODE_PRECOMPILED)) { goto instStartCmdFailed; } + checkInterp = 0; } inst = *(pc += 9); goto peepholeStart; @@ -2741,15 +2746,18 @@ TEBCresume( * INVOCATION BLOCK */ - instEvalStk: case INST_EVAL_STK: + instEvalStk: bcFramePtr->data.tebc.pc = (char *) pc; iPtr->cmdFramePtr = bcFramePtr; cleanup = 1; pc += 1; + /* yield next instruction */ TEBC_YIELD(); - return TclNREvalObjEx(interp, OBJ_AT_TOS, 0, NULL, 0); + /* add TEBCResume for object at top of stack */ + return TclNRExecuteByteCode(interp, + TclCompileObj(interp, OBJ_AT_TOS, NULL, 0)); case INST_INVOKE_EXPANDED: CLANG_ASSERT(auxObjList); @@ -7766,19 +7774,22 @@ TEBCresume( { const char *bytes; - checkInterp = 1; length = 0; + if (TclInterpReady(interp) == TCL_ERROR) { + goto gotError; + } + /* * We used to switch to direct eval; for NRE-awareness we now * compile and eval the command so that this evaluation does not - * add a new TEBC instance. [Bug 2910748] + * add a new TEBC instance. Bug [2910748], bug [fa6bf38d07] + * + * TODO: recompile, search this command and eval a code starting from, + * so that this evaluation does not add a new TEBC instance without + * NRE-trampoline. */ - if (TclInterpReady(interp) == TCL_ERROR) { - goto gotError; - } - codePtr->flags |= TCL_BYTECODE_RECOMPILE; bytes = GetSrcInfoForPc(pc, codePtr, &length, NULL, NULL); opnd = TclGetUInt4AtPtr(pc+1); diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index e6602f3..faa8b69 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -960,7 +960,7 @@ TclDatelex( int TclClockOldscanObjCmd( - void *clientData, /* Unused */ + void *dummy, /* Unused */ Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Count of paraneters */ Tcl_Obj *const *objv) /* Parameters */ @@ -970,6 +970,7 @@ TclClockOldscanObjCmd( DateInfo dateInfo; DateInfo* info = &dateInfo; int status; + (void)dummy; if (objc != 5) { Tcl_WrongNumArgs(interp, 1, objv, diff --git a/generic/tclPipe.c b/generic/tclPipe.c index a4a4c06..8d5c0c7 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -413,7 +413,7 @@ TclCreatePipeline( * at *inPipePtr. NULL means command specified * its own input source. */ TclFile *outPipePtr, /* If non-NULL, output to the pipeline goes to - * a pipe, unless overriden by redirection in + * a pipe, unless overridden by redirection in * the command. The file id with which to read * frome this pipe is stored at *outPipePtr. * NULL means command specified its own output diff --git a/generic/tclProc.c b/generic/tclProc.c index f0974bf..5dc3f50 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -1847,9 +1847,7 @@ InterpProcNR2( Tcl_SetErrorCode(interp, "TCL", "RESULT", "UNEXPECTED", NULL); result = TCL_ERROR; - /* - * Fall through to the TCL_ERROR handling code. - */ + /* FALLTHRU */ case TCL_ERROR: /* diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index 533a73d..ebb0857 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -725,12 +725,12 @@ TclRegError( const char *p; Tcl_ResetResult(interp); - n = TclReError(status, NULL, buf, sizeof(buf)); + n = TclReError(status, buf, sizeof(buf)); p = (n > sizeof(buf)) ? "..." : ""; Tcl_SetObjResult(interp, Tcl_ObjPrintf("%s%s%s", msg, buf, p)); sprintf(cbuf, "%d", status); - (void) TclReError(REG_ITOA, NULL, cbuf, sizeof(cbuf)); + (void) TclReError(REG_ITOA, cbuf, sizeof(cbuf)); Tcl_SetErrorCode(interp, "REGEXP", cbuf, buf, NULL); } diff --git a/generic/tclScan.c b/generic/tclScan.c index a975067..b6d4132 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -365,8 +365,10 @@ ValidateFormat( format += TclUtfToUniChar(format, &ch); break; } + /* FALLTHRU */ case 'L': flags |= SCAN_LONGER; + /* FALLTHRU */ case 'h': format += TclUtfToUniChar(format, &ch); } @@ -388,9 +390,7 @@ ValidateFormat( Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADWIDTH", NULL); goto error; } - /* - * Fall through! - */ + /* FALLTHRU */ case 'n': case 's': if (flags & (SCAN_LONGER|SCAN_BIG)) { @@ -705,11 +705,10 @@ Tcl_ScanObjCmd( format += TclUtfToUniChar(format, &ch); break; } + /* FALLTHRU */ case 'L': flags |= SCAN_LONGER; - /* - * Fall through so we skip to the next character. - */ + /* FALLTHRU */ case 'h': format += TclUtfToUniChar(format, &ch); } diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 16a7a71..c4f4f87 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -2059,6 +2059,7 @@ Tcl_AppendFormatToObj( } case 'u': + /* FALLTHRU */ case 'd': case 'o': case 'p': @@ -2718,6 +2719,7 @@ AppendPrintfToObjVA( break; case 'h': size = -1; + /* FALLTHRU */ default: p++; } diff --git a/generic/tclTest.c b/generic/tclTest.c index 582b8c3..f87698c 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -219,6 +219,9 @@ static void SpecialFree(char *blockPtr); static int StaticInitProc(Tcl_Interp *interp); static int TestasyncCmd(void *dummy, Tcl_Interp *interp, int argc, const char **argv); +static int TestbumpinterpepochObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); static int TestbytestringObjCmd(void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); @@ -595,6 +598,8 @@ Tcltest_Init( Tcl_CreateObjCommand(interp, "testgetindexfromobjstruct", TestGetIndexFromObjStructObjCmd, NULL, NULL); Tcl_CreateCommand(interp, "testasync", TestasyncCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "testbumpinterpepoch", + TestbumpinterpepochObjCmd, NULL, NULL); Tcl_CreateCommand(interp, "testchannel", TestChannelCmd, NULL, NULL); Tcl_CreateCommand(interp, "testchannelevent", TestChannelEventCmd, @@ -1035,6 +1040,22 @@ AsyncThreadProc( } #endif +static int +TestbumpinterpepochObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Interp *iPtr = (Interp *)interp; + if (objc != 1) { + Tcl_WrongNumArgs(interp, 1, objv, ""); + return TCL_ERROR; + } + iPtr->compileEpoch++; + return TCL_OK; +} + /* *---------------------------------------------------------------------- * diff --git a/generic/tclVar.c b/generic/tclVar.c index 3241ba8..6526e25 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -3173,7 +3173,7 @@ ArrayForObjCmd( static int ArrayForNRCmd( - ClientData dummy, + ClientData dummy, /* Not used. */ Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 593244d..160abf9 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -399,9 +399,7 @@ static int ZipChannelWrite(void *instanceData, * Define the ZIP filesystem dispatch table. */ -MODULE_SCOPE const Tcl_Filesystem zipfsFilesystem; - -const Tcl_Filesystem zipfsFilesystem = { +static const Tcl_Filesystem zipfsFilesystem = { "zipfs", sizeof(Tcl_Filesystem), TCL_FILESYSTEM_VERSION_2, @@ -4729,7 +4727,7 @@ ZipFSLoadFile( *------------------------------------------------------------------------- */ -MODULE_SCOPE int +int TclZipfs_Init( Tcl_Interp *interp) /* Current interpreter. */ { diff --git a/library/http/effective_tld_names.txt.gz b/library/http/effective_tld_names.txt.gz Binary files differindex 9ce2b69..13e08bb 100644 --- a/library/http/effective_tld_names.txt.gz +++ b/library/http/effective_tld_names.txt.gz diff --git a/library/tcltest/pkgIndex.tcl b/library/tcltest/pkgIndex.tcl index fde3ffe..ca93725 100644 --- a/library/tcltest/pkgIndex.tcl +++ b/library/tcltest/pkgIndex.tcl @@ -9,4 +9,4 @@ # full path name of this file's directory. if {![package vsatisfies [package provide Tcl] 8.5-]} {return} -package ifneeded tcltest 2.5.0 [list source [file join $dir tcltest.tcl]] +package ifneeded tcltest 2.5.1 [list source [file join $dir tcltest.tcl]] diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index d67a900..a7a68c7 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -22,7 +22,7 @@ namespace eval tcltest { # When the version number changes, be sure to update the pkgIndex.tcl file, # and the install directory in the Makefiles. When the minor version # changes (new feature) be sure to update the man page as well. - variable Version 2.5.0 + variable Version 2.5.1 # Compatibility support for dumb variables defined in tcltest 1 # Do not use these. Call [package provide Tcl] and [info patchlevel] @@ -3072,7 +3072,12 @@ proc tcltest::removeFile {name {directory ""}} { Warn "removeFile removing \"$fullName\":\n not a file" } } - return [file delete -- $fullName] + if {[catch {file delete -- $fullName} msg ]} { + DebugDo 1 { + Warn "removeFile removing \"$fullName\":\n failed: $msg" + } + } + return } # tcltest::makeDirectory -- diff --git a/tests/all.tcl b/tests/all.tcl index 89a4f1a..287de1f 100644 --- a/tests/all.tcl +++ b/tests/all.tcl @@ -12,7 +12,7 @@ package prefer latest package require Tcl 8.5- -package require tcltest 2.2 +package require tcltest 2.5 namespace import ::tcltest::* configure {*}$argv -testdir [file dirname [file dirname [file normalize [ diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index 9df6d20..721890c 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -26,7 +26,7 @@ namespace eval ::tcl::test::cmdMZ { namespace import ::tcltest::test testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}] - + proc ListGlobMatch {expected actual} { if {[llength $expected] != [llength $actual]} { return 0 diff --git a/tests/execute.test b/tests/execute.test index 808574b..d786534 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -37,6 +37,11 @@ testConstraint testobj [expr { testConstraint longIs32bit [expr {$tcl_platform(wordSize) == 4}] testConstraint testexprlongobj [llength [info commands testexprlongobj]] + +if {[namespace which -command testbumpinterpepoch] eq ""} { + proc testbumpinterpepoch {} { rename ::set ::dummy; rename ::dummy ::set } +} + # Tests for the omnibus TclExecuteByteCode function: # INST_DONE not tested @@ -933,8 +938,7 @@ test execute-8.3 {Stack restoration} -setup { proc f {args} "f $arglst" proc run {} { # bump the interp's epoch - rename ::set ::dummy - rename ::dummy ::set + testbumpinterpepoch catch f msg set msg } @@ -948,8 +952,7 @@ test execute-8.4 {Compile epoch bump effect on stack trace} -setup { } proc FOO {} { catch {error bar} m o - rename ::set ::dummy - rename ::dummy ::set + testbumpinterpepoch return -options $o $m } } -body { @@ -978,6 +981,76 @@ test execute-8.5 {Bug 2038069} -setup { invoked from within "catch \[list error FOO\] m o"} -errorline 2} +test execute-8.6 {Compile epoch bump in global level (bug [fa6bf38d07])} -setup { + interp create slave + slave eval { + package require tcltest + catch [list package require -exact Tcltest [info patchlevel]] + ::tcltest::loadTestedCommands + if {[namespace which -command testbumpinterpepoch] eq ""} { + proc testbumpinterpepoch {} { rename ::set ::dummy; rename ::dummy ::set } + } + } +} -body { + slave eval { + lappend res A; testbumpinterpepoch; lappend res B; return; lappend res C; + } + slave eval { + set i 0; while {[incr i] < 3} { + lappend res A; testbumpinterpepoch; lappend res B; return; lappend res C; + } + } + slave eval { + set i 0; while {[incr i] < 3} { + lappend res A; testbumpinterpepoch; lappend res B; break; lappend res C; + } + } + slave eval { + catch { + lappend res A; testbumpinterpepoch; lappend res B; error test; lappend res C; + } + } + slave eval {set res} +} -cleanup { + interp delete slave +} -result [lrepeat 4 A B] +test execute-8.7 {Compile epoch bump in global level (bug [fa6bf38d07]), exception case} -setup { + interp create slave + slave eval { + package require tcltest + catch [list package require -exact Tcltest [info patchlevel]] + ::tcltest::loadTestedCommands + if {[namespace which -command testbumpinterpepoch] eq ""} { + proc testbumpinterpepoch {} { rename ::set ::dummy; rename ::dummy ::set } + } + } +} -body { + set res {} + lappend res [catch { + slave eval { + lappend res A; testbumpinterpepoch; lappend res B; return -code error test; lappend res C; + } + } e] $e + lappend res [catch { + slave eval { + lappend res A; testbumpinterpepoch; lappend res B; error test; lappend res C; + } + } e] $e + lappend res [catch { + slave eval { + lappend res A; testbumpinterpepoch; lappend res B; return -code return test; lappend res C; + } + } e] $e + lappend res [catch { + slave eval { + lappend res A; testbumpinterpepoch; lappend res B; break; lappend res C; + } + } e] $e + list $res [slave eval {set res}] +} -cleanup { + interp delete slave +} -result [list {1 test 1 test 2 test 3 {}} [lrepeat 4 A B]] + test execute-9.1 {Interp result resetting [Bug 1522803]} { set c 0 catch { diff --git a/tests/io.test b/tests/io.test index 6d9e1c3..d4f010a 100644 --- a/tests/io.test +++ b/tests/io.test @@ -8084,7 +8084,7 @@ test io-53.17 {[7c187a3773] MBWrite: proper inQueueTail handling} -setup { removeFile out } -result {line 100 line} -test io-54.1 {Recursive channel events} {socket fileevent} { +test io-54.1 {Recursive channel events} {socket fileevent knownMsvcBug} { # This test checks to see if file events are delivered during recursive # event loops when there is buffered data on the channel. diff --git a/tests/winTime.test b/tests/winTime.test index add8f98..dbaa14c 100644 --- a/tests/winTime.test +++ b/tests/winTime.test @@ -19,6 +19,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { catch [list package require -exact Tcltest [info patchlevel]] testConstraint testwinclock [llength [info commands testwinclock]] +testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}] # The next two tests will crash on Windows if the check for negative # clock values is not done properly. @@ -40,7 +41,7 @@ test winTime-1.2 {TclpGetDate} {win} { # with the Windows clock. 30 sec really isn't enough, # but how much time does a tester have patience for? -test winTime-2.1 {Synchronization of Tcl and Windows clocks} {testwinclock} { +test winTime-2.1 {Synchronization of Tcl and Windows clocks} {testwinclock knownMsvcBug} { # May fail due to OS/hardware discrepancies. See: # http://support.microsoft.com/default.aspx?scid=kb;en-us;274323 set failed {} @@ -50,7 +51,7 @@ test winTime-2.1 {Synchronization of Tcl and Windows clocks} {testwinclock} { foreach { sys_sec sys_usec tcl_sec tcl_usec } [testwinclock] break set diff [expr { $tcl_sec - $sys_sec + 1.0e-6 * ( $tcl_usec - $sys_usec ) }] - if { abs($diff) > 0.06 } { + if { abs($diff) > 0.1 } { set failed "Tcl clock differs from system clock by $diff sec" break } else { diff --git a/unix/configure.ac b/unix/configure.ac index ea4526c..74ee955 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -677,7 +677,7 @@ AC_MSG_RESULT([$tcl_ok]) #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has # to be installed by Tcl. The default is autodetection, but can -# be overriden on the configure command line either way. +# be overridden on the configure command line either way. #------------------------------------------------------------------------ AC_MSG_CHECKING([for timezone data]) diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 2c12bac..f3814fb 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -96,7 +96,7 @@ typedef struct { /* * The following structure is used to set or get the serial port attributes in - * a platform-independant manner. + * a platform-independent manner. */ typedef struct { diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index e723b55..c4ee1d5 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -118,10 +118,10 @@ static int CopyString(const char *src, char *buf, int buflen); #endif #ifdef NEED_PW_CLEANER -static void FreePwBuf(ClientData ignored); +static void FreePwBuf(ClientData dummy); #endif #ifdef NEED_GR_CLEANER -static void FreeGrBuf(ClientData ignored); +static void FreeGrBuf(ClientData dummy); #endif #endif /* TCL_THREADS */ @@ -336,9 +336,10 @@ TclpGetPwUid( #ifdef NEED_PW_CLEANER static void FreePwBuf( - ClientData ignored) + ClientData dummy) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + (void)dummy; ckfree(tsdPtr->pbuf); } @@ -519,9 +520,10 @@ TclpGetGrGid( #ifdef NEED_GR_CLEANER static void FreeGrBuf( - ClientData ignored) + ClientData dummy) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + (void)dummy; ckfree(tsdPtr->gbuf); } diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 54198f8..341a70b 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -339,7 +339,7 @@ long tclMacOSXDarwinRelease = 0; * * TclpInitPlatform -- * - * Initialize all the platform-dependant things like signals and + * Initialize all the platform-dependent things like signals and * floating-point error handling. * * Called at process initialization time. diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index d1330be..fb0b5e1 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -117,7 +117,7 @@ TclpGetMicroseconds(void) * This procedure returns a value that represents the highest resolution * clock available on the system. There are no garantees on what the * resolution will be. In Tcl we will call this value a "click". The - * start time is also system dependant. + * start time is also system dependent. * * Results: * Number of clicks from some start time. @@ -166,7 +166,7 @@ TclpGetClicks(void) * This procedure returns a WideInt value that represents the highest * resolution clock available on the system. There are no garantees on * what the resolution will be. In Tcl we will call this value a "click". - * The start time is also system dependant. + * The start time is also system dependent. * * Results: * Number of WideInt clicks from some start time. @@ -603,8 +603,9 @@ SetTZIfNecessary(void) static void CleanupMemory( - ClientData ignored) + ClientData dummy) { + (void)dummy; ckfree(lastTZ); } #endif /* TCL_NO_DEPRECATED */ diff --git a/win/Makefile.in b/win/Makefile.in index af2b6e3..c9ef05b 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -96,7 +96,7 @@ COMPILE_DEBUG_FLAGS = SRC_DIR = @srcdir@ ROOT_DIR = @srcdir@/.. -TOP_DIR = $(shell cd @srcdir@/..; pwd -P) +TOP_DIR = $(shell cd @srcdir@/..; pwd -W 2>/dev/null || pwd -P) GENERIC_DIR = $(TOP_DIR)/generic TOMMATH_DIR = $(TOP_DIR)/libtommath WIN_DIR = $(TOP_DIR)/win @@ -116,7 +116,7 @@ GENERIC_DIR_NATIVE = $(shell $(CYGPATH) '$(GENERIC_DIR)') TOMMATH_DIR_NATIVE = $(shell $(CYGPATH) '$(TOMMATH_DIR)') WIN_DIR_NATIVE = $(shell $(CYGPATH) '$(WIN_DIR)') ROOT_DIR_NATIVE = $(shell $(CYGPATH) '$(ROOT_DIR)') -ROOT_DIR_WIN_NATIVE = $(shell cd '$(ROOT_DIR)' ; pwd -W || pwd -P) +ROOT_DIR_WIN_NATIVE = $(shell cd '$(ROOT_DIR)' ; pwd -W 2>/dev/null || pwd -P) ZLIB_DIR_NATIVE = $(shell $(CYGPATH) '$(ZLIB_DIR)') #GENERIC_DIR_NATIVE = $(GENERIC_DIR) #TOMMATH_DIR_NATIVE = $(TOMMATH_DIR) @@ -486,7 +486,7 @@ all: binaries libraries doc packages # or from mingw/msys shell: # $ ./tcltest -verbose bps -file fileName.test -tcltest.cmd: +tcltest.cmd: Makefile @echo 'Create tcltest.cmd helpers'; @(\ echo '@echo off'; \ @@ -494,8 +494,8 @@ tcltest.cmd: echo 'set BDP=%~dp0'; \ echo 'set OWD=%CD%'; \ echo 'cd /d %TEMP%'; \ - echo 'rem "%BDP%\$(TCLSH)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" $(TESTFLAGS) -load "$(TEST_LOAD_FACILITIES)" %*'; \ - echo '"%BDP%\$(TEST_EXE_FILE)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" $(TESTFLAGS) -load "$(TEST_LOAD_PRMS)" %*'; \ + echo 'rem "%BDP%\$(TCLSH)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" %TESTFLAGS% -load "$(TEST_LOAD_FACILITIES)" %*'; \ + echo '"%BDP%\$(TEST_EXE_FILE)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" %TESTFLAGS% -load "$(TEST_LOAD_PRMS)" %*'; \ echo 'cd /d %OWD%'; \ ) > tcltest.cmd; @(\ @@ -503,11 +503,13 @@ tcltest.cmd: echo '#LANG=en_US'; \ echo 'BDP=$$(dirname $$(readlink -f %0))'; \ echo 'cd /tmp'; \ - echo '#"$$BDP/$(TCLSH)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" $(TESTFLAGS) -load "$(TEST_LOAD_FACILITIES)" "$$@"'; \ - echo '"$$BDP/$(TEST_EXE_FILE)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" $(TESTFLAGS) -load "$(TEST_LOAD_PRMS)" "$$@"'; \ - ) > tcltest; + echo '#"$$BDP/$(TCLSH)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" $$TESTFLAGS -load "$(TEST_LOAD_FACILITIES)" "$$@"'; \ + echo '"$$BDP/$(TEST_EXE_FILE)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" $$TESTFLAGS -load "$(TEST_LOAD_PRMS)" "$$@"'; \ + ) > tcltest.sh; -tcltest: $(TCLSH) $(TEST_EXE_FILE) $(TEST_DLL_FILE) tcltest.cmd +tcltest.sh: tcltest.cmd + +tcltest: binaries $(TEST_EXE_FILE) $(TEST_DLL_FILE) $(CAT32) tcltest.cmd binaries: $(TCL_STUB_LIB_FILE) @LIBRARIES@ winextensions ${TCL_ZIP_FILE} $(TCLSH) @@ -548,6 +550,7 @@ ${TCL_ZIP_FILE}: ${ZIP_INSTALL_OBJS} ${DDE_DLL_FILE} ${REG_DLL_FILE} $(TCLSH): $(TCLSH_OBJS) @LIBRARIES@ $(TCL_STUB_LIB_FILE) tclsh.$(RES) $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) + $(COPY) tclsh.exe.manifest $(TCLSH).manifest @VC_MANIFEST_EMBED_EXE@ cat32.$(OBJEXT): cat.c @@ -567,6 +570,7 @@ ${TCL_STUB_LIB_FILE}: ${STUB_OBJS} ${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@ ${TCL_ZIP_FILE} @$(RM) ${TCL_DLL_FILE} $(TCL_LIB_FILE) @MAKE_DLL@ ${TCL_OBJS} tcl.$(RES) $(SHLIB_LD_LIBS) + $(COPY) tclsh.exe.manifest ${TCL_DLL_FILE}.manifest @VC_MANIFEST_EMBED_DLL@ @if test "${ZIPFS_BUILD}" = "1" ; then \ cat ${TCL_ZIP_FILE} >> ${TCL_DLL_FILE}; \ @@ -581,18 +585,22 @@ ${TCL_LIB_FILE}: ${TCL_OBJS} ${DDE_OBJS} ${REG_OBJS} ${DDE_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${DDE_OBJS} @MAKE_DLL@ ${DDE_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) + $(COPY) tclsh.exe.manifest ${DDE_DLL_FILE}.manifest ${REG_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${REG_OBJS} @MAKE_DLL@ ${REG_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) + $(COPY) tclsh.exe.manifest ${REG_DLL_FILE}.manifest ${TEST_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${TCLTEST_OBJS} @$(RM) ${TEST_DLL_FILE} ${TEST_LIB_FILE} @MAKE_DLL@ ${TCLTEST_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) + $(COPY) tclsh.exe.manifest ${TEST_DLL_FILE}.manifest ${TEST_EXE_FILE}: ${TCL_STUB_LIB_FILE} ${TCLTEST_OBJS} tclTestMain.${OBJEXT} @$(RM) ${TEST_EXE_FILE} $(CC) $(CFLAGS) $(TCLTEST_OBJS) tclTestMain.$(OBJEXT) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) + $(COPY) tclsh.exe.manifest ${TEST_EXE_FILE}.manifest # use pre-built zlib1.dll ${ZLIB_DLL_FILE}: ${TCL_STUB_LIB_FILE} @@ -647,17 +655,17 @@ tclZipfs.${OBJEXT}: $(GENERIC_DIR)/tclZipfs.c tclPkgConfig.${OBJEXT}: tclPkgConfig.c $(CC) -c $(CC_SWITCHES) \ - -DCFG_INSTALL_LIBDIR=\"$(LIB_INSTALL_DIR_NATIVE)\" \ - -DCFG_INSTALL_BINDIR=\"$(BIN_INSTALL_DIR_NATIVE)\" \ - -DCFG_INSTALL_SCRDIR=\"$(SCRIPT_INSTALL_DIR_NATIVE)\" \ - -DCFG_INSTALL_INCDIR=\"$(INCLUDE_INSTALL_DIR_NATIVE)\" \ - -DCFG_INSTALL_DOCDIR=\"$(MAN_INSTALL_DIR)\" \ + -DCFG_INSTALL_LIBDIR="\"$(LIB_INSTALL_DIR_NATIVE)\"" \ + -DCFG_INSTALL_BINDIR="\"$(BIN_INSTALL_DIR_NATIVE)\"" \ + -DCFG_INSTALL_SCRDIR="\"$(SCRIPT_INSTALL_DIR_NATIVE)\"" \ + -DCFG_INSTALL_INCDIR="\"$(INCLUDE_INSTALL_DIR_NATIVE)\"" \ + -DCFG_INSTALL_DOCDIR="\"$(MAN_INSTALL_DIR)\"" \ \ - -DCFG_RUNTIME_LIBDIR=\"$(libdir_native)\" \ - -DCFG_RUNTIME_BINDIR=\"$(bindir_native)\" \ - -DCFG_RUNTIME_SCRDIR=\"$(TCL_LIBRARY_NATIVE)\" \ - -DCFG_RUNTIME_INCDIR=\"$(includedir_native)\" \ - -DCFG_RUNTIME_DOCDIR=\"$(mandir_native)\" \ + -DCFG_RUNTIME_LIBDIR="\"$(libdir_native)\"" \ + -DCFG_RUNTIME_BINDIR="\"$(bindir_native)\"" \ + -DCFG_RUNTIME_SCRDIR="\"$(TCL_LIBRARY_NATIVE)\"" \ + -DCFG_RUNTIME_INCDIR="\"$(includedir_native)\"" \ + -DCFG_RUNTIME_DOCDIR="\"$(mandir_native)\"" \ -DCFG_RUNTIME_DLLFILE="\"$(TCL_DLL_FILE)\"" \ -DCFG_RUNTIME_ZIPFILE="\"$(TCL_ZIP_FILE)\"" \ -DBUILD_tcl \ @@ -927,13 +935,13 @@ install-private-headers: libraries test: test-tcl test-packages -test-tcl: binaries $(TCLSH) $(CAT32) $(TEST_DLL_FILE) +test-tcl: tcltest TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \ $(WINE) ./$(TCLSH) "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS) \ - -load "$(TEST_LOAD_FACILITIES)" | $(WINE) ./$(CAT32) + -load "$(TEST_LOAD_FACILITIES)" # Useful target to launch a built tclsh with the proper path,... -runtest: binaries $(TCLSH) $(TEST_DLL_FILE) +runtest: tcltest @TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \ $(WINE) ./$(TCLSH) $(TESTFLAGS) -load "$(TEST_LOAD_FACILITIES)" $(SCRIPT) @@ -959,7 +967,7 @@ cleanhelp: clean: cleanhelp clean-packages $(RM) *.lib *.a *.exp *.dll *.$(RES) *.${OBJEXT} *~ \#* TAGS a.out - $(RM) $(TCLSH) $(CAT32) $(TEST_EXE_FILE) $(TEST_DLL_FILE) tcltest.cmd tcltest + $(RM) $(TCLSH) $(CAT32) $(TEST_EXE_FILE) $(TEST_DLL_FILE) tcltest.cmd tcltest.sh $(RM) *.pch *.ilk *.pdb $(RM) minizip${HOST_EXEEXT} *.${HOST_OBJEXT} $(RM) *.zip diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 44cbbbe..d75ce57 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -641,7 +641,7 @@ DdeServerProc( HSZ ddeTopic, HSZ ddeItem, /* String handles. Transaction-type * dependent. */ HDDEDATA hData, /* DDE data. Transaction-type dependent. */ - DWORD dwData1, DWORD dwData2) + DWORD unused1, DWORD unused2) /* Transaction-dependent data. */ { Tcl_DString dString; @@ -653,6 +653,8 @@ DdeServerProc( RegisteredInterp *riPtr; Conversation *convPtr, *prevConvPtr; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + (void)unused1; + (void)unused2; switch(uType) { case XTYP_CONNECT: @@ -986,8 +988,9 @@ DdeServerProc( static void DdeExitProc( - ClientData clientData) /* Not used in this handler. */ + void *dummy) /* Not used. */ { + (void)dummy; DdeNameService(ddeInstance, NULL, 0, DNS_UNREGISTER); DdeUninitialize(ddeInstance); ddeInstance = 0; @@ -1288,7 +1291,7 @@ SetDdeError( static int DdeObjCmd( - ClientData clientData, /* Used only for deletion */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* The interp we are sending from */ int objc, /* Number of arguments */ Tcl_Obj *const *objv) /* The arguments */ @@ -1330,6 +1333,7 @@ DdeObjCmd( DWORD ddeResult; Tcl_Obj *objPtr, *handlerPtr = NULL; Tcl_DString serviceBuf, topicBuf, itemBuf; + (void)dummy; /* * Initialize DDE server/client diff --git a/win/tclWinInit.c b/win/tclWinInit.c index c2c6e26..934a2b5 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -113,7 +113,7 @@ static void AppendEnvironment(Tcl_Obj *listPtr, const char *lib); * * TclpInitPlatform -- * - * Initialize all the platform-dependant things like signals, + * Initialize all the platform-dependent things like signals, * floating-point error handling and sockets. * * Called at process initialization time. diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 1dfbbbc..618052b 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -3437,6 +3437,7 @@ TclPipeThreadStopSignal( SetEvent(evControl); *pipeTIPtr = NULL; + /* FALLTHRU */ case PTI_STATE_DOWN: return 1; diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 73208b9..41a9b37 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -214,6 +214,7 @@ Registry_Unload( { Tcl_Command cmd; Tcl_Obj *objv[3]; + (void)flags; /* * Unregister the registry package. There is no Tcl_PkgForget() @@ -280,7 +281,7 @@ DeleteCmd( static int RegistryObjCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ @@ -299,6 +300,7 @@ RegistryObjCmd( static const char *const modes[] = { "-32bit", "-64bit", NULL }; + (void)dummy; if (objc < 2) { wrongArgs: diff --git a/win/tclWinTime.c b/win/tclWinTime.c index 5890ce5..49389de 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -198,7 +198,7 @@ TclpGetSeconds(void) * This procedure returns a value that represents the highest resolution * clock available on the system. There are no guarantees on what the * resolution will be. In Tcl we will call this value a "click". The - * start time is also system dependant. + * start time is also system dependent. * * Results: * Number of clicks from some start time. |
