summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-03-09 16:34:46 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-03-09 16:34:46 (GMT)
commitf336629f658f0862b12cd860a4edae8b95449eb2 (patch)
treee38704da3f3289f90c91833bf10a8e91a3699088 /generic
parent254b4fa35fd51a8b78906d5d481f4e1c3901f8b2 (diff)
parent065483ce8b22e7da470427493d68f36e6a53b80b (diff)
downloadtcl-f336629f658f0862b12cd860a4edae8b95449eb2.zip
tcl-f336629f658f0862b12cd860a4edae8b95449eb2.tar.gz
tcl-f336629f658f0862b12cd860a4edae8b95449eb2.tar.bz2
merge 8.7
Diffstat (limited to 'generic')
-rw-r--r--generic/tclTimer.c18
-rw-r--r--generic/tclTrace.c14
-rw-r--r--generic/tclUtil.c6
-rw-r--r--generic/tclVar.c79
-rw-r--r--generic/tclZipfs.c129
5 files changed, 81 insertions, 165 deletions
diff --git a/generic/tclTimer.c b/generic/tclTimer.c
index 837a8a3..bd6dfe9 100644
--- a/generic/tclTimer.c
+++ b/generic/tclTimer.c
@@ -211,10 +211,9 @@ InitTimer(void)
static void
TimerExitProc(
- ClientData dummy) /* Not used. */
+ TCL_UNUSED(ClientData))
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)TclThreadDataKeyGet(&dataKey);
- (void)dummy;
Tcl_DeleteEventSource(TimerSetupProc, TimerCheckProc, NULL);
if (tsdPtr != NULL) {
@@ -399,12 +398,11 @@ Tcl_DeleteTimerHandler(
static void
TimerSetupProc(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
int flags) /* Event flags as passed to Tcl_DoOneEvent. */
{
Tcl_Time blockTime;
ThreadSpecificData *tsdPtr = InitTimer();
- (void)dummy;
if (((flags & TCL_IDLE_EVENTS) && tsdPtr->idleList)
|| ((flags & TCL_TIMER_EVENTS) && tsdPtr->timerPending)) {
@@ -458,13 +456,12 @@ TimerSetupProc(
static void
TimerCheckProc(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
int flags) /* Event flags as passed to Tcl_DoOneEvent. */
{
Tcl_Event *timerEvPtr;
Tcl_Time blockTime;
ThreadSpecificData *tsdPtr = InitTimer();
- (void)dummy;
if ((flags & TCL_TIMER_EVENTS) && tsdPtr->firstTimerHandlerPtr) {
/*
@@ -521,7 +518,7 @@ TimerCheckProc(
static int
TimerHandlerEventProc(
- Tcl_Event *evPtr, /* Event to service. */
+ TCL_UNUSED(Tcl_Event *),
int flags) /* Flags that indicate what events to handle,
* such as TCL_FILE_EVENTS. */
{
@@ -529,7 +526,6 @@ TimerHandlerEventProc(
Tcl_Time time;
int currentTimerId;
ThreadSpecificData *tsdPtr = InitTimer();
- (void)evPtr;
/*
* Do nothing if timers aren't enabled. This leaves the event on the
@@ -783,7 +779,7 @@ TclServiceIdle(void)
/* ARGSUSED */
int
Tcl_AfterObjCmd(
- ClientData dummy, /* Unused */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -799,7 +795,6 @@ Tcl_AfterObjCmd(
};
enum afterSubCmds {AFTER_CANCEL, AFTER_IDLE, AFTER_INFO};
ThreadSpecificData *tsdPtr = InitTimer();
- (void)dummy;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
@@ -1258,11 +1253,10 @@ static void
AfterCleanupProc(
ClientData clientData, /* Points to AfterAssocData for the
* interpreter. */
- Tcl_Interp *dummy) /* Interpreter that is being deleted. */
+ TCL_UNUSED(Tcl_Interp *))
{
AfterAssocData *assocPtr = (AfterAssocData *)clientData;
AfterInfo *afterPtr;
- (void)dummy;
while (assocPtr->firstAfterPtr != NULL) {
afterPtr = assocPtr->firstAfterPtr;
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index bf2d0d8..b9a9a63 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -184,7 +184,7 @@ typedef struct {
/* ARGSUSED */
int
Tcl_TraceObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -209,7 +209,6 @@ Tcl_TraceObjCmd(
TRACE_OLD_VARIABLE, TRACE_OLD_VDELETE, TRACE_OLD_VINFO
#endif
};
- (void)dummy;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
@@ -1041,8 +1040,7 @@ ClientData
Tcl_CommandTraceInfo(
Tcl_Interp *interp, /* Interpreter containing command. */
const char *cmdName, /* Name of command. */
- int flags, /* OR-ed combo or TCL_GLOBAL_ONLY,
- * TCL_NAMESPACE_ONLY (can be 0). */
+ TCL_UNUSED(int) /*flags*/,
Tcl_CommandTraceProc *proc, /* Function assocated with trace. */
ClientData prevClientData) /* If non-NULL, gives last value returned by
* this function, so this call will return the
@@ -1051,7 +1049,6 @@ Tcl_CommandTraceInfo(
{
Command *cmdPtr;
CommandTrace *tracePtr;
- (void)flags;
cmdPtr = (Command *) Tcl_FindCommand(interp, cmdName, NULL,
TCL_LEAVE_ERR_MSG);
@@ -1425,8 +1422,7 @@ TclCheckExecutionTraces(
Tcl_Interp *interp, /* The current interpreter. */
const char *command, /* Pointer to beginning of the current command
* string. */
- size_t numChars, /* The number of characters in 'command' which
- * are part of the command string. */
+ TCL_UNUSED(size_t) /*numChars*/,
Command *cmdPtr, /* Points to command's Command struct. */
int code, /* The current result code. */
int traceFlags, /* Current tracing situation. */
@@ -1439,7 +1435,6 @@ TclCheckExecutionTraces(
int curLevel;
int traceCode = TCL_OK;
Tcl_InterpState state = NULL;
- (void)numChars;
if (cmdPtr->tracePtr == NULL) {
return traceCode;
@@ -1766,7 +1761,7 @@ TraceExecutionProc(
Tcl_Interp *interp,
int level,
const char *command,
- Tcl_Command cmdInfo,
+ TCL_UNUSED(Tcl_Command),
int objc,
struct Tcl_Obj *const objv[])
{
@@ -1776,7 +1771,6 @@ TraceExecutionProc(
int flags = tcmdPtr->curFlags;
int code = tcmdPtr->curCode;
int traceCode = TCL_OK;
- (void)cmdInfo;
if (tcmdPtr->flags & TCL_TRACE_EXEC_IN_PROGRESS) {
/*
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index c8ba12e..1bfde12 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -2382,11 +2382,10 @@ TclByteArrayMatch(
/* Pattern, which may contain special
* characters. */
size_t ptnLen, /* Length of Pattern */
- int flags)
+ TCL_UNUSED(int) /*flags*/)
{
const unsigned char *stringEnd, *patternEnd;
unsigned char p;
- (void)flags;
stringEnd = string + strLen;
patternEnd = pattern + ptnLen;
@@ -3093,7 +3092,7 @@ Tcl_DStringEndSublist(
void
Tcl_PrintDouble(
- Tcl_Interp *dummy, /* Not used. */
+ TCL_UNUSED(Tcl_Interp *),
double value, /* Value to print as string. */
char *dst) /* Where to store converted value; must have
* at least TCL_DOUBLE_SPACE characters. */
@@ -3103,7 +3102,6 @@ Tcl_PrintDouble(
int signum;
char *digits;
char *end;
- (void)dummy;
/*
* Handle NaN.
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 5744132..404d3f3 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -188,8 +188,7 @@ static void ArrayPopulateSearch(Tcl_Interp *interp,
static void ArrayDoneSearch(Interp *iPtr, Var *varPtr,
ArraySearch *searchPtr);
static Tcl_NRPostProc ArrayForLoopCallback;
-static int ArrayForNRCmd(ClientData dummy, Tcl_Interp *interp,
- int objc, Tcl_Obj *const *objv);
+static Tcl_ObjCmdProc ArrayForNRCmd;
static void DeleteSearches(Interp *iPtr, Var *arrayVarPtr);
static void DeleteArray(Interp *iPtr, Tcl_Obj *arrayNamePtr,
Var *varPtr, int flags, int index);
@@ -1480,13 +1479,12 @@ TclPtrGetVarIdx(
/* ARGSUSED */
int
Tcl_SetObjCmd(
- 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 *varValueObj;
- (void)dummy;
if (objc == 2) {
varValueObj = Tcl_ObjGetVar2(interp, objv[1], NULL,TCL_LEAVE_ERR_MSG);
@@ -2678,14 +2676,13 @@ UnsetVarStruct(
/* ARGSUSED */
int
Tcl_UnsetObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int i, flags = TCL_LEAVE_ERR_MSG;
const char *name;
- (void)dummy;
if (objc == 1) {
/*
@@ -2747,7 +2744,7 @@ Tcl_UnsetObjCmd(
/* ARGSUSED */
int
Tcl_AppendObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -2756,7 +2753,6 @@ Tcl_AppendObjCmd(
Tcl_Obj *varValuePtr = NULL;
/* Initialized to avoid compiler warning. */
int i;
- (void)dummy;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "varName ?value ...?");
@@ -2814,7 +2810,7 @@ Tcl_AppendObjCmd(
/* ARGSUSED */
int
Tcl_LappendObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -2823,7 +2819,6 @@ Tcl_LappendObjCmd(
int numElems, createdNewObj;
Var *varPtr, *arrayPtr;
int result;
- (void)dummy;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "varName ?value ...?");
@@ -3021,17 +3016,17 @@ ArrayObjNext(
static int
ArrayForObjCmd(
- 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, ArrayForNRCmd, dummy, objc, objv);
+ return Tcl_NRCallObjProc(interp, ArrayForNRCmd, clientData, objc, objv);
}
static int
ArrayForNRCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const *objv)
@@ -3040,7 +3035,6 @@ ArrayForNRCmd(
ArraySearch *searchPtr = NULL;
Var *varPtr;
int isArray, numVars;
- (void)dummy;
/*
* array for {k v} a body
@@ -3263,7 +3257,7 @@ ArrayPopulateSearch(
static int
ArrayStartSearchCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -3271,7 +3265,6 @@ ArrayStartSearchCmd(
Var *varPtr;
int isArray;
ArraySearch *searchPtr;
- (void)dummy;
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "arrayName");
@@ -3360,7 +3353,7 @@ ArrayDoneSearch(
/* ARGSUSED */
static int
ArrayAnyMoreCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -3370,7 +3363,6 @@ ArrayAnyMoreCmd(
Tcl_Obj *varNameObj, *searchObj;
int gotValue, isArray;
ArraySearch *searchPtr;
- (void)dummy;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId");
@@ -3440,7 +3432,7 @@ ArrayAnyMoreCmd(
/* ARGSUSED */
static int
ArrayNextElementCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -3449,7 +3441,6 @@ ArrayNextElementCmd(
Tcl_Obj *varNameObj, *searchObj;
ArraySearch *searchPtr;
int isArray;
- (void)dummy;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId");
@@ -3522,7 +3513,7 @@ ArrayNextElementCmd(
/* ARGSUSED */
static int
ArrayDoneSearchCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -3532,7 +3523,6 @@ ArrayDoneSearchCmd(
Tcl_Obj *varNameObj, *searchObj;
ArraySearch *searchPtr;
int isArray;
- (void)dummy;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId");
@@ -3584,14 +3574,13 @@ ArrayDoneSearchCmd(
/* ARGSUSED */
static int
ArrayExistsCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
{
Interp *iPtr = (Interp *)interp;
int isArray;
- (void)dummy;
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "arrayName");
@@ -3626,7 +3615,7 @@ ArrayExistsCmd(
/* ARGSUSED */
static int
ArrayGetCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -3637,7 +3626,6 @@ ArrayGetCmd(
Tcl_HashSearch search;
const char *pattern;
int i, count, result, isArray;
- (void)dummy;
switch (objc) {
case 2:
@@ -3787,7 +3775,7 @@ ArrayGetCmd(
/* ARGSUSED */
static int
ArrayNamesCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -3801,7 +3789,6 @@ ArrayNamesCmd(
Tcl_HashSearch search;
const char *pattern = NULL;
int isArray, mode = OPT_GLOB;
- (void)dummy;
if ((objc < 2) || (objc > 4)) {
Tcl_WrongNumArgs(interp, 1, objv, "arrayName ?mode? ?pattern?");
@@ -3956,7 +3943,7 @@ TclFindArrayPtrElements(
/* ARGSUSED */
static int
ArraySetCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -3965,7 +3952,6 @@ ArraySetCmd(
Tcl_Obj *arrayElemObj;
Var *varPtr, *arrayPtr;
int result, i;
- (void)dummy;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "arrayName list");
@@ -4133,7 +4119,7 @@ ArraySetCmd(
/* ARGSUSED */
static int
ArraySizeCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -4142,7 +4128,6 @@ ArraySizeCmd(
Tcl_HashSearch search;
Var *varPtr2;
int isArray, size = 0;
- (void)dummy;
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "arrayName");
@@ -4194,7 +4179,7 @@ ArraySizeCmd(
/* ARGSUSED */
static int
ArrayStatsCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -4203,7 +4188,6 @@ ArrayStatsCmd(
Tcl_Obj *varNameObj;
char *stats;
int isArray;
- (void)dummy;
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "arrayName");
@@ -4250,7 +4234,7 @@ ArrayStatsCmd(
/* ARGSUSED */
static int
ArrayUnsetCmd(
- ClientData dummy,
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -4261,7 +4245,6 @@ ArrayUnsetCmd(
const char *pattern;
const int unsetFlags = 0; /* Should this be TCL_LEAVE_ERR_MSG? */
int isArray;
- (void)dummy;
switch (objc) {
case 2:
@@ -4820,7 +4803,7 @@ Tcl_GetVariableFullName(
int
Tcl_GlobalObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -4830,7 +4813,6 @@ Tcl_GlobalObjCmd(
const char *varName;
const char *tail;
int result, i;
- (void)dummy;
/*
* If we are not executing inside a Tcl procedure, just return.
@@ -4925,7 +4907,7 @@ Tcl_GlobalObjCmd(
int
Tcl_VariableObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -4936,7 +4918,6 @@ Tcl_VariableObjCmd(
Tcl_Obj *varValuePtr;
int i, result;
Tcl_Obj *varNamePtr, *tailPtr;
- (void)dummy;
for (i=1 ; i<objc ; i+=2) {
/*
@@ -5060,7 +5041,7 @@ Tcl_VariableObjCmd(
/* ARGSUSED */
int
Tcl_UpvarObjCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -5068,7 +5049,6 @@ Tcl_UpvarObjCmd(
CallFrame *framePtr;
int result, hasLevel;
Tcl_Obj *levelObj;
- (void)dummy;
if (objc < 3) {
Tcl_WrongNumArgs(interp, 1, objv,
@@ -5876,7 +5856,7 @@ ObjFindNamespaceVar(
int
TclInfoVarsCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -5891,7 +5871,6 @@ TclInfoVarsCmd(
Tcl_Obj *listPtr, *elemObjPtr, *varNamePtr;
int specificNsInPattern = 0;/* Init. to avoid compiler warning. */
Tcl_Obj *simplePatternPtr = NULL;
- (void)dummy;
/*
* Get the pattern and find the "effective namespace" in which to list
@@ -6068,7 +6047,7 @@ TclInfoVarsCmd(
int
TclInfoGlobalsCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -6078,7 +6057,6 @@ TclInfoGlobalsCmd(
Tcl_HashSearch search;
Var *varPtr;
Tcl_Obj *listPtr, *varNamePtr, *patternPtr;
- (void)dummy;
if (objc == 1) {
pattern = NULL;
@@ -6162,14 +6140,13 @@ TclInfoGlobalsCmd(
int
TclInfoLocalsCmd(
- 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;
Tcl_Obj *patternPtr, *listPtr;
- (void)dummy;
if (objc == 1) {
patternPtr = NULL;
@@ -6378,13 +6355,12 @@ TclInitVarHashTable(
static Tcl_HashEntry *
AllocVarEntry(
- Tcl_HashTable *tablePtr, /* 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;
Var *varPtr;
- (void)tablePtr;
varPtr = (Var *)Tcl_Alloc(sizeof(VarInHash));
varPtr->flags = VAR_IN_HASHTABLE;
@@ -6470,7 +6446,7 @@ CompareVarKeys(
/* ARGSUSED */
static int
ArrayDefaultCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -6482,7 +6458,6 @@ ArrayDefaultCmd(
Tcl_Obj *arrayNameObj, *defaultValueObj;
Var *varPtr, *arrayPtr;
int isArray, option;
- (void)dummy;
/*
* Parse arguments.
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index afba76b..397d1a6 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -386,8 +386,7 @@ static void ZipfsExitHandler(ClientData clientData);
static void ZipfsSetup(void);
static int ZipChannelClose(void *instanceData,
Tcl_Interp *interp, int flags);
-static int ZipChannelGetFile(void *instanceData,
- int direction, void **handlePtr);
+static Tcl_DriverGetHandleProc ZipChannelGetFile;
static int ZipChannelRead(void *instanceData, char *buf,
int toRead, int *errloc);
static Tcl_WideInt ZipChannelWideSeek(void *instanceData, Tcl_WideInt offset,
@@ -450,7 +449,7 @@ static Tcl_ChannelType ZipChannelType = {
NULL, /* Get options, NULL'able */
ZipChannelWatchChannel, /* Initialize notifier */
ZipChannelGetFile, /* Get OS handle from the channel */
- ZipChannelClose, /* 2nd version of close channel, NULL'able */
+ ZipChannelClose, /* 2nd version of close channel, NULL'able */
NULL, /* Set blocking mode for raw channel, NULL'able */
NULL, /* Function to flush channel, NULL'able */
NULL, /* Function to handle event, NULL'able */
@@ -1875,12 +1874,11 @@ TclZipfs_Unmount(
static int
ZipFSMountObjCmd(
- void *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 > 4) {
Tcl_WrongNumArgs(interp, 1, objv,
@@ -1911,7 +1909,7 @@ ZipFSMountObjCmd(
static int
ZipFSMountBufferObjCmd(
- void *dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -1919,7 +1917,6 @@ ZipFSMountBufferObjCmd(
const char *mountPoint; /* Mount point path. */
unsigned char *data;
size_t length = 0;
- (void)dummy;
if (objc > 3) {
Tcl_WrongNumArgs(interp, 1, objv, "?mountpoint? ?data?");
@@ -1964,15 +1961,11 @@ ZipFSMountBufferObjCmd(
static int
ZipFSRootObjCmd(
- void *dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
- Tcl_Obj *const objv[]) /* Argument objects. */
+ TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Obj *const *)) /*objv*/
{
- (void)dummy;
- (void)objc;
- (void)objv;
-
Tcl_SetObjResult(interp, Tcl_NewStringObj(ZIPFS_VOLUME, -1));
return TCL_OK;
}
@@ -1995,12 +1988,11 @@ ZipFSRootObjCmd(
static int
ZipFSUnmountObjCmd(
- void *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_WrongNumArgs(interp, 1, objv, "zipfile");
@@ -2028,14 +2020,13 @@ ZipFSUnmountObjCmd(
static int
ZipFSMkKeyObjCmd(
- void *dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int len, i = 0;
char *pw, passBuf[264];
- (void)dummy;
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "password");
@@ -2808,13 +2799,11 @@ ZipFSMkZipOrImgObjCmd(
static int
ZipFSMkZipObjCmd(
- void *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 < 3 || objc > 5) {
Tcl_WrongNumArgs(interp, 1, objv, "outfile indir ?strip? ?password?");
return TCL_ERROR;
@@ -2830,13 +2819,11 @@ ZipFSMkZipObjCmd(
static int
ZipFSLMkZipObjCmd(
- void *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 < 3 || objc > 4) {
Tcl_WrongNumArgs(interp, 1, objv, "outfile inlist ?password?");
return TCL_ERROR;
@@ -2869,13 +2856,11 @@ ZipFSLMkZipObjCmd(
static int
ZipFSMkImgObjCmd(
- void *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 < 3 || objc > 6) {
Tcl_WrongNumArgs(interp, 1, objv,
"outfile indir ?strip? ?password? ?infile?");
@@ -2892,13 +2877,11 @@ ZipFSMkImgObjCmd(
static int
ZipFSLMkImgObjCmd(
- void *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 < 3 || objc > 5) {
Tcl_WrongNumArgs(interp, 1, objv, "outfile inlist ?password infile?");
return TCL_ERROR;
@@ -2931,7 +2914,7 @@ ZipFSLMkImgObjCmd(
static int
ZipFSCanonicalObjCmd(
- void *dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -2940,7 +2923,6 @@ ZipFSCanonicalObjCmd(
char *filename = NULL;
char *result;
Tcl_DString dPath;
- (void)dummy;
if (objc < 2 || objc > 4) {
Tcl_WrongNumArgs(interp, 1, objv, "?mountpoint? filename ?inZipfs?");
@@ -2988,7 +2970,7 @@ ZipFSCanonicalObjCmd(
static int
ZipFSExistsObjCmd(
- void *dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -2996,7 +2978,6 @@ ZipFSExistsObjCmd(
char *filename;
int exists;
Tcl_DString ds;
- (void)dummy;
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "filename");
@@ -3042,14 +3023,13 @@ ZipFSExistsObjCmd(
static int
ZipFSInfoObjCmd(
- void *dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
char *filename;
ZipEntry *z;
- (void)dummy;
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "filename");
@@ -3093,7 +3073,7 @@ ZipFSInfoObjCmd(
static int
ZipFSListObjCmd(
- void *dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -3103,7 +3083,6 @@ ZipFSListObjCmd(
Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
Tcl_Obj *result = Tcl_GetObjResult(interp);
- (void)dummy;
if (objc > 3) {
Tcl_WrongNumArgs(interp, 1, objv, "?(-glob|-regexp)? ?pattern?");
@@ -3291,15 +3270,11 @@ TclZipfs_TclLibrary(void)
static int
ZipFSTclLibraryObjCmd(
- void *dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
- Tcl_Obj *const objv[]) /* Argument objects. */
+ TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Obj *const *)) /*objv*/
{
- (void)dummy;
- (void)objc;
- (void)objv;
-
if (!Tcl_IsSafe(interp)) {
Tcl_Obj *pResult = TclZipfs_TclLibrary();
@@ -3330,11 +3305,10 @@ ZipFSTclLibraryObjCmd(
static int
ZipChannelClose(
void *instanceData,
- Tcl_Interp *dummy, /* Current interpreter. */
+ TCL_UNUSED(Tcl_Interp *),
int flags)
{
ZipChannel *info = (ZipChannel *)instanceData;
- (void)dummy;
if ((flags & (TCL_CLOSE_READ | TCL_CLOSE_WRITE)) != 0) {
return EINVAL;
@@ -3585,12 +3559,9 @@ ZipChannelWideSeek(
static void
ZipChannelWatchChannel(
- void *instanceData,
- int mask)
+ TCL_UNUSED(ClientData),
+ TCL_UNUSED(int) /*mask*/)
{
- (void)instanceData;
- (void)mask;
-
return;
}
@@ -3613,14 +3584,10 @@ ZipChannelWatchChannel(
static int
ZipChannelGetFile(
- void *instanceData,
- int direction,
- void **handlePtr)
+ TCL_UNUSED(ClientData),
+ TCL_UNUSED(int) /*direction*/,
+ TCL_UNUSED(ClientData *) /*handlePtr*/)
{
- (void)instanceData;
- (void)direction;
- (void)handlePtr;
-
return TCL_ERROR;
}
@@ -3646,13 +3613,12 @@ ZipChannelOpen(
Tcl_Interp *interp, /* Current interpreter. */
char *filename,
int mode,
- int permissions)
+ TCL_UNUSED(int) /*permissions*/)
{
ZipEntry *z;
ZipChannel *info;
int i, ch, trunc, wr, flags = 0;
char cname[128];
- (void)permissions;
if ((mode & O_APPEND)
|| ((ZipFS.wrmax <= 0) && (mode & (O_WRONLY | O_RDWR)))) {
@@ -4168,10 +4134,8 @@ ZipFSAccessProc(
static Tcl_Obj *
ZipFSFilesystemSeparatorProc(
- Tcl_Obj *pathPtr)
+ TCL_UNUSED(Tcl_Obj *) /*pathPtr*/)
{
- (void)pathPtr;
-
return Tcl_NewStringObj("/", -1);
}
@@ -4196,7 +4160,7 @@ ZipFSFilesystemSeparatorProc(
static int
ZipFSMatchInDirectoryProc(
- Tcl_Interp *dummy, /* Current interpreter. */
+ TCL_UNUSED(Tcl_Interp *),
Tcl_Obj *result,
Tcl_Obj *pathPtr,
const char *pattern,
@@ -4209,7 +4173,6 @@ ZipFSMatchInDirectoryProc(
size_t len, prefixLen;
char *pat, *prefix, *path;
Tcl_DString dsPref;
- (void)dummy;
if (!normPathPtr) {
return -1;
@@ -4387,14 +4350,13 @@ ZipFSMatchInDirectoryProc(
static int
ZipFSPathInFilesystemProc(
Tcl_Obj *pathPtr,
- void **dummy)
+ TCL_UNUSED(ClientData *))
{
Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
int ret = -1;
size_t len;
char *path;
- (void)dummy;
pathPtr = Tcl_FSGetNormalizedPath(NULL, pathPtr);
if (!pathPtr) {
@@ -4482,8 +4444,8 @@ ZipFSListVolumesProc(void)
static const char *const *
ZipFSFileAttrStringsProc(
- Tcl_Obj *pathPtr,
- Tcl_Obj **objPtrRef)
+ TCL_UNUSED(Tcl_Obj *) /*pathPtr*/,
+ TCL_UNUSED(Tcl_Obj **) /*objPtrRef*/)
{
static const char *const attrs[] = {
"-uncompsize",
@@ -4494,8 +4456,6 @@ ZipFSFileAttrStringsProc(
"-permissions",
NULL,
};
- (void)pathPtr;
- (void)objPtrRef;
return attrs;
}
@@ -4594,14 +4554,10 @@ ZipFSFileAttrsGetProc(
static int
ZipFSFileAttrsSetProc(
Tcl_Interp *interp, /* Current interpreter. */
- int index,
- Tcl_Obj *pathPtr,
- Tcl_Obj *objPtr)
+ TCL_UNUSED(int) /*index*/,
+ TCL_UNUSED(Tcl_Obj *) /*pathPtr*/,
+ TCL_UNUSED(Tcl_Obj *) /*objPtr*/)
{
- (void)index;
- (void)pathPtr;
- (void)objPtr;
-
if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("unsupported operation", -1));
Tcl_SetErrorCode(interp, "TCL", "ZIPFS", "UNSUPPORTED_OP", NULL);
@@ -4623,9 +4579,8 @@ ZipFSFileAttrsSetProc(
static Tcl_Obj *
ZipFSFilesystemPathTypeProc(
- Tcl_Obj *pathPtr)
+ TCL_UNUSED(Tcl_Obj *) /*pathPtr*/)
{
- (void)pathPtr;
return Tcl_NewStringObj("zip", -1);
}
@@ -4907,18 +4862,20 @@ ZipfsExitHandler(
int
TclZipfs_AppHook(
+#ifdef SUPPORT_BUILTIN_ZIP_INSTALL
int *argcPtr, /* Pointer to argc */
+#else
+ TCL_UNUSED(int *) /*argcPtr*/,
+#endif
#ifdef _WIN32
- WCHAR
+ TCL_UNUSED(WCHAR ***)argvPtr,
#else /* !_WIN32 */
- char
+ char ***argvPtr) /* Pointer to argv */
#endif /* _WIN32 */
- ***argvPtr) /* Pointer to argv */
{
char *archive;
#ifdef _WIN32
- (void)argvPtr;
Tcl_FindExecutable(NULL);
#else
Tcl_FindExecutable((*argvPtr)[0]);
@@ -5022,8 +4979,6 @@ TclZipfs_AppHook(
#ifdef _WIN32
Tcl_DStringFree(&ds);
#endif /* _WIN32 */
-#else
- (void)argcPtr;
#endif /* SUPPORT_BUILTIN_ZIP_INSTALL */
}
return TCL_OK;