summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/tclEpollNotfy.c2
-rw-r--r--unix/tclKqueueNotfy.c2
-rw-r--r--unix/tclLoadDl.c8
-rw-r--r--unix/tclLoadDyld.c12
-rw-r--r--unix/tclSelectNotfy.c5
-rw-r--r--unix/tclUnixChan.c9
-rw-r--r--unix/tclUnixCompat.c6
-rw-r--r--unix/tclUnixFCmd.c40
-rw-r--r--unix/tclUnixFile.c18
-rw-r--r--unix/tclUnixInit.c21
-rw-r--r--unix/tclUnixPipe.c9
-rw-r--r--unix/tclUnixSock.c22
-rw-r--r--unix/tclUnixTest.c33
-rw-r--r--unix/tclUnixTime.c12
-rw-r--r--unix/tclXtNotify.c4
-rw-r--r--unix/tclXtTest.c2
16 files changed, 75 insertions, 130 deletions
diff --git a/unix/tclEpollNotfy.c b/unix/tclEpollNotfy.c
index e164e7e..406b7ca 100644
--- a/unix/tclEpollNotfy.c
+++ b/unix/tclEpollNotfy.c
@@ -183,7 +183,7 @@ Tcl_InitNotifier(void)
void
Tcl_FinalizeNotifier(
- ClientData clientData) /* Not used. */
+ ClientData clientData)
{
if (tclNotifierHooks.finalizeNotifierProc) {
tclNotifierHooks.finalizeNotifierProc(clientData);
diff --git a/unix/tclKqueueNotfy.c b/unix/tclKqueueNotfy.c
index e2ff4f4..4daab7c 100644
--- a/unix/tclKqueueNotfy.c
+++ b/unix/tclKqueueNotfy.c
@@ -169,7 +169,7 @@ Tcl_InitNotifier(void)
void
Tcl_FinalizeNotifier(
- ClientData clientData) /* Not used. */
+ ClientData clientData)
{
if (tclNotifierHooks.finalizeNotifierProc) {
tclNotifierHooks.finalizeNotifierProc(clientData);
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c
index 052aa07..07fd30b 100644
--- a/unix/tclLoadDl.c
+++ b/unix/tclLoadDl.c
@@ -281,13 +281,9 @@ UnloadFile(
int
TclGuessPackageName(
- const char *fileName, /* Name of file containing package (already
- * translated to local form if needed). */
- Tcl_DString *bufPtr) /* Initialized empty dstring. Append package
- * name to this if possible. */
+ TCL_UNUSED(const char *) /*fileName*/,
+ TCL_UNUSED(Tcl_DString *))
{
- (void)fileName;
- (void)bufPtr;
return 0;
}
diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c
index 9d4e99c..e95d269 100644
--- a/unix/tclLoadDyld.c
+++ b/unix/tclLoadDyld.c
@@ -486,14 +486,9 @@ UnloadFile(
int
TclGuessPackageName(
- const char *fileName, /* Name of file containing package (already
- * translated to local form if needed). */
- Tcl_DString *bufPtr) /* Initialized empty dstring. Append package
- * name to this if possible. */
+ TCL_UNUSED(const char *) /*fileName*/,
+ TCL_UNUSED(Tcl_DString *) /*bufPtr*/)
{
- (void)fileName;
- (void)bufPtr;
-
return 0;
}
@@ -516,11 +511,10 @@ TclGuessPackageName(
#ifdef TCL_LOAD_FROM_MEMORY
MODULE_SCOPE void *
TclpLoadMemoryGetBuffer(
- Tcl_Interp *dummy, /* Used for error reporting. */
+ TCL_UNUSED(Tcl_Interp *),
int size) /* Size of desired buffer. */
{
void *buffer = NULL;
- (void)dummy;
/*
* NSCreateObjectFileImageFromMemory is available but always fails
diff --git a/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c
index a7788a6..79475f6 100644
--- a/unix/tclSelectNotfy.c
+++ b/unix/tclSelectNotfy.c
@@ -376,7 +376,7 @@ Tcl_InitNotifier(void)
void
Tcl_FinalizeNotifier(
- ClientData clientData) /* Not used. */
+ ClientData clientData)
{
if (tclNotifierHooks.finalizeNotifierProc) {
tclNotifierHooks.finalizeNotifierProc(clientData);
@@ -928,7 +928,7 @@ Tcl_WaitForEvent(
#if TCL_THREADS
static TCL_NORETURN void
NotifierThreadProc(
- ClientData dummy) /* Not used. */
+ TCL_UNUSED(ClientData))
{
ThreadSpecificData *tsdPtr;
fd_set readableMask;
@@ -940,7 +940,6 @@ NotifierThreadProc(
struct timeval poll = {0, 0}, *timePtr;
char buf[2];
int numFdBits = 0;
- (void)dummy;
if (pipe(fds) != 0) {
Tcl_Panic("NotifierThreadProc: %s", "could not create trigger pipe");
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 0636b6d..045aad0 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -359,12 +359,11 @@ FileOutputProc(
static int
FileCloseProc(
void *instanceData, /* File state. */
- Tcl_Interp *dummy, /* For error reporting - unused. */
+ TCL_UNUSED(Tcl_Interp *),
int flags)
{
FileState *fsPtr = (FileState *)instanceData;
int errorCode = 0;
- (void)dummy;
if ((flags & (TCL_CLOSE_READ | TCL_CLOSE_WRITE)) != 0) {
return EINVAL;
@@ -1944,9 +1943,8 @@ Tcl_GetOpenFile(
const char *chanID, /* String that identifies file. */
int forWriting, /* 1 means the file is going to be used for
* writing, 0 means for reading. */
- int dummy, /* 1 means verify that the file was opened in
- * a mode that allows the access specified by
- * "forWriting". Ignored, we always check that
+ TCL_UNUSED(int), /* Obsolete argument.
+ * Ignored, we always check that
* the channel is open for the requested
* mode. */
void **filePtr) /* Store pointer to FILE structure here. */
@@ -1956,7 +1954,6 @@ Tcl_GetOpenFile(
const Tcl_ChannelType *chanTypePtr;
void *data;
FILE *f;
- (void)dummy;
chan = Tcl_GetChannel(interp, chanID, &chanMode);
if (chan == NULL) {
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index c4ee1d5..7717721 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -336,10 +336,9 @@ TclpGetPwUid(
#ifdef NEED_PW_CLEANER
static void
FreePwBuf(
- ClientData dummy)
+ TCL_UNUSED(ClientData))
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- (void)dummy;
ckfree(tsdPtr->pbuf);
}
@@ -520,10 +519,9 @@ TclpGetGrGid(
#ifdef NEED_GR_CLEANER
static void
FreeGrBuf(
- ClientData dummy)
+ TCL_UNUSED(ClientData))
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- (void)dummy;
ckfree(tsdPtr->gbuf);
}
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 9018bd1..473949a 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -1230,16 +1230,13 @@ TraversalCopy(
static int
TraversalDelete(
Tcl_DString *srcPtr, /* Source pathname (native). */
- Tcl_DString *dummy, /* Destination pathname (not used). */
- const Tcl_StatBuf *statBufPtr,
- /* Stat info for file specified by srcPtr. */
+ TCL_UNUSED(Tcl_DString *),
+ TCL_UNUSED(const Tcl_StatBuf *),
int type, /* Reason for call - see TraverseUnixTree(). */
Tcl_DString *errorPtr) /* If non-NULL, uninitialized or free DString
* filled with UTF-8 name of file causing
* error. */
{
- (void)dummy;
- (void)statBufPtr;
switch (type) {
case DOTREE_F:
@@ -1282,14 +1279,13 @@ TraversalDelete(
static int
CopyFileAtts(
- const char *src, /* Path name of source file (native). */
+ TCL_UNUSED(const char *) /*src*/, /* Path name of source file (native). */
const char *dst, /* Path name of target file (native). */
const Tcl_StatBuf *statBufPtr)
/* Stat info for source file */
{
struct utimbuf tval;
mode_t newMode;
- (void)src;
newMode = statBufPtr->st_mode
& (S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO);
@@ -1341,14 +1337,13 @@ CopyFileAtts(
static int
GetGroupAttribute(
Tcl_Interp *interp, /* The interp we are using for errors. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */
{
Tcl_StatBuf statBuf;
struct group *groupPtr;
int result;
- (void)objIndex;
result = TclpObjStat(fileName, &statBuf);
@@ -1396,14 +1391,13 @@ GetGroupAttribute(
static int
GetOwnerAttribute(
Tcl_Interp *interp, /* The interp we are using for errors. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */
{
Tcl_StatBuf statBuf;
struct passwd *pwPtr;
int result;
- (void)objIndex;
result = TclpObjStat(fileName, &statBuf);
@@ -1449,13 +1443,12 @@ GetOwnerAttribute(
static int
GetPermissionsAttribute(
Tcl_Interp *interp, /* The interp we are using for errors. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */
{
Tcl_StatBuf statBuf;
int result;
- (void)objIndex;
result = TclpObjStat(fileName, &statBuf);
@@ -1492,14 +1485,13 @@ GetPermissionsAttribute(
static int
SetGroupAttribute(
Tcl_Interp *interp, /* The interp for error reporting. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *attributePtr) /* New group for file. */
{
Tcl_WideInt gid;
int result;
const char *native;
- (void)objIndex;
if (Tcl_GetWideIntFromObj(NULL, attributePtr, &gid) != TCL_OK) {
Tcl_DString ds;
@@ -1559,14 +1551,13 @@ SetGroupAttribute(
static int
SetOwnerAttribute(
Tcl_Interp *interp, /* The interp for error reporting. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *attributePtr) /* New owner for file. */
{
Tcl_WideInt uid;
int result;
const char *native;
- (void)objIndex;
if (Tcl_GetWideIntFromObj(NULL, attributePtr, &uid) != TCL_OK) {
Tcl_DString ds;
@@ -1626,7 +1617,7 @@ SetOwnerAttribute(
static int
SetPermissionsAttribute(
Tcl_Interp *interp, /* The interp we are using for errors. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *attributePtr) /* The attribute to set. */
{
@@ -1636,7 +1627,6 @@ SetPermissionsAttribute(
const char *native;
const char *modeStringPtr = TclGetString(attributePtr);
int scanned = TclParseAllWhiteSpace(modeStringPtr, -1);
- (void)objIndex;
/*
* First supply support for octal number format
@@ -1749,7 +1739,7 @@ TclpObjListVolumes(void)
static int
GetModeFromPermString(
- Tcl_Interp *dummy, /* The interp we are using for errors. */
+ TCL_UNUSED(Tcl_Interp *),
const char *modeStringPtr, /* Permissions string */
mode_t *modePtr) /* pointer to the mode value */
{
@@ -1758,7 +1748,6 @@ GetModeFromPermString(
* is passed in), to allow for the chmod style
* manipulation. */
int i,n, who, op, what, op_found, who_found;
- (void)dummy;
/*
* We start off checking for an "rwxrwxrwx" style permissions string
@@ -1937,7 +1926,7 @@ GetModeFromPermString(
int
TclpObjNormalizePath(
- Tcl_Interp *dummy,
+ TCL_UNUSED(Tcl_Interp *),
Tcl_Obj *pathPtr, /* An unshared object containing the path to
* normalize. */
int nextCheckpoint) /* offset to start at in pathPtr. Must either
@@ -1956,7 +1945,6 @@ TclpObjNormalizePath(
#ifndef NO_REALPATH
char normPath[MAXPATHLEN];
#endif
- (void)dummy;
currentPathEndPosition = path + nextCheckpoint;
if (*currentPathEndPosition == '/') {
@@ -2501,13 +2489,12 @@ SetUnixFileAttributes(
static int
GetUnixFileAttributes(
Tcl_Interp *interp, /* The interp we are using for errors. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */
{
Tcl_StatBuf statBuf;
int result;
- (void)objIndex;
result = TclpObjStat(fileName, &statBuf);
@@ -2543,14 +2530,13 @@ GetUnixFileAttributes(
static int
SetUnixFileAttributes(
Tcl_Interp *interp, /* The interp we are using for errors. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *attributePtr) /* The attribute to set. */
{
Tcl_StatBuf statBuf;
int result, readonly;
const char *native;
- (void)objIndex;
if (Tcl_GetBooleanFromObj(interp, attributePtr, &readonly) != TCL_OK) {
return TCL_ERROR;
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 9f4eb77..602ca63 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -34,17 +34,15 @@ static int NativeMatchType(Tcl_Interp *interp, const char* nativeEntry,
*---------------------------------------------------------------------------
*/
+#ifdef __CYGWIN__
void
TclpFindExecutable(
- const char *argv0) /* The value of the application's argv[0]
- * (native). */
+ TCL_UNUSED(const char *) /*argv0*/)
{
Tcl_Encoding encoding;
-#ifdef __CYGWIN__
int length;
wchar_t buf[PATH_MAX];
char name[PATH_MAX * 3 + 1];
- (void)argv0;
GetModuleFileNameW(NULL, buf, PATH_MAX);
cygwin_conv_path(3, buf, name, PATH_MAX);
@@ -56,7 +54,14 @@ TclpFindExecutable(
encoding = Tcl_GetEncoding(NULL, NULL);
TclSetObjNameOfExecutable(
Tcl_NewStringObj(name, length), encoding);
+}
#else
+void
+TclpFindExecutable(
+ const char *argv0) /* The value of the application's argv[0]
+ * (native). */
+{
+ Tcl_Encoding encoding;
const char *name, *p;
Tcl_StatBuf statBuf;
Tcl_DString buffer, nameString, cwd, utfName;
@@ -194,8 +199,8 @@ TclpFindExecutable(
done:
Tcl_DStringFree(&buffer);
-#endif
}
+#endif
/*
*----------------------------------------------------------------------
@@ -1020,9 +1025,8 @@ TclpObjLink(
Tcl_Obj *
TclpFilesystemPathType(
- Tcl_Obj *pathPtr)
+ TCL_UNUSED(Tcl_Obj *))
{
- (void)pathPtr;
/*
* All native paths are of the same type.
*/
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 0e61e85..a86fcde 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -1053,26 +1053,27 @@ TclpFindVariable(
*/
#ifdef HAVE_COREFOUNDATION
+#ifdef TCL_FRAMEWORK
static int
MacOSXGetLibraryPath(
Tcl_Interp *interp,
int maxPathLen,
char *tclLibPath)
{
- int foundInFramework = TCL_ERROR;
-
-#ifdef TCL_FRAMEWORK
- foundInFramework = Tcl_MacOSXOpenVersionedBundleResources(interp,
+ return Tcl_MacOSXOpenVersionedBundleResources(interp,
"com.tcltk.tcllibrary", TCL_FRAMEWORK_VERSION, 0, maxPathLen,
tclLibPath);
+}
#else
- (void)interp;
- (void)maxPathLen;
- (void)tclLibPath;
-#endif
-
- return foundInFramework;
+static int
+MacOSXGetLibraryPath(
+ TCL_UNUSED(Tcl_Interp *),
+ TCL_UNUSED(int),
+ TCL_UNUSED(char *))
+{
+ return TCL_ERROR;
}
+#endif
#endif /* HAVE_COREFOUNDATION */
/*
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index 31d9671..f47e021 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -268,10 +268,9 @@ TclpTempFileName(void)
Tcl_Obj *
TclpTempFileNameForLibrary(
Tcl_Interp *interp, /* Tcl interpreter. */
- Tcl_Obj *path) /* Path name of the library in the VFS. */
+ TCL_UNUSED(Tcl_Obj *) /*path*/)
{
Tcl_Obj *retval = TclpTempFileName();
- (void)path;
if (retval == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -811,10 +810,9 @@ Tcl_CreatePipe(
Tcl_Interp *interp, /* Errors returned in result. */
Tcl_Channel *rchan, /* Returned read side. */
Tcl_Channel *wchan, /* Returned write side. */
- int flags) /* Reserved for future use. */
+ TCL_UNUSED(int) /*flags*/) /* Reserved for future use. */
{
int fileNums[2];
- (void)flags;
if (pipe(fileNums) < 0) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf("pipe creation failed: %s",
@@ -1254,7 +1252,7 @@ Tcl_WaitPid(
/* ARGSUSED */
int
Tcl_PidObjCmd(
- void *dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
@@ -1263,7 +1261,6 @@ Tcl_PidObjCmd(
PipeState *pipePtr;
int i;
Tcl_Obj *resultPtr;
- (void)dummy;
if (objc > 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?channelId?");
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index dd8ca30..325e361 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -338,10 +338,8 @@ Tcl_GetHostName(void)
int
TclpHasSockets(
- Tcl_Interp *dummy) /* Not used. */
+ TCL_UNUSED(Tcl_Interp *))
{
- (void)dummy;
-
return TCL_OK;
}
@@ -627,12 +625,11 @@ TcpOutputProc(
static int
TcpCloseProc(
void *instanceData, /* The socket to close. */
- Tcl_Interp *dummy) /* For error reporting - unused */
+ TCL_UNUSED(Tcl_Interp *))
{
TcpState *statePtr = (TcpState *)instanceData;
int errorCode = 0;
TcpFdList *fds;
- (void)dummy;
/*
* Delete a file handler that may be active for this socket if this is a
@@ -689,13 +686,12 @@ TcpCloseProc(
static int
TcpClose2Proc(
void *instanceData, /* The socket to close. */
- Tcl_Interp *dummy, /* For error reporting. */
+ TCL_UNUSED(Tcl_Interp *),
int flags) /* Flags that indicate which side to close. */
{
TcpState *statePtr = (TcpState *)instanceData;
int readError = 0;
int writeError = 0;
- (void)dummy;
/*
* Shutdown the OS socket handle.
@@ -1110,11 +1106,10 @@ TcpWatchProc(
static int
TcpGetHandleProc(
void *instanceData, /* The socket state. */
- int direction, /* Not used. */
+ TCL_UNUSED(int) /*direction*/,
void **handlePtr) /* Where to store the handle. */
{
TcpState *statePtr = (TcpState *)instanceData;
- (void)direction;
*handlePtr = INT2PTR(statePtr->fds.fd);
return TCL_OK;
@@ -1135,12 +1130,8 @@ TcpGetHandleProc(
static void
TcpAsyncCallback(
void *clientData, /* The socket state. */
- int mask) /* Events of interest; an OR-ed combination of
- * TCL_READABLE, TCL_WRITABLE and
- * TCL_EXCEPTION. */
+ TCL_UNUSED(int) /*mask*/)
{
- (void)mask;
-
TcpConnect(NULL, (TcpState *)clientData);
}
@@ -1771,7 +1762,7 @@ Tcl_OpenTcpServerEx(
static void
TcpAccept(
void *data, /* Callback token. */
- int mask) /* Not used. */
+ TCL_UNUSED(int) /*mask*/)
{
TcpFdList *fds = (TcpFdList *)data; /* Client data of server socket. */
int newsock; /* The new client socket */
@@ -1780,7 +1771,6 @@ TcpAccept(
socklen_t len; /* For accept interface */
char channelName[SOCK_CHAN_LENGTH];
char host[NI_MAXHOST], port[NI_MAXSERV];
- (void)mask;
len = sizeof(addr);
newsock = accept(fds->fd, &addr.sa, &len);
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c
index 8868bbe..b06abdf0 100644
--- a/unix/tclUnixTest.c
+++ b/unix/tclUnixTest.c
@@ -129,7 +129,7 @@ TclplatformtestInit(
static int
TestfilehandlerCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
@@ -139,7 +139,6 @@ TestfilehandlerCmd(
static int initialized = 0;
char buffer[4000];
TclFile file;
- (void)dummy;
/*
* NOTE: When we make this code work on Windows also, the following
@@ -344,7 +343,7 @@ TestFileHandlerProc(
static int
TestfilewaitCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
@@ -353,7 +352,6 @@ TestfilewaitCmd(
Tcl_Channel channel;
int fd;
ClientData data;
- (void)dummy;
if (objc != 4) {
Tcl_WrongNumArgs(interp, 2, objv, "file readable|writable|both timeout");
@@ -413,13 +411,12 @@ TestfilewaitCmd(
static int
TestfindexecutableCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
Tcl_Obj *saveName;
- (void)dummy;
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "argv0");
@@ -456,13 +453,12 @@ TestfindexecutableCmd(
static int
TestforkCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
pid_t pid;
- (void)dummy;
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, "");
@@ -503,7 +499,7 @@ TestforkCmd(
static int
TestalarmCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
@@ -511,7 +507,6 @@ TestalarmCmd(
#ifdef SA_RESTART
unsigned int sec = 1;
struct sigaction action;
- (void)dummy;
if (objc > 1) {
Tcl_GetIntFromObj(interp, objv[1], (int *)&sec);
@@ -533,7 +528,6 @@ TestalarmCmd(
(void) alarm(sec);
return TCL_OK;
#else
- (void)dummy;
Tcl_AppendResult(interp,
"warning: sigaction SA_RESTART not support on this platform",
@@ -560,10 +554,8 @@ TestalarmCmd(
static void
AlarmHandler(
- int signum)
+ TCL_UNUSED(int) /*signum*/)
{
- (void)signum;
-
gotsig = "1";
}
@@ -585,15 +577,11 @@ AlarmHandler(
static int
TestgotsigCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
- Tcl_Obj *const *objv) /* Argument strings. */
+ TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Obj *const *))
{
- (void)dummy;
- (void)objc;
- (void)objv;
-
Tcl_AppendResult(interp, gotsig, NULL);
gotsig = "0";
return TCL_OK;
@@ -620,13 +608,12 @@ TestgotsigCmd(
static int
TestchmodCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
int i, mode;
- (void)dummy;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "mode file ?file ...?");
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index fb649d2..07b3065 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -508,11 +508,9 @@ Tcl_QueryTimeProc(
static void
NativeScaleTime(
- Tcl_Time *timePtr,
- ClientData clientData)
+ TCL_UNUSED(Tcl_Time *),
+ TCL_UNUSED(ClientData))
{
- (void)timePtr;
- (void)clientData;
/* Native scale is 1:1. Nothing is done */
}
@@ -536,10 +534,9 @@ NativeScaleTime(
static void
NativeGetTime(
Tcl_Time *timePtr,
- ClientData dummy)
+ TCL_UNUSED(ClientData))
{
struct timeval tv;
- (void)dummy;
(void) gettimeofday(&tv, NULL);
timePtr->sec = tv.tv_sec;
@@ -606,9 +603,8 @@ SetTZIfNecessary(void)
static void
CleanupMemory(
- ClientData dummy)
+ TCL_UNUSED(ClientData))
{
- (void)dummy;
ckfree(lastTZ);
}
#endif /* TCL_NO_DEPRECATED */
diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c
index 490b739..cf99fb2 100644
--- a/unix/tclXtNotify.c
+++ b/unix/tclXtNotify.c
@@ -232,7 +232,7 @@ InitNotifier(void)
static void
NotifierExitHandler(
- ClientData clientData) /* Not used. */
+ TCL_UNUSED(ClientData))
{
if (notifier.currentTimeout != 0) {
XtRemoveTimeOut(notifier.currentTimeout);
@@ -305,7 +305,7 @@ SetTimer(
static void
TimerProc(
- XtPointer clientData, /* Not used. */
+ TCL_UNUSED(XtPointer),
XtIntervalId *id)
{
if (*id != notifier.currentTimeout) {
diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c
index cb70b58..6c09a50 100644
--- a/unix/tclXtTest.c
+++ b/unix/tclXtTest.c
@@ -78,7 +78,7 @@ Tclxttest_Init(
static int
TesteventloopCmd(
- ClientData clientData, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */