From d7e40d6078e6bc31504c29f947a47bb5ab36fe51 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 6 Mar 2020 16:42:07 +0000 Subject: More TCL_UNUSED deployment --- generic/tclClock.c | 15 ++-- generic/tclCmdAH.c | 205 ++++++++++++++++++----------------------------------- 2 files changed, 73 insertions(+), 147 deletions(-) diff --git a/generic/tclClock.c b/generic/tclClock.c index 0aa1527..baaa568 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -1645,14 +1645,13 @@ WeekdayOnOrBefore( int ClockGetenvObjCmd( - ClientData clientData, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { const char *varName; const char *varValue; - (void)clientData; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1731,7 +1730,7 @@ ThreadSafeLocalTime( int ClockClicksObjCmd( - ClientData clientData, /* Client data is unused */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const *objv) /* Parameter values */ @@ -1745,7 +1744,6 @@ ClockClicksObjCmd( int index = CLICKS_NATIVE; Tcl_Time now; Tcl_WideInt clicks = 0; - (void)clientData; switch (objc) { case 1: @@ -1802,13 +1800,12 @@ ClockClicksObjCmd( int ClockMillisecondsObjCmd( - ClientData clientData, /* Client data is unused */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const *objv) /* Parameter values */ { Tcl_Time now; - (void)clientData; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1840,12 +1837,11 @@ ClockMillisecondsObjCmd( int ClockMicrosecondsObjCmd( - ClientData clientData, /* Client data is unused */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const *objv) /* Parameter values */ { - (void)clientData; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; @@ -1992,13 +1988,12 @@ ClockParseformatargsObjCmd( int ClockSecondsObjCmd( - ClientData clientData, /* Client data is unused */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ 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 f2db757..bd65f04 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -45,21 +45,11 @@ struct ForeachState { static int CheckAccess(Tcl_Interp *interp, Tcl_Obj *pathPtr, int mode); -static int EncodingConvertfromObjCmd(ClientData dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int EncodingConverttoObjCmd(ClientData dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int EncodingDirsObjCmd(ClientData dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int EncodingNamesObjCmd(ClientData dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int EncodingSystemObjCmd(ClientData dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc EncodingConvertfromObjCmd; +static Tcl_ObjCmdProc EncodingConverttoObjCmd; +static Tcl_ObjCmdProc EncodingDirsObjCmd; +static Tcl_ObjCmdProc EncodingNamesObjCmd; +static Tcl_ObjCmdProc EncodingSystemObjCmd; static inline int ForeachAssignments(Tcl_Interp *interp, struct ForeachState *statePtr); static inline void ForeachCleanup(Tcl_Interp *interp, @@ -130,13 +120,11 @@ static Tcl_ObjCmdProc PathTypeCmd; /* ARGSUSED */ int Tcl_BreakObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ 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; @@ -165,7 +153,7 @@ Tcl_BreakObjCmd( /* ARGSUSED */ int Tcl_CaseObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -175,7 +163,6 @@ Tcl_CaseObjCmd( const char *stringPtr, *arg; Tcl_Obj *const *caseObjv; Tcl_Obj *armPtr; - (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, @@ -302,17 +289,17 @@ Tcl_CaseObjCmd( /* ARGSUSED */ int Tcl_CatchObjCmd( - ClientData dummy, /* Not used. */ + ClientData clientData, Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return Tcl_NRCallObjProc(interp, TclNRCatchObjCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNRCatchObjCmd, clientData, objc, objv); } int TclNRCatchObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -320,7 +307,6 @@ 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, @@ -409,14 +395,13 @@ CatchObjCmdCallback( /* ARGSUSED */ int Tcl_CdObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *dir; int result; - (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?dirName?"); @@ -466,13 +451,11 @@ Tcl_CdObjCmd( /* ARGSUSED */ int Tcl_ConcatObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ 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)); } @@ -503,13 +486,11 @@ Tcl_ConcatObjCmd( /* ARGSUSED */ int Tcl_ContinueObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ 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; @@ -565,7 +546,7 @@ TclInitEncodingCmd( int EncodingConvertfromObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -575,7 +556,6 @@ 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,7 +608,7 @@ EncodingConvertfromObjCmd( int EncodingConverttoObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -638,7 +618,6 @@ 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 */ @@ -693,13 +672,12 @@ EncodingConverttoObjCmd( int EncodingDirsObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *dirListObj; - (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?dirList?"); @@ -738,13 +716,11 @@ EncodingDirsObjCmd( int 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 */ + TCL_UNUSED(ClientData), + 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; @@ -771,13 +747,11 @@ EncodingNamesObjCmd( int 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 */ + TCL_UNUSED(ClientData), + 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; @@ -811,13 +785,12 @@ EncodingSystemObjCmd( /* ARGSUSED */ int Tcl_ErrorObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ 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?"); @@ -862,12 +835,10 @@ Tcl_ErrorObjCmd( /* ARGSUSED */ static int EvalCmdErrMsg( - ClientData dummy[], + TCL_UNUSED(ClientData *), Tcl_Interp *interp, int result) { - (void)dummy; - if (result == TCL_ERROR) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (\"eval\" body line %d)", Tcl_GetErrorLine(interp))); @@ -877,17 +848,17 @@ EvalCmdErrMsg( int Tcl_EvalObjCmd( - ClientData dummy, /* Not used. */ + ClientData clientData, Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return Tcl_NRCallObjProc(interp, TclNREvalObjCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNREvalObjCmd, clientData, objc, objv); } int TclNREvalObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -896,7 +867,6 @@ TclNREvalObjCmd( Interp *iPtr = (Interp *) interp; CmdFrame *invoker = NULL; int word = 0; - (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "arg ?arg ...?"); @@ -948,13 +918,12 @@ TclNREvalObjCmd( /* ARGSUSED */ int Tcl_ExitObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_WideInt value; - (void)dummy; if ((objc != 1) && (objc != 2)) { Tcl_WrongNumArgs(interp, 1, objv, "?returnCode?"); @@ -998,23 +967,22 @@ Tcl_ExitObjCmd( /* ARGSUSED */ int Tcl_ExprObjCmd( - ClientData dummy, /* Not used. */ + ClientData clientData, Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return Tcl_NRCallObjProc(interp, TclNRExprObjCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNRExprObjCmd, clientData, objc, objv); } int TclNRExprObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *resultPtr, *objPtr; - (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "arg ?arg ...?"); @@ -1145,14 +1113,13 @@ TclInitFileCmd( static int FileAttrAccessTimeCmd( - ClientData dummy, + TCL_UNUSED(ClientData), 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?"); @@ -1228,14 +1195,13 @@ FileAttrAccessTimeCmd( static int FileAttrModifyTimeCmd( - ClientData dummy, + TCL_UNUSED(ClientData), 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?"); @@ -1308,13 +1274,12 @@ FileAttrModifyTimeCmd( static int FileAttrLinkStatCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_StatBuf buf; - (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "name varName"); @@ -1345,13 +1310,12 @@ FileAttrLinkStatCmd( static int FileAttrStatCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_StatBuf buf; - (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "name varName"); @@ -1382,13 +1346,12 @@ FileAttrStatCmd( static int FileAttrTypeCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_StatBuf buf; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1421,13 +1384,12 @@ FileAttrTypeCmd( static int FileAttrSizeCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_StatBuf buf; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1459,14 +1421,13 @@ FileAttrSizeCmd( static int FileAttrIsDirectoryCmd( - ClientData dummy, + TCL_UNUSED(ClientData), 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"); @@ -1498,13 +1459,11 @@ FileAttrIsDirectoryCmd( static int FileAttrIsExecutableCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - (void)dummy; - if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); return TCL_ERROR; @@ -1531,13 +1490,11 @@ FileAttrIsExecutableCmd( static int FileAttrIsExistingCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - (void)dummy; - if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); return TCL_ERROR; @@ -1564,14 +1521,13 @@ FileAttrIsExistingCmd( static int FileAttrIsFileCmd( - ClientData dummy, + TCL_UNUSED(ClientData), 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"); @@ -1603,7 +1559,7 @@ FileAttrIsFileCmd( static int FileAttrIsOwnedCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1615,7 +1571,6 @@ FileAttrIsOwnedCmd( Tcl_StatBuf buf; #endif int value = 0; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1651,13 +1606,11 @@ FileAttrIsOwnedCmd( static int FileAttrIsReadableCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - (void)dummy; - if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); return TCL_ERROR; @@ -1684,13 +1637,11 @@ FileAttrIsReadableCmd( static int FileAttrIsWritableCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - (void)dummy; - if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); return TCL_ERROR; @@ -1717,13 +1668,12 @@ FileAttrIsWritableCmd( static int PathDirNameCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *dirPtr; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1757,13 +1707,12 @@ PathDirNameCmd( static int PathExtensionCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *dirPtr; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1797,13 +1746,12 @@ PathExtensionCmd( static int PathRootNameCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *dirPtr; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1837,13 +1785,12 @@ PathRootNameCmd( static int PathTailCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *dirPtr; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1877,13 +1824,12 @@ PathTailCmd( static int PathFilesystemCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *fsInfo; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1919,13 +1865,11 @@ PathFilesystemCmd( static int PathJoinCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - (void)dummy; - if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "name ?name ...?"); return TCL_ERROR; @@ -1953,13 +1897,12 @@ PathJoinCmd( static int PathNativeNameCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_DString ds; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1991,13 +1934,12 @@ PathNativeNameCmd( static int PathNormalizeCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *fileName; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -2030,13 +1972,12 @@ PathNormalizeCmd( static int PathSplitCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *res; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -2074,13 +2015,12 @@ PathSplitCmd( static int PathTypeCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *typeName; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -2123,13 +2063,11 @@ PathTypeCmd( static int FilesystemSeparatorCmd( - ClientData dummy, + TCL_UNUSED(ClientData), 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; @@ -2180,13 +2118,11 @@ FilesystemSeparatorCmd( static int FilesystemVolumesCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - (void)dummy; - if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; @@ -2443,24 +2379,23 @@ GetTypeFromMode( /* ARGSUSED */ int Tcl_ForObjCmd( - ClientData dummy, /* Not used. */ + ClientData clientData, Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return Tcl_NRCallObjProc(interp, TclNRForObjCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNRForObjCmd, clientData, objc, objv); } int TclNRForObjCmd( - 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; ForIterData *iterPtr; - (void)dummy; if (objc != 5) { Tcl_WrongNumArgs(interp, 1, objv, "start test next command"); @@ -2639,44 +2574,41 @@ ForPostNextCallback( /* ARGSUSED */ int Tcl_ForeachObjCmd( - ClientData dummy, /* Not used. */ + ClientData clientData, Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return Tcl_NRCallObjProc(interp, TclNRForeachCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNRForeachCmd, clientData, objc, objv); } int TclNRForeachCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - (void)dummy; - return EachloopCmd(interp, TCL_EACH_KEEP_NONE, objc, objv); } int Tcl_LmapObjCmd( - ClientData dummy, /* Not used. */ + ClientData clientData, Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return Tcl_NRCallObjProc(interp, TclNRLmapCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNRLmapCmd, clientData, objc, objv); } int TclNRLmapCmd( - ClientData dummy, + TCL_UNUSED(ClientData), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - (void)dummy; return EachloopCmd(interp, TCL_EACH_COLLECT, objc, objv); } @@ -2960,13 +2892,12 @@ ForeachCleanup( /* ARGSUSED */ int Tcl_FormatObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ 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 ...?"); -- cgit v0.12