summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-03-06 20:15:24 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-03-06 20:15:24 (GMT)
commit9bfe3724215a96c07d1f1067c75389798f54a8c5 (patch)
tree1046f1c97cca95098f231d6067576f20801b2a95 /generic
parente72ebf58a150fcbf041ed40495472805d08d8ce1 (diff)
downloadtcl-9bfe3724215a96c07d1f1067c75389798f54a8c5.zip
tcl-9bfe3724215a96c07d1f1067c75389798f54a8c5.tar.gz
tcl-9bfe3724215a96c07d1f1067c75389798f54a8c5.tar.bz2
more
Diffstat (limited to 'generic')
-rw-r--r--generic/tclExecute.c24
-rw-r--r--generic/tclFCmd.c27
-rw-r--r--generic/tclFileName.c13
3 files changed, 31 insertions, 33 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index e757230..169aece 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -798,6 +798,7 @@ ReleaseDictIterator(
*----------------------------------------------------------------------
*/
+#if defined(TCL_COMPILE_STATS) || defined(TCL_COMPILE_DEBUG)
static void
InitByteCodeExecution(
Tcl_Interp *interp) /* Interpreter for which the Tcl variable
@@ -810,12 +811,19 @@ InitByteCodeExecution(
Tcl_Panic("InitByteCodeExecution: can't create link for tcl_traceExec variable");
}
#endif
-#ifndef TCL_COMPILE_STATS
- (void)interp;
-#else
+#ifdef TCL_COMPILE_STATS
Tcl_CreateObjCommand(interp, "evalstats", EvalStatsCmd, NULL, NULL);
#endif /* TCL_COMPILE_STATS */
}
+
+#else
+
+static void
+InitByteCodeExecution(
+ TCL_UNUSED(Tcl_Interp *))
+{
+}
+#endif
/*
*----------------------------------------------------------------------
@@ -1358,13 +1366,11 @@ Tcl_ExprObj(
static int
CopyCallback(
ClientData data[],
- Tcl_Interp *dummy,
+ TCL_UNUSED(Tcl_Interp *),
int result)
{
Tcl_Obj **resultPtrPtr = (Tcl_Obj **)data[0];
Tcl_Obj *resultPtr = (Tcl_Obj *)data[1];
- (void)dummy;
- (void)dummy;
if (result == TCL_OK) {
*resultPtrPtr = resultPtr;
@@ -1555,11 +1561,9 @@ CompileExprObj(
static void
DupExprCodeInternalRep(
- Tcl_Obj *srcPtr,
- Tcl_Obj *copyPtr)
+ TCL_UNUSED(Tcl_Obj *),
+ TCL_UNUSED(Tcl_Obj *))
{
- (void)srcPtr;
- (void)copyPtr;
return;
}
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c
index bfb5b36..3babd43 100644
--- a/generic/tclFCmd.c
+++ b/generic/tclFCmd.c
@@ -47,13 +47,12 @@ static int FileForceOption(Tcl_Interp *interp,
int
TclFileRenameCmd(
- ClientData dummy, /* Unused */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Interp for error reporting or recursive
* calls in the case of a tricky rename. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */
{
- (void)dummy;
return FileCopyRename(interp, objc, objv, 0);
}
@@ -77,13 +76,12 @@ TclFileRenameCmd(
int
TclFileCopyCmd(
- ClientData dummy, /* Unused */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Used for error reporting or recursive calls
* in the case of a tricky copy. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */
{
- (void)dummy;
return FileCopyRename(interp, objc, objv, 1);
}
@@ -216,7 +214,7 @@ FileCopyRename(
int
TclFileMakeDirsCmd(
- ClientData dummy, /* Unused */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Used for error reporting. */
int objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */
@@ -226,7 +224,6 @@ TclFileMakeDirsCmd(
Tcl_Obj *split = NULL;
Tcl_Obj *target = NULL;
Tcl_StatBuf statBuf;
- (void)dummy;
result = TCL_OK;
for (i = 1; i < objc; i++) {
@@ -341,7 +338,7 @@ TclFileMakeDirsCmd(
int
TclFileDeleteCmd(
- ClientData dummy, /* Unused */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Used for error reporting */
int objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */
@@ -349,7 +346,6 @@ TclFileDeleteCmd(
int i, force, result;
Tcl_Obj *errfile;
Tcl_Obj *errorBuffer = NULL;
- (void)dummy;
i = FileForceOption(interp, objc - 1, objv + 1, &force);
if (i < 0) {
@@ -950,7 +946,7 @@ FileBasename(
int
TclFileAttrsCmd(
- ClientData dummy, /* Unused */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* The interpreter for error reporting. */
int objc, /* Number of command line arguments. */
Tcl_Obj *const objv[]) /* The command line objects. */
@@ -961,7 +957,6 @@ TclFileAttrsCmd(
Tcl_Obj *objStrings = NULL;
int numObjStrings = -1;
Tcl_Obj *filePtr;
- (void)dummy;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "name ?-option value ...?");
@@ -1167,14 +1162,13 @@ TclFileAttrsCmd(
int
TclFileLinkCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *contents;
int index;
- (void)dummy;
if (objc < 2 || objc > 4) {
Tcl_WrongNumArgs(interp, 1, objv, "?-linktype? linkname ?target?");
@@ -1319,13 +1313,12 @@ TclFileLinkCmd(
int
TclFileReadLinkCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *contents;
- (void)dummy;
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "name");
@@ -1371,7 +1364,7 @@ TclFileReadLinkCmd(
int
TclFileTemporaryCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -1385,7 +1378,6 @@ TclFileTemporaryCmd(
/* Pieces of template. Each piece is NULL if
* it is omitted. The platform temporary file
* engine might ignore some pieces. */
- (void)dummy;
if (objc < 1 || objc > 3) {
Tcl_WrongNumArgs(interp, 1, objv, "?nameVar? ?template?");
@@ -1531,7 +1523,7 @@ TclFileTemporaryCmd(
int
TclFileTempDirCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -1542,7 +1534,6 @@ TclFileTempDirCmd(
/* Pieces of template. Each piece is NULL if
* it is omitted. The platform temporary file
* engine might ignore some pieces. */
- (void)dummy;
if (objc < 1 || objc > 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?template?");
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index ee2321d..a069ff1 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -1220,7 +1220,7 @@ DoTildeSubst(
/* ARGSUSED */
int
Tcl_GlobObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -1241,7 +1241,6 @@ Tcl_GlobObjCmd(
};
enum pathDirOptions {PATH_NONE = -1 , PATH_GENERAL = 0, PATH_DIR = 1};
Tcl_GlobTypeData *globTypes = NULL;
- (void)dummy;
globFlags = 0;
join = 0;
@@ -2634,21 +2633,25 @@ Tcl_GetBlocksFromStat(
#endif
}
+#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
unsigned
Tcl_GetBlockSizeFromStat(
const Tcl_StatBuf *statPtr)
{
-#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
return statPtr->st_blksize;
+}
#else
- (void)statPtr;
+unsigned
+Tcl_GetBlockSizeFromStat(
+ TCL_UNUSED(const Tcl_StatBuf *))
+{
/*
* Not a great guess, but will do...
*/
return GUESSED_BLOCK_SIZE;
-#endif
}
+#endif
/*
* Local Variables: