diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclStrToD.c | 18 | ||||
-rw-r--r-- | generic/tclStringObj.c | 13 | ||||
-rw-r--r-- | generic/tclStubInit.c | 4 | ||||
-rw-r--r-- | generic/tclTest.c | 810 | ||||
-rw-r--r-- | generic/tclTestObj.c | 49 | ||||
-rw-r--r-- | generic/tclTestProcBodyObj.c | 6 | ||||
-rw-r--r-- | generic/tclThreadAlloc.c | 4 | ||||
-rw-r--r-- | generic/tclThreadTest.c | 10 |
8 files changed, 281 insertions, 633 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index be26d0b..7964b68 100644 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -328,7 +328,7 @@ static void CastOutPowersOf2(int *, int *, int *); static char * ShorteningInt64Conversion(Double *, Tcl_WideUInt, int, int, int, int, int, int, int, int, int, int, int, int *, char **); -static char * StrictInt64Conversion(Double *, Tcl_WideUInt, +static char * StrictInt64Conversion(Tcl_WideUInt, int, int, int, int, int, int, int, int, int *, char **); static int ShouldBankerRoundUpPowD(mp_int *, int, int); @@ -340,7 +340,7 @@ static char * ShorteningBignumConversionPowD(Double *dPtr, int sd, int k, int len, int ilim, int ilim1, int *decpt, char **endPtr); -static char * StrictBignumConversionPowD(Double *dPtr, +static char * StrictBignumConversionPowD( Tcl_WideUInt bw, int b2, int b5, int sd, int k, int len, int ilim, int ilim1, int *decpt, @@ -354,7 +354,7 @@ static char * ShorteningBignumConversion(Double *dPtr, int s2, int s5, int k, int len, int ilim, int ilim1, int *decpt, char **endPtr); -static char * StrictBignumConversion(Double *dPtr, +static char * StrictBignumConversion( Tcl_WideUInt bw, int b2, int s2, int s5, int k, int len, int ilim, int ilim1, int *decpt, @@ -3180,7 +3180,6 @@ ShorteningInt64Conversion( static inline char * StrictInt64Conversion( - Double *dPtr, /* Original number to convert. */ Tcl_WideUInt bw, /* Integer significand. */ int b2, int b5, /* Scale factor for the significand in the * numerator. */ @@ -3205,7 +3204,6 @@ StrictInt64Conversion( int digit; /* Current output digit. */ char *s = retval; /* Cursor in the output buffer. */ int i; /* Current position in the output buffer. */ - (void)dPtr; /* * Adjust if the logarithm was guessed wrong. @@ -3589,7 +3587,6 @@ ShorteningBignumConversionPowD( static inline char * StrictBignumConversionPowD( - Double *dPtr, /* Original number to convert. */ Tcl_WideUInt bw, /* Integer significand. */ int b2, int b5, /* Scale factor for the significand in the * numerator. */ @@ -3611,7 +3608,6 @@ StrictBignumConversionPowD( char *s = retval; /* Cursor in the output buffer. */ int i; /* Index in the output buffer. */ mp_err err; - (void)dPtr; /* * b = bw * 2**b2 * 5**b5 @@ -4028,7 +4024,6 @@ ShorteningBignumConversion( static inline char * StrictBignumConversion( - Double *dPtr, /* Original number being converted. */ Tcl_WideUInt bw, /* Integer significand and exponent. */ int b2, /* Scale factor for the significand. */ int s2, int s5, /* Scale factors for denominator. */ @@ -4049,7 +4044,6 @@ StrictBignumConversion( int g; /* Size of the current digit ground. */ int i, j; mp_err err; - (void)dPtr; /* * b = bw * 2**b2 * 5**b5 @@ -4469,7 +4463,7 @@ TclDoubleDigits( * operations. */ - return StrictInt64Conversion(&d, bw, b2, b5, s2, s5, k, + return StrictInt64Conversion(bw, b2, b5, s2, s5, k, len, ilim, ilim1, decpt, endPtr); } else if (s5 == 0) { /* @@ -4486,7 +4480,7 @@ TclDoubleDigits( b2 += delta; s2 += delta; } - return StrictBignumConversionPowD(&d, bw, b2, b5, + return StrictBignumConversionPowD(bw, b2, b5, s2/MP_DIGIT_BIT, k, len, ilim, ilim1, decpt, endPtr); } else { /* @@ -4496,7 +4490,7 @@ TclDoubleDigits( * fewer mp_int divisions. */ - return StrictBignumConversion(&d, bw, b2, s2, s5, k, + return StrictBignumConversion(bw, b2, s2, s5, k, len, ilim, ilim1, decpt, endPtr); } } diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 6ab2371..cb2a773 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -342,14 +342,9 @@ Tcl_DbNewStringObj( * when initializing the new object. If * negative, use bytes up to the first NUL * byte. */ - const char *file, /* The name of the source file calling this - * function; used for debugging. */ - int line) /* Line number in the source file; used for - * debugging. */ + TCL_UNUSED(const char *) /*file*/, + TCL_UNUSED(int) /*line*/) { - (void)file; - (void)line; - return Tcl_NewStringObj(bytes, length); } #endif /* TCL_MEM_DEBUG */ @@ -4169,11 +4164,9 @@ DupStringInternalRep( static int SetStringFromAny( - Tcl_Interp *dummy, /* Not used. */ + TCL_UNUSED(Tcl_Interp *), Tcl_Obj *objPtr) /* The object to convert. */ { - (void)dummy; - if (!TclHasIntRep(objPtr, &tclStringType)) { String *stringPtr = stringAlloc(0); diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 784d165..fbbac6d 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -270,9 +270,9 @@ mp_err TclBN_mp_div_3(const mp_int *a, mp_int *c, unsigned int *d) { return result; } -int TclBN_mp_expt_d_ex(const mp_int *a, unsigned int b, mp_int *c, int fast) +int TclBN_mp_expt_d_ex(const mp_int *a, unsigned int b, mp_int *c, + TCL_UNUSED(int) /*fast*/) { - (void)fast; return TclBN_mp_expt_u32(a, b, c); } diff --git a/generic/tclTest.c b/generic/tclTest.c index 634f22b..c454d70 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -164,10 +164,8 @@ static void CleanupTestSetassocdataTests( void *clientData, Tcl_Interp *interp); static void CmdDelProc1(void *clientData); static void CmdDelProc2(void *clientData); -static int CmdProc1(void *clientData, - Tcl_Interp *interp, int argc, const char **argv); -static int CmdProc2(void *clientData, - Tcl_Interp *interp, int argc, const char **argv); +static Tcl_CmdProc CmdProc1; +static Tcl_CmdProc CmdProc2; static void CmdTraceDeleteProc( void *clientData, Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *cmdProc, @@ -177,16 +175,11 @@ static void CmdTraceProc(void *clientData, Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *cmdProc, void *cmdClientData, int argc, const char *argv[]); -static int CreatedCommandProc( - void *clientData, Tcl_Interp *interp, - int argc, const char **argv); -static int CreatedCommandProc2( - void *clientData, Tcl_Interp *interp, - int argc, const char **argv); +static Tcl_CmdProc CreatedCommandProc; +static Tcl_CmdProc CreatedCommandProc2; static void DelCallbackProc(void *clientData, Tcl_Interp *interp); -static int DelCmdProc(void *clientData, - Tcl_Interp *interp, int argc, const char **argv); +static Tcl_CmdProc DelCmdProc; static void DelDeleteProc(void *clientData); static void EncodingFreeProc(void *clientData); static int EncodingToUtfProc(void *clientData, @@ -201,15 +194,11 @@ static int EncodingFromUtfProc(void *clientData, int *dstCharsPtr); static void ExitProcEven(void *clientData); static void ExitProcOdd(void *clientData); -static int GetTimesObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc GetTimesObjCmd; +static Tcl_ResolveCompiledVarProc InterpCompiledVarResolver; static void MainLoop(void); -static int NoopCmd(void *clientData, - Tcl_Interp *interp, int argc, const char **argv); -static int NoopObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_CmdProc NoopCmd; +static Tcl_ObjCmdProc NoopObjCmd; static int ObjTraceProc(void *clientData, Tcl_Interp *interp, int level, const char *command, Tcl_Command commandToken, int objc, @@ -218,181 +207,83 @@ static void ObjTraceDeleteProc(void *clientData); static void PrintParse(Tcl_Interp *interp, Tcl_Parse *parsePtr); 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[]); -static int TestpurebytesobjObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TeststringbytesObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestcmdinfoCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestcmdtokenCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestcmdtraceCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestconcatobjCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestcreatecommandCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestdcallCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestdelCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestdelassocdataCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestdoubledigitsObjCmd(void *dummy, - Tcl_Interp* interp, int objc, - Tcl_Obj* const objv[]); -static int TestdstringCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestencodingObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestevalexObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestevalobjvObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TesteventObjCmd(void *unused, - Tcl_Interp *interp, int argc, - Tcl_Obj *const objv[]); +static Tcl_CmdProc TestasyncCmd; +static Tcl_ObjCmdProc TestbumpinterpepochObjCmd; +static Tcl_ObjCmdProc TestbytestringObjCmd; +static Tcl_ObjCmdProc TestpurebytesobjObjCmd; +static Tcl_ObjCmdProc TeststringbytesObjCmd; +static Tcl_CmdProc TestcmdinfoCmd; +static Tcl_CmdProc TestcmdtokenCmd; +static Tcl_CmdProc TestcmdtraceCmd; +static Tcl_CmdProc TestconcatobjCmd; +static Tcl_CmdProc TestcreatecommandCmd; +static Tcl_CmdProc TestdcallCmd; +static Tcl_CmdProc TestdelCmd; +static Tcl_CmdProc TestdelassocdataCmd; +static Tcl_ObjCmdProc TestdoubledigitsObjCmd; +static Tcl_CmdProc TestdstringCmd; +static Tcl_ObjCmdProc TestencodingObjCmd; +static Tcl_ObjCmdProc TestevalexObjCmd; +static Tcl_ObjCmdProc TestevalobjvObjCmd; +static Tcl_ObjCmdProc TesteventObjCmd; static int TesteventProc(Tcl_Event *event, int flags); static int TesteventDeleteProc(Tcl_Event *event, void *clientData); -static int TestexithandlerCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestexprlongCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestexprlongobjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestexprdoubleCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestexprdoubleobjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestexprparserObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestexprstringCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestfileCmd(void *dummy, - Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static int TestfilelinkCmd(void *dummy, - Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static int TestfeventCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestgetassocdataCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestgetintCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestlongsizeCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestgetplatformCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestgetvarfullnameCmd( - void *dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static int TestinterpdeleteCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestlinkCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestlinkarrayCmd(void *dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const *objv); -static int TestlocaleCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestmainthreadCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestsetmainloopCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestexitmainloopCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestpanicCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestparseargsCmd(void *dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static int TestparserObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestparsevarObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestparsevarnameObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestpreferstableObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestprintObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestregexpObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestreturnObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_CmdProc TestexithandlerCmd; +static Tcl_CmdProc TestexprlongCmd; +static Tcl_ObjCmdProc TestexprlongobjCmd; +static Tcl_CmdProc TestexprdoubleCmd; +static Tcl_ObjCmdProc TestexprdoubleobjCmd; +static Tcl_ObjCmdProc TestexprparserObjCmd; +static Tcl_CmdProc TestexprstringCmd; +static Tcl_ObjCmdProc TestfileCmd; +static Tcl_ObjCmdProc TestfilelinkCmd; +static Tcl_CmdProc TestfeventCmd; +static Tcl_CmdProc TestgetassocdataCmd; +static Tcl_CmdProc TestgetintCmd; +static Tcl_CmdProc TestlongsizeCmd; +static Tcl_CmdProc TestgetplatformCmd; +static Tcl_ObjCmdProc TestgetvarfullnameCmd; +static Tcl_CmdProc TestinterpdeleteCmd; +static Tcl_CmdProc TestlinkCmd; +static Tcl_ObjCmdProc TestlinkarrayCmd; +static Tcl_ObjCmdProc TestlocaleCmd; +static Tcl_CmdProc TestmainthreadCmd; +static Tcl_CmdProc TestsetmainloopCmd; +static Tcl_CmdProc TestexitmainloopCmd; +static Tcl_CmdProc TestpanicCmd; +static Tcl_ObjCmdProc TestparseargsCmd; +static Tcl_ObjCmdProc TestparserObjCmd; +static Tcl_ObjCmdProc TestparsevarObjCmd; +static Tcl_ObjCmdProc TestparsevarnameObjCmd; +static Tcl_ObjCmdProc TestpreferstableObjCmd; +static Tcl_ObjCmdProc TestprintObjCmd; +static Tcl_ObjCmdProc TestregexpObjCmd; +static Tcl_ObjCmdProc TestreturnObjCmd; static void TestregexpXflags(const char *string, int length, int *cflagsPtr, int *eflagsPtr); -static int TestsaveresultCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc TestsaveresultCmd; static void TestsaveresultFree(char *blockPtr); -static int TestsetassocdataCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestsetCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int Testset2Cmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestseterrorcodeCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestsetobjerrorcodeCmd( - void *dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static int TestsetplatformCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TeststaticpkgCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TesttranslatefilenameCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestupvarCmd(void *dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestWrongNumArgsObjCmd( - void *clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static int TestGetIndexFromObjStructObjCmd( - void *clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static int TestChannelCmd(void *clientData, - Tcl_Interp *interp, int argc, const char **argv); -static int TestChannelEventCmd(void *clientData, - Tcl_Interp *interp, int argc, const char **argv); -static int TestSocketCmd(void *clientData, - Tcl_Interp *interp, int argc, const char **argv); -static int TestFilesystemObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestSimpleFilesystemObjCmd( - void *dummy, Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_CmdProc TestsetassocdataCmd; +static Tcl_CmdProc TestsetCmd; +static Tcl_CmdProc Testset2Cmd; +static Tcl_CmdProc TestseterrorcodeCmd; +static Tcl_ObjCmdProc TestsetobjerrorcodeCmd; +static Tcl_CmdProc TestsetplatformCmd; +static Tcl_CmdProc TeststaticpkgCmd; +static Tcl_CmdProc TesttranslatefilenameCmd; +static Tcl_CmdProc TestupvarCmd; +static Tcl_ObjCmdProc TestWrongNumArgsObjCmd; +static Tcl_ObjCmdProc TestGetIndexFromObjStructObjCmd; +static Tcl_CmdProc TestChannelCmd; +static Tcl_CmdProc TestChannelEventCmd; +static Tcl_CmdProc TestSocketCmd; +static Tcl_ObjCmdProc TestFilesystemObjCmd; +static Tcl_ObjCmdProc TestSimpleFilesystemObjCmd; static void TestReport(const char *cmd, Tcl_Obj *arg1, Tcl_Obj *arg2); -static int TestgetencpathObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestsetencpathObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc TestgetencpathObjCmd; +static Tcl_ObjCmdProc TestsetencpathObjCmd; static Tcl_Obj * TestReportGetNativePath(Tcl_Obj *pathPtr); static Tcl_FSStatProc TestReportStat; static Tcl_FSAccessProc TestReportAccess; @@ -425,33 +316,17 @@ static Tcl_FSListVolumesProc SimpleListVolumes; static Tcl_FSPathInFilesystemProc SimplePathInFilesystem; static Tcl_Obj * SimpleRedirect(Tcl_Obj *pathPtr); static Tcl_FSMatchInDirectoryProc SimpleMatchInDirectory; -static int TestNumUtfCharsCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestFindFirstCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestFindLastCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestHashSystemHashCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc TestNumUtfCharsCmd; +static Tcl_ObjCmdProc TestFindFirstCmd; +static Tcl_ObjCmdProc TestFindLastCmd; +static Tcl_ObjCmdProc TestHashSystemHashCmd; static Tcl_NRPostProc NREUnwind_callback; -static int TestNREUnwind(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestNRELevels(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestInterpResolverCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc TestNREUnwind; +static Tcl_ObjCmdProc TestNRELevels; +static Tcl_ObjCmdProc TestInterpResolverCmd; #if defined(HAVE_CPUID) || defined(_WIN32) -static int TestcpuidCmd(void *dummy, - Tcl_Interp* interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc TestcpuidCmd; #endif static const Tcl_Filesystem testReportingFilesystem = { @@ -843,7 +718,7 @@ Tcltest_SafeInit( /* ARGSUSED */ static int TestasyncCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -851,7 +726,6 @@ TestasyncCmd( TestAsyncHandler *asyncPtr, *prevPtr; int id, code; static int nextId = 1; - (void)dummy; if (argc < 2) { wrongNumArgs: @@ -1054,13 +928,12 @@ AsyncThreadProc( static int TestbumpinterpepochObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *)interp; - (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, ""); @@ -1091,13 +964,12 @@ TestbumpinterpepochObjCmd( /* ARGSUSED */ static int TestcmdinfoCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { Tcl_CmdInfo info; - (void)dummy; if (argc != 3) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -1165,12 +1037,9 @@ static int CmdProc1( void *clientData, /* String to return. */ Tcl_Interp *interp, /* Current interpreter. */ - int argc, /* Number of arguments. */ - const char **argv) /* Argument strings. */ + TCL_UNUSED(int) /*argc*/, + TCL_UNUSED(const char **) /*argv*/) { - (void)argc; - (void)argv; - Tcl_AppendResult(interp, "CmdProc1 ", (char *) clientData, NULL); return TCL_OK; } @@ -1180,12 +1049,9 @@ static int CmdProc2( void *clientData, /* String to return. */ Tcl_Interp *interp, /* Current interpreter. */ - int argc, /* Number of arguments. */ - const char **argv) /* Argument strings. */ + TCL_UNUSED(int) /*argc*/, + TCL_UNUSED(const char **) /*argv*/) { - (void)argc; - (void)argv; - Tcl_AppendResult(interp, "CmdProc2 ", (char *) clientData, NULL); return TCL_OK; } @@ -1228,7 +1094,7 @@ CmdDelProc2( /* ARGSUSED */ static int TestcmdtokenCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -1236,7 +1102,6 @@ TestcmdtokenCmd( Tcl_Command token; int *l; char buf[30]; - (void)dummy; if (argc != 3) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -1293,14 +1158,13 @@ TestcmdtokenCmd( /* ARGSUSED */ static int TestcmdtraceCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { Tcl_DString buffer; int result; - (void)dummy; if (argc != 3) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -1386,22 +1250,17 @@ CmdTraceProc( void *clientData, /* Pointer to buffer in which the * command and arguments are appended. * Accumulates test result. */ - Tcl_Interp *interp, /* Current interpreter. */ - int level, /* Current trace level. */ + TCL_UNUSED(Tcl_Interp *), + TCL_UNUSED(int) /*level*/, char *command, /* The command being traced (after * substitutions). */ - Tcl_CmdProc *cmdProc, /* Points to command's command procedure. */ - void *cmdClientData, /* Client data associated with command - * procedure. */ + TCL_UNUSED(Tcl_CmdProc *) /*cmdProc*/, + TCL_UNUSED(ClientData), int argc, /* Number of arguments. */ const char *argv[]) /* Argument strings. */ { Tcl_DString *bufPtr = (Tcl_DString *) clientData; int i; - (void)interp; - (void)level; - (void)cmdProc; - (void)cmdClientData; Tcl_DStringAppendElement(bufPtr, command); @@ -1414,25 +1273,15 @@ CmdTraceProc( static void CmdTraceDeleteProc( - void *dummy, /* Unused. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ - int level, /* Current trace level. */ - char *command, /* The command being traced (after - * substitutions). */ - Tcl_CmdProc *cmdProc, /* Points to command's command procedure. */ - void *cmdClientData, /* Client data associated with command - * procedure. */ - int argc, /* Number of arguments. */ - const char *argv[]) /* Argument strings. */ + TCL_UNUSED(int) /*level*/, + TCL_UNUSED(char *) /*command*/, + TCL_UNUSED(Tcl_CmdProc *), + TCL_UNUSED(ClientData), + TCL_UNUSED(int) /*argc*/, + TCL_UNUSED(const char **) /*argv*/) { - (void)dummy; - (void)level; - (void)command; - (void)cmdProc; - (void)cmdClientData; - (void)argc; - (void)argv; - /* * Remove ourselves to test whether calling Tcl_DeleteTrace within a trace * callback causes the for loop in TclNRExecuteByteCode that calls traces to @@ -1444,20 +1293,15 @@ CmdTraceDeleteProc( static int ObjTraceProc( - void *dummy, /* unused */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Tcl interpreter */ - int level, /* Execution level */ - const char *command, /* Command being executed */ - Tcl_Command token, /* Command information */ - int objc, /* Parameter count */ - Tcl_Obj *const objv[]) /* Parameter list */ + TCL_UNUSED(int) /*level*/, + const char *command, + TCL_UNUSED(Tcl_Command), + TCL_UNUSED(int) /*objc*/, + Tcl_Obj *const objv[]) /* Argument objects. */ { const char *word = Tcl_GetString(objv[0]); - (void)dummy; - (void)level; - (void)token; - (void)objc; - (void)objv; if (!strcmp(word, "Error")) { Tcl_SetObjResult(interp, Tcl_NewStringObj(command, -1)); @@ -1506,13 +1350,11 @@ ObjTraceDeleteProc( static int TestcreatecommandCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { - (void)dummy; - if (argc != 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " option\"", NULL); @@ -1538,16 +1380,13 @@ TestcreatecommandCmd( static int CreatedCommandProc( - void *dummy, /* String to return. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ - int argc, /* Number of arguments. */ - const char **argv) /* Argument strings. */ + TCL_UNUSED(int) /*argc*/, + TCL_UNUSED(const char **) /*argv*/) { Tcl_CmdInfo info; int found; - (void)dummy; - (void)argc; - (void)argv; found = Tcl_GetCommandInfo(interp, "test_ns_basic::createdcommand", &info); @@ -1563,16 +1402,13 @@ CreatedCommandProc( static int CreatedCommandProc2( - void *dummy, /* String to return. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ - int argc, /* Number of arguments. */ - const char **argv) /* Argument strings. */ + TCL_UNUSED(int) /*argc*/, + TCL_UNUSED(const char **) /*argv*/) { Tcl_CmdInfo info; int found; - (void)dummy; - (void)argc; - (void)argv; found = Tcl_GetCommandInfo(interp, "value:at:", &info); if (!found) { @@ -1605,13 +1441,12 @@ CreatedCommandProc2( /* ARGSUSED */ static int TestdcallCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { int i, id; - (void)dummy; delInterp = Tcl_CreateInterp(); Tcl_DStringInit(&delString); @@ -1671,14 +1506,13 @@ DelCallbackProc( /* ARGSUSED */ static int TestdelCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { DelCmd *dPtr; Tcl_Interp *slave; - (void)dummy; if (argc != 4) { Tcl_AppendResult(interp, "wrong # args", NULL); @@ -1704,12 +1538,10 @@ static int DelCmdProc( void *clientData, /* String result to return. */ Tcl_Interp *interp, /* Current interpreter. */ - int argc, /* Number of arguments. */ - const char **argv) /* Argument strings. */ + TCL_UNUSED(int) /*argc*/, + TCL_UNUSED(const char **) /*argv*/) { DelCmd *dPtr = (DelCmd *) clientData; - (void)argc; - (void)argv; Tcl_AppendResult(interp, dPtr->deleteCmd, NULL); ckfree(dPtr->deleteCmd); @@ -1749,13 +1581,11 @@ DelDeleteProc( static int TestdelassocdataCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { - (void)dummy; - if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], " data_key\"", NULL); @@ -1787,14 +1617,11 @@ TestdelassocdataCmd( */ static int -TestdoubledigitsObjCmd(void *dummy, - /* NULL */ - Tcl_Interp* interp, - /* Tcl interpreter */ - int objc, - /* Parameter count */ - Tcl_Obj* const objv[]) - /* Parameter vector */ +TestdoubledigitsObjCmd( + TCL_UNUSED(ClientData), + Tcl_Interp* interp, /* Tcl interpreter */ + int objc, /* Parameter count */ + Tcl_Obj* const objv[]) /* Parameter vector */ { static const char* options[] = { "shortest", @@ -1819,7 +1646,6 @@ TestdoubledigitsObjCmd(void *dummy, char* endPtr; Tcl_Obj* strObj; Tcl_Obj* retval; - (void)dummy; if (objc < 4 || objc > 5) { Tcl_WrongNumArgs(interp, 1, objv, "fpval ndigits type ?shorten?"); @@ -1880,13 +1706,12 @@ TestdoubledigitsObjCmd(void *dummy, /* ARGSUSED */ static int TestdstringCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { int count; - (void)dummy; if (argc < 2) { wrongNumArgs: @@ -2008,7 +1833,7 @@ static void SpecialFree( /* ARGSUSED */ static int TestencodingObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -2023,7 +1848,6 @@ TestencodingObjCmd( enum options { ENC_CREATE, ENC_DELETE }; - (void)dummy; if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0, &index) != TCL_OK) { @@ -2078,10 +1902,10 @@ TestencodingObjCmd( static int EncodingToUtfProc( void *clientData, /* TclEncoding structure. */ - const char *src, /* Source string in specified encoding. */ + TCL_UNUSED(const char *) /*src*/, int srcLen, /* Source string length in bytes. */ - int flags, /* Conversion control flags. */ - Tcl_EncodingState *statePtr,/* Current state. */ + TCL_UNUSED(int) /*flags*/, + TCL_UNUSED(Tcl_EncodingState *), char *dst, /* Output buffer. */ int dstLen, /* The maximum length of output buffer. */ int *srcReadPtr, /* Filled with number of bytes read. */ @@ -2090,9 +1914,6 @@ EncodingToUtfProc( { int len; TclEncoding *encodingPtr; - (void)src; - (void)flags; - (void)statePtr; encodingPtr = (TclEncoding *) clientData; Tcl_EvalEx(encodingPtr->interp, encodingPtr->toUtfCmd, -1, TCL_EVAL_GLOBAL); @@ -2113,10 +1934,10 @@ EncodingToUtfProc( static int EncodingFromUtfProc( void *clientData, /* TclEncoding structure. */ - const char *src, /* Source string in specified encoding. */ + TCL_UNUSED(const char *) /*src*/, int srcLen, /* Source string length in bytes. */ - int flags, /* Conversion control flags. */ - Tcl_EncodingState *statePtr,/* Current state. */ + TCL_UNUSED(int) /*flags*/, + TCL_UNUSED(Tcl_EncodingState *), char *dst, /* Output buffer. */ int dstLen, /* The maximum length of output buffer. */ int *srcReadPtr, /* Filled with number of bytes read. */ @@ -2125,9 +1946,6 @@ EncodingFromUtfProc( { int len; TclEncoding *encodingPtr; - (void)src; - (void)flags; - (void)statePtr; encodingPtr = (TclEncoding *) clientData; Tcl_EvalEx(encodingPtr->interp, encodingPtr->fromUtfCmd, -1, TCL_EVAL_GLOBAL); @@ -2175,14 +1993,13 @@ EncodingFreeProc( static int TestevalexObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { int length, flags; const char *script; - (void)dummy; flags = 0; if (objc == 3) { @@ -2221,13 +2038,12 @@ TestevalexObjCmd( static int TestevalobjvObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { int evalGlobal; - (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "global word ?word ...?"); @@ -2271,7 +2087,7 @@ TestevalobjvObjCmd( static int TesteventObjCmd( - void *dummy, /* Not used */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const objv[]) /* Parameter vector */ @@ -2291,7 +2107,6 @@ TesteventObjCmd( TCL_QUEUE_MARK }; TestEvent *ev; /* Event to be queued */ - (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?arg ...?"); @@ -2357,7 +2172,7 @@ TesteventObjCmd( static int TesteventProc( Tcl_Event *event, /* Event to deliver */ - int flags) /* Current flags for Tcl_ServiceEvent */ + TCL_UNUSED(int) /*flags*/) { TestEvent *ev = (TestEvent *) event; Tcl_Interp *interp = ev->interp; @@ -2365,7 +2180,6 @@ TesteventProc( int result = Tcl_EvalObjEx(interp, command, TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT); int retval; - (void)flags; if (result != TCL_OK) { Tcl_AddErrorInfo(interp, @@ -2452,13 +2266,12 @@ TesteventDeleteProc( static int TestexithandlerCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { int value; - (void)dummy; if (argc != 3) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -2529,7 +2342,7 @@ ExitProcEven( static int TestexprlongCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -2537,7 +2350,6 @@ TestexprlongCmd( long exprResult; char buf[4 + TCL_INTEGER_SPACE]; int result; - (void)dummy; if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -2573,7 +2385,7 @@ TestexprlongCmd( static int TestexprlongobjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* Argument objects. */ @@ -2581,7 +2393,6 @@ TestexprlongobjCmd( long exprResult; char buf[4 + TCL_INTEGER_SPACE]; int result; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "expression"); @@ -2616,7 +2427,7 @@ TestexprlongobjCmd( static int TestexprdoubleCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -2624,7 +2435,6 @@ TestexprdoubleCmd( double exprResult; char buf[4 + TCL_DOUBLE_SPACE]; int result; - (void)dummy; if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -2661,7 +2471,7 @@ TestexprdoubleCmd( static int TestexprdoubleobjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* Argument objects. */ @@ -2669,7 +2479,6 @@ TestexprdoubleobjCmd( double exprResult; char buf[4 + TCL_DOUBLE_SPACE]; int result; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "expression"); @@ -2704,13 +2513,11 @@ TestexprdoubleobjCmd( static int TestexprstringCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { - (void)dummy; - if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], " expression\"", NULL); @@ -2738,13 +2545,12 @@ TestexprstringCmd( static int TestfilelinkCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { Tcl_Obj *contents; - (void)dummy; if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "source ?target?"); @@ -2806,13 +2612,12 @@ TestfilelinkCmd( static int TestgetassocdataCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { char *res; - (void)dummy; if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -2845,14 +2650,13 @@ TestgetassocdataCmd( static int TestgetplatformCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { static const char *const platformStrings[] = { "unix", "mac", "windows" }; TclPlatformType *platform; - (void)dummy; platform = TclGetPlatform(); @@ -2887,13 +2691,12 @@ TestgetplatformCmd( /* ARGSUSED */ static int TestinterpdeleteCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { Tcl_Interp *slaveToDelete; - (void)dummy; if (argc != 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -2929,7 +2732,7 @@ TestinterpdeleteCmd( /* ARGSUSED */ static int TestlinkCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -2952,7 +2755,6 @@ TestlinkCmd( char buffer[2*TCL_DOUBLE_SPACE]; int writable, flag; Tcl_Obj *tmp; - (void)dummy; if (argc < 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -3398,7 +3200,7 @@ TestlinkCmd( static int TestlinkarrayCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -3422,7 +3224,6 @@ TestlinkarrayCmd( int optionIndex, typeIndex, readonly, i, size, length; char *name, *arg; Tcl_WideInt addr; - (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "option args"); @@ -3517,7 +3318,7 @@ TestlinkarrayCmd( static int TestlocaleCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ @@ -3532,7 +3333,6 @@ TestlocaleCmd( LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_ALL }; - (void)dummy; /* * LC_CTYPE, etc. correspond to the indices for the strings. @@ -3580,10 +3380,8 @@ TestlocaleCmd( static void CleanupTestSetassocdataTests( void *clientData, /* Data to be released. */ - Tcl_Interp *dummy) /* Interpreter being deleted. */ + TCL_UNUSED(Tcl_Interp *)) { - (void)dummy; - ckfree(clientData); } @@ -3606,7 +3404,7 @@ CleanupTestSetassocdataTests( static int TestparserObjCmd( - void *dummy1, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ @@ -3614,7 +3412,6 @@ TestparserObjCmd( const char *script; int length, dummy; Tcl_Parse parse; - (void)dummy1; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "script length"); @@ -3663,7 +3460,7 @@ TestparserObjCmd( static int TestexprparserObjCmd( - void *dummy1, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ @@ -3671,7 +3468,6 @@ TestexprparserObjCmd( const char *script; int length, dummy; Tcl_Parse parse; - (void)dummy1; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "expr length"); @@ -3811,13 +3607,12 @@ PrintParse( static int TestparsevarObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { const char *value, *name, *termPtr; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "varName"); @@ -3853,7 +3648,7 @@ TestparsevarObjCmd( static int TestparsevarnameObjCmd( - void *dummy1, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ @@ -3861,7 +3656,6 @@ TestparsevarnameObjCmd( const char *script; int append, length, dummy; Tcl_Parse parse; - (void)dummy1; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "script length append"); @@ -3917,15 +3711,12 @@ TestparsevarnameObjCmd( static int TestpreferstableObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* The argument objects. */ + TCL_UNUSED(int) /*objc*/, + TCL_UNUSED(Tcl_Obj *const *) /*objv*/) { Interp *iPtr = (Interp *) interp; - (void)dummy; - (void)objc; - (void)objv; iPtr->packagePrefer = PKG_PREFER_STABLE; return TCL_OK; @@ -3950,14 +3741,13 @@ TestpreferstableObjCmd( static int TestprintObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { Tcl_WideInt argv1 = 0; size_t argv2; - (void)dummy; if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "format wideint"); @@ -3993,7 +3783,7 @@ TestprintObjCmd( /* ARGSUSED */ static int TestregexpObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -4016,7 +3806,6 @@ TestregexpObjCmd( REGEXP_XFLAGS, REGEXP_LAST }; - (void)dummy; indices = 0; about = 0; @@ -4318,16 +4107,11 @@ TestregexpXflags( /* ARGSUSED */ static int TestreturnObjCmd( - void *dummy, /* Not used. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ + TCL_UNUSED(ClientData), + TCL_UNUSED(Tcl_Interp *), + TCL_UNUSED(int) /*objc*/, + TCL_UNUSED(Tcl_Obj *const *) /*objv*/) { - (void)dummy; - (void)interp; - (void)objc; - (void)objv; - return TCL_RETURN; } @@ -4351,14 +4135,13 @@ TestreturnObjCmd( static int TestsetassocdataCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { char *buf, *oldData; Tcl_InterpDeleteProc *procPtr; - (void)dummy; if (argc != 3) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -4403,14 +4186,13 @@ TestsetassocdataCmd( static int TestsetplatformCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { size_t length; TclPlatformType *platform; - (void)dummy; platform = TclGetPlatform(); @@ -4453,13 +4235,12 @@ TestsetplatformCmd( static int TeststaticpkgCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { int safe, loaded; - (void)dummy; if (argc != 4) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", @@ -4505,14 +4286,13 @@ StaticInitProc( static int TesttranslatefilenameCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { Tcl_DString buffer; const char *result; - (void)dummy; if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", @@ -4548,13 +4328,12 @@ TesttranslatefilenameCmd( /* ARGSUSED */ static int TestupvarCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { int flags = 0; - (void)dummy; if ((argc != 5) && (argc != 6)) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", @@ -4602,13 +4381,11 @@ TestupvarCmd( /* ARGSUSED */ static int TestseterrorcodeCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { - (void)dummy; - if (argc > 6) { Tcl_AppendResult(interp, "too many args", NULL); return TCL_ERROR; @@ -4657,13 +4434,11 @@ TestseterrorcodeCmd( /* ARGSUSED */ static int TestsetobjerrorcodeCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { - (void)dummy; - Tcl_SetObjErrorCode(interp, Tcl_ConcatObj(objc - 1, objv + 1)); return TCL_ERROR; } @@ -4688,7 +4463,7 @@ TestsetobjerrorcodeCmd( /* ARGSUSED */ static int TestfeventCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -4696,7 +4471,6 @@ TestfeventCmd( static Tcl_Interp *interp2 = NULL; int code; Tcl_Channel chan; - (void)dummy; if (argc < 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -4761,21 +4535,17 @@ TestfeventCmd( static int TestpanicCmd( - void *dummy, /* Not used. */ - Tcl_Interp *interp, /* Current interpreter. */ + TCL_UNUSED(ClientData), + TCL_UNUSED(Tcl_Interp *), int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { - char *argString; - (void)dummy; - (void)interp; - /* * Put the arguments into a var args structure * Append all of the arguments together separated by spaces */ - argString = Tcl_Merge(argc-1, argv+1); + char *argString = Tcl_Merge(argc-1, argv+1); Tcl_Panic("%s", argString); ckfree(argString); @@ -4784,7 +4554,7 @@ TestpanicCmd( static int TestfileCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ Tcl_Obj *const argv[]) /* The argument objects. */ @@ -4792,7 +4562,6 @@ TestfileCmd( int force, i, j, result; Tcl_Obj *error = NULL; const char *subcmd; - (void)dummy; if (argc < 3) { return TCL_ERROR; @@ -4867,7 +4636,7 @@ TestfileCmd( static int TestgetvarfullnameCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ @@ -4877,7 +4646,6 @@ TestgetvarfullnameCmd( Tcl_Namespace *namespacePtr; Tcl_CallFrame *framePtr; Tcl_Var variable; - (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "name scope"); @@ -4942,10 +4710,10 @@ TestgetvarfullnameCmd( static int GetTimesObjCmd( - void *dummy, /* Unused. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* The current interpreter. */ - int cobjc, /* Number of arguments. */ - Tcl_Obj *const cobjv[]) /* The argument objects. */ + TCL_UNUSED(int) /*cobjc*/, + TCL_UNUSED(Tcl_Obj *const *) /*cobjv*/) { Interp *iPtr = (Interp *) interp; int i, n; @@ -4954,9 +4722,6 @@ GetTimesObjCmd( Tcl_Obj *objPtr, **objv; const char *s; char newString[TCL_INTEGER_SPACE]; - (void)dummy; - (void)cobjc; - (void)cobjv; /* alloc & free 100000 times */ fprintf(stderr, "alloc & free 100000 6 word items\n"); @@ -5124,16 +4889,11 @@ GetTimesObjCmd( static int NoopCmd( - void *dummy, /* Unused. */ - Tcl_Interp *interp, /* The current interpreter. */ - int argc, /* The number of arguments. */ - const char **argv) /* The argument strings. */ + TCL_UNUSED(ClientData), + TCL_UNUSED(Tcl_Interp *), + TCL_UNUSED(int) /*argc*/, + TCL_UNUSED(const char **) /*argv*/) { - (void)dummy; - (void)interp; - (void)argc; - (void)argv; - return TCL_OK; } @@ -5156,16 +4916,11 @@ NoopCmd( static int NoopObjCmd( - void *dummy, /* Not used. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* The argument objects. */ + TCL_UNUSED(ClientData), + TCL_UNUSED(Tcl_Interp *), + TCL_UNUSED(int) /*objc*/, + TCL_UNUSED(Tcl_Obj *const *) /*objv*/) { - (void)dummy; - (void)interp; - (void)objc; - (void)objv; - return TCL_OK; } @@ -5186,14 +4941,13 @@ NoopObjCmd( static int TeststringbytesObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { int n; const unsigned char *p; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "value"); @@ -5227,13 +4981,12 @@ TeststringbytesObjCmd( static int TestpurebytesobjObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { Tcl_Obj *objPtr; - (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?string?"); @@ -5275,14 +5028,13 @@ TestpurebytesobjObjCmd( static int TestbytestringObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { int n = 0; const char *p; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "bytearray"); @@ -5400,7 +5152,7 @@ Testset2Cmd( /* ARGSUSED */ static int TestsaveresultCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp,/* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ @@ -5415,7 +5167,6 @@ TestsaveresultCmd( enum options { RESULT_APPEND, RESULT_DYNAMIC, RESULT_FREE, RESULT_OBJECT, RESULT_SMALL }; - (void)dummy; /* * Parse arguments @@ -5508,9 +5259,8 @@ TestsaveresultCmd( static void TestsaveresultFree( - char *blockPtr) + TCL_UNUSED(char *)) { - (void)blockPtr; freeCount++; } @@ -5533,14 +5283,11 @@ TestsaveresultFree( static int TestmainthreadCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp,/* Current interpreter. */ int argc, /* Number of arguments. */ - const char **argv) /* Argument strings. */ + TCL_UNUSED(const char **) /*argv*/) { - (void)dummy; - (void)argv; - if (argc == 1) { Tcl_Obj *idObj = Tcl_NewWideIntObj((Tcl_WideInt)(size_t)Tcl_GetCurrentThread()); @@ -5597,16 +5344,11 @@ MainLoop(void) static int TestsetmainloopCmd( - void *dummy, /* Not used. */ - Tcl_Interp *interp,/* Current interpreter. */ - int argc, /* Number of arguments. */ - const char **argv) /* Argument strings. */ + TCL_UNUSED(ClientData), + TCL_UNUSED(Tcl_Interp *), + TCL_UNUSED(int) /*argc*/, + TCL_UNUSED(const char **) /*argv*/) { - (void)dummy; - (void)interp; - (void)argc; - (void)argv; - exitMainLoop = 0; Tcl_SetMainLoop(MainLoop); return TCL_OK; @@ -5631,16 +5373,11 @@ TestsetmainloopCmd( static int TestexitmainloopCmd( - void *dummy, /* Not used. */ - Tcl_Interp *interp,/* Current interpreter. */ - int argc, /* Number of arguments. */ - const char **argv) /* Argument strings. */ + TCL_UNUSED(ClientData), + TCL_UNUSED(Tcl_Interp *), + TCL_UNUSED(int) /*argc*/, + TCL_UNUSED(const char **) /*argv*/) { - (void)dummy; - (void)interp; - (void)argc; - (void)argv; - exitMainLoop = 1; return TCL_OK; } @@ -5665,7 +5402,7 @@ TestexitmainloopCmd( /* ARGSUSED */ static int TestChannelCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Interpreter for result. */ int argc, /* Count of additional args. */ const char **argv) /* Additional arg strings. */ @@ -5681,7 +5418,6 @@ TestChannelCmd( int IOQueued; /* How much IO is queued inside channel? */ char buf[TCL_INTEGER_SPACE];/* For sprintf. */ int mode; /* rw mode of the channel */ - (void)dummy; if (argc < 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -6135,7 +5871,7 @@ TestChannelCmd( /* ARGSUSED */ static int TestChannelEventCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -6146,7 +5882,6 @@ TestChannelEventCmd( EventScriptRecord *esPtr, *prevEsPtr, *nextEsPtr; const char *cmd; int index, i, mask, len; - (void)dummy; if ((argc < 3) || (argc > 5)) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -6349,14 +6084,13 @@ TestChannelEventCmd( /* ARGSUSED */ static int TestSocketCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Interpreter for result. */ int argc, /* Count of additional args. */ const char **argv) /* Additional arg strings. */ { const char *cmdName; /* Sub command. */ size_t len; /* Length of subcommand string. */ - (void)dummy; if (argc < 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -6417,14 +6151,13 @@ TestSocketCmd( static int TestWrongNumArgsObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { int i, length; const char *msg; - (void)dummy; if (objc < 3) { /* @@ -6474,7 +6207,7 @@ TestWrongNumArgsObjCmd( static int TestGetIndexFromObjStructObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -6483,7 +6216,6 @@ TestGetIndexFromObjStructObjCmd( "a", "b", "c", "d", "e", "f", NULL, NULL }; int idx,target; - (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "argument targetvalue"); @@ -6529,14 +6261,13 @@ TestGetIndexFromObjStructObjCmd( static int TestFilesystemObjCmd( - void *dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { int res, boolVal; const char *msg; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "boolean"); @@ -6866,12 +6597,10 @@ TestReportUtime( static int TestReportNormalizePath( - Tcl_Interp *dummy, + TCL_UNUSED(Tcl_Interp *), Tcl_Obj *pathPtr, int nextCheckpoint) { - (void)dummy; - TestReport("normalizepath", pathPtr, NULL); return nextCheckpoint; } @@ -6879,10 +6608,9 @@ TestReportNormalizePath( static int SimplePathInFilesystem( Tcl_Obj *pathPtr, - void **dummy) + TCL_UNUSED(ClientData *)) { const char *str = Tcl_GetString(pathPtr); - (void)dummy; if (strncmp(str, "simplefs:/", 10)) { return -1; @@ -6909,14 +6637,13 @@ SimplePathInFilesystem( static int TestSimpleFilesystemObjCmd( - void *dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { int res, boolVal; const char *msg; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "boolean"); @@ -7070,13 +6797,11 @@ SimpleListVolumes(void) static int TestNumUtfCharsCmd( - void *dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - (void)dummy; - if (objc > 1) { int len = -1; @@ -7095,13 +6820,11 @@ TestNumUtfCharsCmd( static int TestFindFirstCmd( - void *dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - (void)dummy; - if (objc > 1) { int len = -1; @@ -7119,13 +6842,11 @@ TestFindFirstCmd( static int TestFindLastCmd( - void *dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - (void)dummy; - if (objc > 1) { int len = -1; @@ -7163,7 +6884,7 @@ TestFindLastCmd( static int TestcpuidCmd( - void *dummy, + TCL_UNUSED(ClientData), Tcl_Interp* interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const * objv) /* Parameter vector */ @@ -7171,7 +6892,6 @@ TestcpuidCmd( int status, index, i; int regs[4]; Tcl_Obj *regsObjs[4]; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "eax"); @@ -7200,7 +6920,7 @@ TestcpuidCmd( static int TestHashSystemHashCmd( - void *dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -7212,7 +6932,6 @@ TestHashSystemHashCmd( Tcl_HashTable hash; Tcl_HashEntry *hPtr; int i, isNew, limit = 100; - (void)dummy; if (objc>1 && Tcl_GetIntFromObj(interp, objv[1], &limit)!=TCL_OK) { return TCL_ERROR; @@ -7277,13 +6996,11 @@ TestHashSystemHashCmd( */ static int TestgetintCmd( - void *dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int argc, const char **argv) { - (void)dummy; - if (argc < 2) { Tcl_AppendResult(interp, "wrong # args", NULL); return TCL_ERROR; @@ -7306,14 +7023,11 @@ TestgetintCmd( */ static int TestlongsizeCmd( - void *dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int argc, - const char **argv) + TCL_UNUSED(const char **) /*argv*/) { - (void)dummy; - (void)argv; - if (argc != 1) { Tcl_AppendResult(interp, "wrong # args", NULL); return TCL_ERROR; @@ -7326,10 +7040,9 @@ static int NREUnwind_callback( void *data[], Tcl_Interp *interp, - int result) + TCL_UNUSED(int) /*result*/) { int none; - (void)result; if (data[0] == INT2PTR(-1)) { Tcl_NRAddCallback(interp, NREUnwind_callback, &none, INT2PTR(-1), @@ -7352,14 +7065,11 @@ NREUnwind_callback( static int TestNREUnwind( - void *dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, - int objc, - Tcl_Obj *const objv[]) + TCL_UNUSED(int) /*objc*/, + TCL_UNUSED(Tcl_Obj *const *) /*objv*/) { - (void)dummy; - (void)objc; - (void)objv; /* * Insure that callbacks effectively run at the proper level during the * unwinding of the NRE stack. @@ -7373,10 +7083,10 @@ TestNREUnwind( static int TestNRELevels( - void *dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, - int objc, - Tcl_Obj *const objv[]) + TCL_UNUSED(int) /*objc*/, + TCL_UNUSED(Tcl_Obj *const *) /*objv*/) { Interp *iPtr = (Interp *) interp; static ptrdiff_t *refDepth = NULL; @@ -7384,9 +7094,6 @@ TestNRELevels( Tcl_Obj *levels[6]; int i = 0; NRE_callback *cbPtr = iPtr->execEnvPtr->callbackPtr; - (void)dummy; - (void)objc; - (void)objv; if (refDepth == NULL) { refDepth = &depth; @@ -7432,17 +7139,14 @@ TestNRELevels( static int TestconcatobjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ - int argc, /* Number of arguments. */ - const char **argv) /* Argument strings. */ + TCL_UNUSED(int) /*argc*/, + TCL_UNUSED(const char **) /*argv*/) { Tcl_Obj *list1Ptr, *list2Ptr, *emptyPtr, *concatPtr, *tmpPtr; int result = TCL_OK, len; Tcl_Obj *objv[3]; - (void)dummy; - (void)argc; - (void)argv; /* * Set the start of the error message as obj result; it will be cleared at @@ -7731,13 +7435,11 @@ TestconcatobjCmd( static int TestgetencpathObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* Argument strings. */ { - (void)dummy; - if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, ""); return TCL_ERROR; @@ -7766,13 +7468,11 @@ TestgetencpathObjCmd( static int TestsetencpathObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* Argument strings. */ { - (void)dummy; - if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "defaultDir"); return TCL_ERROR; @@ -7802,7 +7502,7 @@ TestsetencpathObjCmd( static int TestparseargsCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Arguments. */ @@ -7814,7 +7514,6 @@ TestparseargsCmd( {TCL_ARGV_CONSTANT, "-bool", INT2PTR(1), &foo, "booltest", NULL}, TCL_ARGV_AUTO_REST, TCL_ARGV_AUTO_HELP, TCL_ARGV_TABLE_END }; - (void)dummy; foo = 0; if (Tcl_ParseArgsObjv(interp, argTable, &count, objv, &remObjv)!=TCL_OK) { @@ -7836,8 +7535,8 @@ static int InterpCmdResolver( Tcl_Interp *interp, const char *name, - Tcl_Namespace *context, - int flags, + TCL_UNUSED(Tcl_Namespace *), + TCL_UNUSED(int) /*flags*/, Tcl_Command *rPtr) { Interp *iPtr = (Interp *) interp; @@ -7846,8 +7545,6 @@ InterpCmdResolver( varFramePtr->procPtr : NULL; Namespace *callerNsPtr = varFramePtr->nsPtr; Tcl_Command resolvedCmdPtr = NULL; - (void)context; - (void)flags; /* * Just do something special on a cmd literal "z" in two cases: @@ -7929,18 +7626,12 @@ InterpCmdResolver( static int InterpVarResolver( - Tcl_Interp *interp, - const char *name, - Tcl_Namespace *context, - int flags, - Tcl_Var *rPtr) + TCL_UNUSED(Tcl_Interp *), + TCL_UNUSED(const char *), + TCL_UNUSED(Tcl_Namespace *), + TCL_UNUSED(int), + TCL_UNUSED(Tcl_Var *)) { - (void)interp; - (void)name; - (void)context; - (void)flags; - (void)rPtr; - /* * Don't resolve the variable; use standard rules. */ @@ -8028,16 +7719,12 @@ MyCompiledVarFetch( static int InterpCompiledVarResolver( - Tcl_Interp *dummy, + TCL_UNUSED(Tcl_Interp *), const char *name, - int length, - Tcl_Namespace *context, + TCL_UNUSED(int) /*length*/, + TCL_UNUSED(Tcl_Namespace *), Tcl_ResolvedVarInfo **rPtr) { - (void)dummy; - (void)length; - (void)context; - if (*name == 'T') { MyResolvedVarInfo *resVarInfo = (MyResolvedVarInfo *)ckalloc(sizeof(MyResolvedVarInfo)); @@ -8054,7 +7741,7 @@ InterpCompiledVarResolver( static int TestInterpResolverCmd( - void *dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -8064,7 +7751,6 @@ TestInterpResolverCmd( }; int idx; #define RESOLVER_KEY "testInterpResolver" - (void)dummy; if ((objc < 2) || (objc > 3)) { Tcl_WrongNumArgs(interp, 1, objv, "up|down ?interp?"); diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index cfe7886..bfd0a45 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -42,23 +42,14 @@ static int CheckIfVarUnset(Tcl_Interp *interp, Tcl_Obj **varPtr, int varIndex); static int GetVariableIndex(Tcl_Interp *interp, const char *string, int *indexPtr); static void SetVarToObj(Tcl_Obj **varPtr, int varIndex, Tcl_Obj *objPtr); -static int TestbignumobjCmd(void *dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static int TestbooleanobjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestdoubleobjCmd(void *dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static int TestindexobjCmd(void *dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static int TestintobjCmd(void *dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static int TestlistobjCmd(void *dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static int TestobjCmd(void *dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static int TeststringobjCmd(void *dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc TestbignumobjCmd; +static Tcl_ObjCmdProc TestbooleanobjCmd; +static Tcl_ObjCmdProc TestdoubleobjCmd; +static Tcl_ObjCmdProc TestindexobjCmd; +static Tcl_ObjCmdProc TestintobjCmd; +static Tcl_ObjCmdProc TestlistobjCmd; +static Tcl_ObjCmdProc TestobjCmd; +static Tcl_ObjCmdProc TeststringobjCmd; #define VARPTR_KEY "TCLOBJTEST_VARPTR" #define NUMBER_OF_OBJECT_VARS 20 @@ -158,7 +149,7 @@ TclObjTest_Init( static int TestbignumobjCmd( - void *dummy, /* unused */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Argument count */ Tcl_Obj *const objv[]) /* Argument vector */ @@ -174,7 +165,6 @@ TestbignumobjCmd( const char *string; mp_int bignumValue; Tcl_Obj **varPtr; - (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); @@ -358,7 +348,7 @@ TestbignumobjCmd( static int TestbooleanobjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -366,7 +356,6 @@ TestbooleanobjCmd( int varIndex, boolValue; const char *index, *subCmd; Tcl_Obj **varPtr; - (void)dummy; if (objc < 3) { wrongNumArgs: @@ -459,7 +448,7 @@ TestbooleanobjCmd( static int TestdoubleobjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -468,7 +457,6 @@ TestdoubleobjCmd( double doubleValue; const char *index, *subCmd, *string; Tcl_Obj **varPtr; - (void)dummy; if (objc < 3) { wrongNumArgs: @@ -578,7 +566,7 @@ TestdoubleobjCmd( static int TestindexobjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -596,7 +584,6 @@ TestindexobjCmd( int index; /* Selected index into table. */ }; struct IndexRep *indexRep; - (void)dummy; if ((objc == 3) && (strcmp(Tcl_GetString(objv[1]), "check") == 0)) { @@ -669,7 +656,7 @@ TestindexobjCmd( static int TestintobjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -678,7 +665,6 @@ TestintobjCmd( Tcl_WideInt wideValue; const char *index, *subCmd, *string; Tcl_Obj **varPtr; - (void)dummy; if (objc < 3) { wrongNumArgs: @@ -874,7 +860,7 @@ TestintobjCmd( static int TestlistobjCmd( - void *dummy, /* Not used */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Number of arguments */ Tcl_Obj *const objv[]) /* Argument objects */ @@ -897,7 +883,6 @@ TestlistobjCmd( int first; /* First index in the list */ int count; /* Count of elements in a list */ Tcl_Obj **varPtr; - (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg...?"); @@ -972,7 +957,7 @@ TestlistobjCmd( static int TestobjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -981,7 +966,6 @@ TestobjCmd( const char *index, *subCmd, *string; const Tcl_ObjType *targetType; Tcl_Obj **varPtr; - (void)dummy; if (objc < 2) { wrongNumArgs: @@ -1185,7 +1169,7 @@ TestobjCmd( static int TeststringobjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -1201,7 +1185,6 @@ TeststringobjCmd( "set", "set2", "setlength", "maxchars", "appendself", "appendself2", NULL }; - (void)dummy; if (objc < 3) { wrongNumArgs: diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index b6ac741..09dfbef 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -228,7 +228,7 @@ ProcBodyTestInitInternal( static int ProcBodyTestProcObjCmd( - void *dummy, /* context; not used */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* the current interpreter */ int objc, /* argument count */ Tcl_Obj *const objv[]) /* arguments */ @@ -240,7 +240,6 @@ ProcBodyTestProcObjCmd( Tcl_Obj *bodyObjPtr; Tcl_Obj *myobjv[5]; int result; - (void)dummy; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "newName argsList bodyName"); @@ -328,13 +327,12 @@ ProcBodyTestProcObjCmd( static int ProcBodyTestCheckObjCmd( - void *dummy, /* context; not used */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* the current interpreter */ int objc, /* argument count */ Tcl_Obj *const objv[]) /* arguments */ { const char *version; - (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, ""); diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c index 1248f5d..1aa2be1 100644 --- a/generic/tclThreadAlloc.c +++ b/generic/tclThreadAlloc.c @@ -872,11 +872,9 @@ LockBucket( static void UnlockBucket( - Cache *cachePtr, + TCL_UNUSED(Cache *), int bucket) { - (void)cachePtr; - Tcl_MutexUnlock(bucketInfo[bucket].lockPtr); } diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 7fc748e..961a56a 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -206,7 +206,7 @@ TclThread_Init( /* ARGSUSED */ static int ThreadObjCmd( - void *dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -223,7 +223,6 @@ ThreadObjCmd( THREAD_ID, THREAD_JOIN, THREAD_NAMES, THREAD_SEND, THREAD_WAIT, THREAD_ERRORPROC }; - (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); @@ -1011,7 +1010,7 @@ ThreadCancel( static int ThreadEventProc( Tcl_Event *evPtr, /* Really ThreadEvent */ - int mask) + TCL_UNUSED(int) /*mask*/) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); ThreadEvent *threadEventPtr = (ThreadEvent *) evPtr; @@ -1019,7 +1018,6 @@ ThreadEventProc( Tcl_Interp *interp = tsdPtr->interp; int code; const char *result, *errorCode, *errorInfo; - (void)mask; if (interp == NULL) { code = TCL_ERROR; @@ -1111,10 +1109,8 @@ ThreadFreeProc( static int ThreadDeleteEvent( Tcl_Event *eventPtr, /* Really ThreadEvent */ - void *dummy) /* dummy */ + TCL_UNUSED(ClientData)) { - (void)dummy; - if (eventPtr->proc == ThreadEventProc) { ckfree(((ThreadEvent *) eventPtr)->script); return 1; |