summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-03-08 13:58:07 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-03-08 13:58:07 (GMT)
commit085094bd8714e2c46e3f098189728bb966eb3fb0 (patch)
treef4356570ef34bccd58b4fe5919622104963e6ed7
parent89b0bdb8829f03a5216972f59d54b3fa8a1bef16 (diff)
downloadtcl-085094bd8714e2c46e3f098189728bb966eb3fb0.zip
tcl-085094bd8714e2c46e3f098189728bb966eb3fb0.tar.gz
tcl-085094bd8714e2c46e3f098189728bb966eb3fb0.tar.bz2
More TCL_UNUSED.
-rw-r--r--generic/tclObj.c118
-rw-r--r--generic/tclPathObj.c9
-rw-r--r--generic/tclPkg.c32
-rw-r--r--generic/tclProc.c31
-rw-r--r--generic/tclProcess.c12
-rw-r--r--generic/tclRegexp.c3
-rw-r--r--generic/tclScan.c3
7 files changed, 85 insertions, 123 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index bc1953a..efa63dc 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -783,7 +783,7 @@ TclContinuationsGet(
static void
TclThreadFinalizeContLines(
- ClientData dummy)
+ TCL_UNUSED(ClientData))
{
/*
* Release the hashtable tracking invisible continuation lines.
@@ -792,7 +792,6 @@ TclThreadFinalizeContLines(
ThreadSpecificData *tsdPtr = TclGetContLineTable();
Tcl_HashEntry *hPtr;
Tcl_HashSearch hSearch;
- (void)dummy;
for (hPtr = Tcl_FirstHashEntry(tsdPtr->lineCLPtr, &hSearch);
hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) {
@@ -993,11 +992,11 @@ Tcl_ConvertToType(
*--------------------------------------------------------------
*/
+#if TCL_THREADS && defined(TCL_MEM_DEBUG)
void
TclDbDumpActiveObjects(
FILE *outFile)
{
-#if TCL_THREADS && defined(TCL_MEM_DEBUG)
Tcl_HashSearch hSearch;
Tcl_HashEntry *hPtr;
Tcl_HashTable *tablePtr;
@@ -1022,10 +1021,14 @@ TclDbDumpActiveObjects(
}
}
}
+}
#else
- (void)outFile;
-#endif
+void
+TclDbDumpActiveObjects(
+ TCL_UNUSED(FILE *))
+{
}
+#endif
/*
*----------------------------------------------------------------------
@@ -1195,14 +1198,9 @@ Tcl_DbNewObj(
Tcl_Obj *
Tcl_DbNewObj(
- 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_NewObj();
}
#endif /* TCL_MEM_DEBUG */
@@ -2036,14 +2034,9 @@ Tcl_DbNewBooleanObj(
Tcl_Obj *
Tcl_DbNewBooleanObj(
int boolValue, /* Boolean used to initialize new object. */
- 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_NewBooleanObj(boolValue);
}
#endif /* TCL_MEM_DEBUG */
@@ -2426,14 +2419,9 @@ Tcl_DbNewDoubleObj(
Tcl_Obj *
Tcl_DbNewDoubleObj(
double dblValue, /* Double used to initialize the object. */
- 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_NewDoubleObj(dblValue);
}
#endif /* TCL_MEM_DEBUG */
@@ -2913,14 +2901,9 @@ Tcl_Obj *
Tcl_DbNewLongObj(
long longValue, /* Long integer used to initialize the new
* object. */
- 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_NewWideIntObj(longValue);
}
#endif /* TCL_MEM_DEBUG */
@@ -3182,14 +3165,9 @@ Tcl_DbNewWideIntObj(
Tcl_WideInt wideValue,
/* Long integer used to initialize the new
* object. */
- 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_NewWideIntObj(wideValue);
}
#endif /* TCL_MEM_DEBUG */
@@ -3567,12 +3545,9 @@ Tcl_DbNewBignumObj(
Tcl_Obj *
Tcl_DbNewBignumObj(
void *bignumValue,
- const char *file,
- int line)
+ TCL_UNUSED(const char *) /*file*/,
+ TCL_UNUSED(int) /*line*/)
{
- (void)file;
- (void)line;
-
return Tcl_NewBignumObj(bignumValue);
}
#endif
@@ -3956,6 +3931,7 @@ Tcl_IsShared(
*----------------------------------------------------------------------
*/
+#ifdef TCL_MEM_DEBUG
void
Tcl_DbIncrRefCount(
Tcl_Obj *objPtr, /* The object we are registering a reference
@@ -3965,7 +3941,6 @@ Tcl_DbIncrRefCount(
int line) /* Line number in the source file; used for
* debugging. */
{
-#ifdef TCL_MEM_DEBUG
if (objPtr->refCount == 0x61616161) {
fprintf(stderr, "file = %s, line = %d\n", file, line);
fflush(stderr);
@@ -3994,12 +3969,19 @@ Tcl_DbIncrRefCount(
}
}
# endif /* TCL_THREADS */
-#else
- (void)file;
- (void)line;
-#endif /* TCL_MEM_DEBUG */
++(objPtr)->refCount;
}
+#else /* !TCL_MEM_DEBUG */
+void
+Tcl_DbIncrRefCount(
+ Tcl_Obj *objPtr, /* The object we are registering a reference
+ * to. */
+ TCL_UNUSED(const char *) /*file*/,
+ TCL_UNUSED(int) /*line*/)
+{
+ ++(objPtr)->refCount;
+}
+#endif /* TCL_MEM_DEBUG */
/*
*----------------------------------------------------------------------
@@ -4022,6 +4004,7 @@ Tcl_DbIncrRefCount(
*----------------------------------------------------------------------
*/
+#ifdef TCL_MEM_DEBUG
void
Tcl_DbDecrRefCount(
Tcl_Obj *objPtr, /* The object we are releasing a reference
@@ -4031,7 +4014,6 @@ Tcl_DbDecrRefCount(
int line) /* Line number in the source file; used for
* debugging. */
{
-#ifdef TCL_MEM_DEBUG
if (objPtr->refCount == 0x61616161) {
fprintf(stderr, "file = %s, line = %d\n", file, line);
fflush(stderr);
@@ -4060,15 +4042,24 @@ Tcl_DbDecrRefCount(
}
}
# endif /* TCL_THREADS */
-#else
- (void)file;
- (void)line;
-#endif /* TCL_MEM_DEBUG */
if (objPtr->refCount-- <= 1) {
TclFreeObj(objPtr);
}
}
+#else /* !TCL_MEM_DEBUG */
+void
+Tcl_DbDecrRefCount(
+ Tcl_Obj *objPtr, /* The object we are releasing a reference
+ * to. */
+ TCL_UNUSED(const char *) /*file*/,
+ TCL_UNUSED(int) /*line*/)
+{
+ if (objPtr->refCount-- <= 1) {
+ TclFreeObj(objPtr);
+ }
+}
+#endif /* TCL_MEM_DEBUG */
/*
*----------------------------------------------------------------------
@@ -4094,10 +4085,15 @@ Tcl_DbDecrRefCount(
int
Tcl_DbIsShared(
Tcl_Obj *objPtr, /* The object to test for being shared. */
+#ifdef TCL_MEM_DEBUG
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. */
+#else
+ TCL_UNUSED(const char *) /*file*/,
+ TCL_UNUSED(int) /*line*/)
+#endif
{
#ifdef TCL_MEM_DEBUG
if (objPtr->refCount == 0x61616161) {
@@ -4128,9 +4124,6 @@ Tcl_DbIsShared(
}
}
# endif /* TCL_THREADS */
-#else
- (void)file;
- (void)line;
#endif /* TCL_MEM_DEBUG */
#ifdef TCL_COMPILE_STATS
@@ -4194,12 +4187,11 @@ Tcl_InitObjHashTable(
static Tcl_HashEntry *
AllocObjEntry(
- Tcl_HashTable *dummy, /* Hash table. */
+ TCL_UNUSED(Tcl_HashTable *),
void *keyPtr) /* Key to store in the hash table entry. */
{
Tcl_Obj *objPtr = (Tcl_Obj *)keyPtr;
Tcl_HashEntry *hPtr = (Tcl_HashEntry *)ckalloc(sizeof(Tcl_HashEntry));
- (void)dummy;
hPtr->key.objPtr = objPtr;
Tcl_IncrRefCount(objPtr);
@@ -4316,14 +4308,13 @@ TclFreeObjEntry(
TCL_HASH_TYPE
TclHashObjKey(
- Tcl_HashTable *dummy, /* Hash table. */
+ TCL_UNUSED(Tcl_HashTable *),
void *keyPtr) /* Key from which to compute hash value. */
{
Tcl_Obj *objPtr = (Tcl_Obj *)keyPtr;
int length;
const char *string = TclGetStringFromObj(objPtr, &length);
TCL_HASH_TYPE result = 0;
- (void)dummy;
/*
* I tried a zillion different hash functions and asked many other people
@@ -4718,13 +4709,12 @@ SetCmdNameFromAny(
int
Tcl_RepresentationCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *descObj;
- (void)dummy;
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "value");
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index 7accfa2..32b2961 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -1385,14 +1385,13 @@ AppendPath(
Tcl_Obj *
TclFSMakePathRelative(
- Tcl_Interp *dummy, /* Used for error reporting if not NULL. */
+ TCL_UNUSED(Tcl_Interp *),
Tcl_Obj *pathPtr, /* The path we have. */
Tcl_Obj *cwdPtr) /* Make it relative to this. */
{
int cwdLen, len;
const char *tempStr;
Tcl_ObjIntRep *irPtr = TclFetchIntRep(pathPtr, &fsPathType);
- (void)dummy;
if (irPtr) {
FsPath *fsPathPtr = PATHOBJ(pathPtr);
@@ -1457,11 +1456,10 @@ TclFSMakePathRelative(
static int
MakePathFromNormalized(
- Tcl_Interp *dummy, /* Not used. */
+ TCL_UNUSED(Tcl_Interp *),
Tcl_Obj *pathPtr) /* The object to convert. */
{
FsPath *fsPathPtr;
- (void)dummy;
if (TclHasIntRep(pathPtr, &fsPathType)) {
return TCL_OK;
@@ -2512,9 +2510,8 @@ UpdateStringOfFsPath(
int
TclNativePathInFilesystem(
Tcl_Obj *pathPtr,
- ClientData *dummy)
+ TCL_UNUSED(ClientData *))
{
- (void)dummy;
/*
* A special case is required to handle the empty path "". This is a valid
* path (i.e. the user should be able to do 'file exists ""' without
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 0a32f48..bb3795b 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -226,12 +226,11 @@ Tcl_PkgProvideEx(
static void
PkgFilesCleanupProc(
ClientData clientData,
- Tcl_Interp *dummy)
+ TCL_UNUSED(Tcl_Interp *))
{
PkgFiles *pkgFiles = (PkgFiles *) clientData;
Tcl_HashSearch search;
Tcl_HashEntry *entry;
- (void)dummy;
while (pkgFiles->names) {
PkgName *name = pkgFiles->names;
@@ -460,14 +459,13 @@ static int
PkgRequireCore(
ClientData data[],
Tcl_Interp *interp,
- int result)
+ TCL_UNUSED(int))
{
const char *name = (const char *)data[0];
int reqc = PTR2INT(data[1]);
Tcl_Obj **reqv = (Tcl_Obj **)data[2];
int code = CheckAllRequirements(interp, reqc, reqv);
Require *reqPtr;
- (void)result;
if (code != TCL_OK) {
return code;
@@ -492,7 +490,7 @@ static int
PkgRequireCoreStep1(
ClientData data[],
Tcl_Interp *interp,
- int result)
+ TCL_UNUSED(int))
{
Tcl_DString command;
char *script;
@@ -500,7 +498,6 @@ PkgRequireCoreStep1(
int reqc = PTR2INT(data[1]);
Tcl_Obj **const reqv = (Tcl_Obj **)data[2];
const char *name = reqPtr->name /* Name of desired package. */;
- (void)result;
/*
* If we've got the package in the DB already, go on to actually loading
@@ -587,7 +584,7 @@ static int
PkgRequireCoreFinal(
ClientData data[],
Tcl_Interp *interp,
- int result)
+ TCL_UNUSED(int))
{
Require *reqPtr = (Require *)data[0];
int reqc = PTR2INT(data[1]), satisfies;
@@ -595,7 +592,6 @@ PkgRequireCoreFinal(
char *pkgVersionI;
void *clientDataPtr = reqPtr->clientDataPtr;
const char *name = reqPtr->name; /* Name of desired package. */
- (void)result;
if (reqPtr->pkgPtr->version == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -639,11 +635,9 @@ PkgRequireCoreFinal(
static int
PkgRequireCoreCleanup(
ClientData data[],
- Tcl_Interp *dummy,
+ TCL_UNUSED(Tcl_Interp *),
int result)
{
- (void)dummy;
-
ckfree(data[0]);
return result;
}
@@ -652,7 +646,7 @@ static int
SelectPackage(
ClientData data[],
Tcl_Interp *interp,
- int result)
+ TCL_UNUSED(int))
{
PkgAvail *availPtr, *bestPtr, *bestStablePtr;
char *availVersion, *bestVersion, *bestStableVersion;
@@ -664,7 +658,6 @@ SelectPackage(
const char *name = reqPtr->name;
Package *pkgPtr = reqPtr->pkgPtr;
Interp *iPtr = (Interp *) interp;
- (void)result;
/*
* Check whether we're already attempting to load some version of this
@@ -1059,20 +1052,18 @@ Tcl_PkgPresentEx(
*/
int
Tcl_PackageObjCmd(
- ClientData dummy, /* Not used. */
+ ClientData clientData,
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- (void)dummy;
-
- return Tcl_NRCallObjProc(interp, TclNRPackageObjCmd, NULL, objc, objv);
+ return Tcl_NRCallObjProc(interp, TclNRPackageObjCmd, clientData, objc, objv);
}
/* ARGSUSED */
int
TclNRPackageObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -1098,7 +1089,6 @@ TclNRPackageObjCmd(
const char *argv2, *argv3, *argv4;
char *iva = NULL, *ivb = NULL;
Tcl_Obj *objvListPtr, **newObjvPtr;
- (void)dummy;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
@@ -1546,11 +1536,9 @@ TclNRPackageObjCmd(
static int
TclNRPackageObjCmdCleanup(
ClientData data[],
- Tcl_Interp *dummy,
+ TCL_UNUSED(Tcl_Interp *),
int result)
{
- (void)dummy;
-
TclDecrRefCount((Tcl_Obj *) data[0]);
TclDecrRefCount((Tcl_Obj *) data[1]);
return result;
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 81da618..9951249 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -34,8 +34,7 @@ typedef struct {
static void DupLambdaInternalRep(Tcl_Obj *objPtr,
Tcl_Obj *copyPtr);
static void FreeLambdaInternalRep(Tcl_Obj *objPtr);
-static int InitArgsAndLocals(Tcl_Interp *interp,
- Tcl_Obj *procNameObj, int skip);
+static int InitArgsAndLocals(Tcl_Interp *interp, int skip);
static void InitResolvedLocals(Tcl_Interp *interp,
ByteCode *codePtr, Var *defPtr,
Namespace *nsPtr);
@@ -152,7 +151,7 @@ static const Tcl_ObjType lambdaType = {
/* ARGSUSED */
int
Tcl_ProcObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -163,7 +162,6 @@ Tcl_ProcObjCmd(
const char *simpleName, *procArgs, *procBody;
Namespace *nsPtr, *altNsPtr, *cxtNsPtr;
Tcl_Command cmd;
- (void)dummy;
if (objc != 4) {
Tcl_WrongNumArgs(interp, 1, objv, "name args body");
@@ -199,8 +197,8 @@ Tcl_ProcObjCmd(
* Create the data structure to represent the procedure.
*/
- if (TclCreateProc(interp, nsPtr, simpleName, objv[2], objv[3],
- &procPtr) != TCL_OK) {
+ if (TclCreateProc(interp, /*ignored nsPtr*/ NULL, simpleName, objv[2],
+ objv[3], &procPtr) != TCL_OK) {
Tcl_AddErrorInfo(interp, "\n (creating proc \"");
Tcl_AddErrorInfo(interp, simpleName);
Tcl_AddErrorInfo(interp, "\")");
@@ -398,7 +396,7 @@ Tcl_ProcObjCmd(
int
TclCreateProc(
Tcl_Interp *interp, /* Interpreter containing proc. */
- Namespace *nsPtr, /* Namespace containing this proc. */
+ TCL_UNUSED(Namespace *) /*nsPtr*/,
const char *procName, /* Unqualified name of this proc. */
Tcl_Obj *argsPtr, /* Description of arguments. */
Tcl_Obj *bodyPtr, /* Command body. */
@@ -411,7 +409,6 @@ TclCreateProc(
CompiledLocal *localPtr = NULL;
Tcl_Obj **argArray;
int precompiled = 0;
- (void)nsPtr;
ProcGetIntRep(bodyPtr, procPtr);
if (procPtr != NULL) {
@@ -890,17 +887,17 @@ Uplevel_Callback(
/* ARGSUSED */
int
Tcl_UplevelObjCmd(
- 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, TclNRUplevelObjCmd, dummy, objc, objv);
+ return Tcl_NRCallObjProc(interp, TclNRUplevelObjCmd, clientData, objc, objv);
}
int
TclNRUplevelObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -912,7 +909,6 @@ TclNRUplevelObjCmd(
int result;
CallFrame *savedVarFramePtr, *framePtr;
Tcl_Obj *objPtr;
- (void)dummy;
if (objc < 2) {
uplevelSyntax:
@@ -1374,7 +1370,6 @@ static int
InitArgsAndLocals(
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
- Tcl_Obj *procNameObj, /* Procedure name for error reporting. */
int skip) /* Number of initial arguments to be skipped,
* i.e., words in the "command name". */
{
@@ -1384,7 +1379,6 @@ InitArgsAndLocals(
Var *varPtr, *defPtr;
int localCt = procPtr->numCompiledLocals, numArgs, argCt, i, imax;
Tcl_Obj *const *argObjs;
- (void)procNameObj;
ByteCodeGetIntRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
@@ -1698,7 +1692,7 @@ TclNRInterpProcCore(
CallFrame *freePtr;
ByteCode *codePtr;
- result = InitArgsAndLocals(interp, procNameObj, skip);
+ result = InitArgsAndLocals(interp, skip);
if (result != TCL_OK) {
freePtr = iPtr->framePtr;
Tcl_PopCallFrame(interp); /* Pop but do not free. */
@@ -2626,17 +2620,17 @@ TclGetLambdaFromObj(
int
Tcl_ApplyObjCmd(
- 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, TclNRApplyObjCmd, dummy, objc, objv);
+ return Tcl_NRCallObjProc(interp, TclNRApplyObjCmd, clientData, objc, objv);
}
int
TclNRApplyObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -2646,7 +2640,6 @@ TclNRApplyObjCmd(
int result;
Tcl_Namespace *nsPtr;
ApplyExtraData *extraPtr;
- (void)dummy;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "lambdaExpr ?arg ...?");
diff --git a/generic/tclProcess.c b/generic/tclProcess.c
index 573baf4..5bf0af8 100644
--- a/generic/tclProcess.c
+++ b/generic/tclProcess.c
@@ -402,7 +402,7 @@ BuildProcessStatusObj(
static int
ProcessListObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -411,7 +411,6 @@ ProcessListObjCmd(
Tcl_HashEntry *entry;
Tcl_HashSearch search;
ProcessInfo *info;
- (void)dummy;
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
@@ -454,7 +453,7 @@ ProcessListObjCmd(
static int
ProcessStatusObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -476,7 +475,6 @@ ProcessStatusObjCmd(
enum switches {
STATUS_WAIT, STATUS_LAST
};
- (void)dummy;
while (objc > 1) {
if (TclGetString(objv[1])[0] != '-') {
@@ -603,7 +601,7 @@ ProcessStatusObjCmd(
static int
ProcessPurgeObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -616,7 +614,6 @@ ProcessPurgeObjCmd(
int result;
int i;
int pid;
- (void)dummy;
if (objc != 1 && objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?pids?");
@@ -704,12 +701,11 @@ ProcessPurgeObjCmd(
static int
ProcessAutopurgeObjCmd(
- 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 && objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?flag?");
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c
index 74b384a..8b88423 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -1053,12 +1053,11 @@ FreeRegexp(
static void
FinalizeRegexp(
- ClientData dummy) /* Not used. */
+ TCL_UNUSED(ClientData))
{
int i;
TclRegexp *regexpPtr;
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- (void)dummy;
for (i = 0; (i < NUM_REGEXPS) && (tsdPtr->patterns[i] != NULL); i++) {
regexpPtr = tsdPtr->regexps[i];
diff --git a/generic/tclScan.c b/generic/tclScan.c
index 054d935..5aa6a10 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -565,7 +565,7 @@ ValidateFormat(
/* ARGSUSED */
int
Tcl_ScanObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -581,7 +581,6 @@ Tcl_ScanObjCmd(
Tcl_UniChar ch = 0, sch = 0;
Tcl_Obj **objs = NULL, *objPtr = NULL;
int flags;
- (void)dummy;
if (objc < 3) {
Tcl_WrongNumArgs(interp, 1, objv,