From 8c60b1157a27a535111861c5a83b64d502ec1948 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 3 Sep 2019 20:32:33 +0000 Subject: Mark more unused parameters --- generic/tclEvent.c | 7 ++++--- generic/tclObj.c | 17 ++++++++++++++++- generic/tclPathObj.c | 9 ++++++--- generic/tclPkg.c | 18 +++++++++++++++--- generic/tclScan.c | 1 + generic/tclStringObj.c | 7 ++++++- generic/tclTestProcBodyObj.c | 2 ++ generic/tclThreadTest.c | 6 +++++- generic/tclTrace.c | 2 ++ generic/tclUtil.c | 6 +++--- generic/tclVar.c | 8 +++++++- generic/tclZlib.c | 3 ++- macosx/tclMacOSXBundle.c | 3 ++- macosx/tclMacOSXNotify.c | 6 +++++- unix/tclLoadDyld.c | 6 +++++- unix/tclUnixInit.c | 4 ++++ unix/tclUnixSock.c | 11 +++++++++-- unix/tclUnixTest.c | 37 ++++++++++++++++++++++++++++--------- unix/tclUnixTime.c | 5 ++++- 19 files changed, 126 insertions(+), 32 deletions(-) diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 7c499b5..91bc995 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -1467,17 +1467,18 @@ Tcl_VwaitObjCmd( static char * VwaitVarProc( void *clientData, /* Pointer to integer to set to 1. */ - Tcl_Interp *interp, /* Interpreter containing variable. */ + Tcl_Interp *dummy, /* Interpreter containing variable. */ const char *name1, /* Name of variable. */ const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { int *donePtr = (int *)clientData; + (void)dummy; (void)flags; + (void)name1; + (void)name2; *donePtr = 1; - Tcl_UntraceVar(interp, name1, TCL_TRACE_WRITES|TCL_TRACE_UNSETS, - VwaitVarProc, clientData); return NULL; } diff --git a/generic/tclObj.c b/generic/tclObj.c index cbba762..edbf50b 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -786,8 +786,9 @@ TclContinuationsGet( static void TclThreadFinalizeContLines( - ClientData clientData) + ClientData dummy) { + (void)dummy; /* * Release the hashtable tracking invisible continuation lines. */ @@ -1024,6 +1025,8 @@ TclDbDumpActiveObjects( } } } +#else + (void)outFile; #endif } @@ -1200,6 +1203,9 @@ Tcl_DbNewObj( int line) /* Line number in the source file; used for * debugging. */ { + (void)file; + (void)line; + return Tcl_NewObj(); } #endif /* TCL_MEM_DEBUG */ @@ -2038,6 +2044,9 @@ Tcl_DbNewBooleanObj( int line) /* Line number in the source file; used for * debugging. */ { + (void)file; + (void)line; + return Tcl_NewBooleanObj(boolValue); } #endif /* TCL_MEM_DEBUG */ @@ -2425,6 +2434,9 @@ Tcl_DbNewDoubleObj( int line) /* Line number in the source file; used for * debugging. */ { + (void)file; + (void)line; + return Tcl_NewDoubleObj(dblValue); } #endif /* TCL_MEM_DEBUG */ @@ -2909,6 +2921,9 @@ Tcl_DbNewLongObj( int line) /* Line number in the source file; used for * debugging. */ { + (void)file; + (void)line; + return Tcl_NewWideIntObj(longValue); } #endif /* TCL_MEM_DEBUG */ diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 9e62c7c..41fb0c6 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -1402,13 +1402,14 @@ AppendPath( Tcl_Obj * TclFSMakePathRelative( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ + Tcl_Interp *dummy, /* Used for error reporting if not NULL. */ 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); @@ -1473,10 +1474,11 @@ TclFSMakePathRelative( static int MakePathFromNormalized( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ + Tcl_Interp *dummy, /* Not used. */ Tcl_Obj *pathPtr) /* The object to convert. */ { FsPath *fsPathPtr; + (void)dummy; if (TclHasIntRep(pathPtr, &fsPathType)) { return TCL_OK; @@ -2548,8 +2550,9 @@ UpdateStringOfFsPath( int TclNativePathInFilesystem( Tcl_Obj *pathPtr, - ClientData *clientDataPtr) + ClientData *dummy) { + (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 98c9cf3..0a32f48 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -226,11 +226,12 @@ Tcl_PkgProvideEx( static void PkgFilesCleanupProc( ClientData clientData, - Tcl_Interp *interp) + Tcl_Interp *dummy) { PkgFiles *pkgFiles = (PkgFiles *) clientData; Tcl_HashSearch search; Tcl_HashEntry *entry; + (void)dummy; while (pkgFiles->names) { PkgName *name = pkgFiles->names; @@ -466,6 +467,7 @@ PkgRequireCore( Tcl_Obj **reqv = (Tcl_Obj **)data[2]; int code = CheckAllRequirements(interp, reqc, reqv); Require *reqPtr; + (void)result; if (code != TCL_OK) { return code; @@ -498,6 +500,7 @@ 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 @@ -592,6 +595,7 @@ 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( @@ -635,9 +639,11 @@ PkgRequireCoreFinal( static int PkgRequireCoreCleanup( ClientData data[], - Tcl_Interp *interp, + Tcl_Interp *dummy, int result) { + (void)dummy; + ckfree(data[0]); return result; } @@ -658,6 +664,7 @@ 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 @@ -1057,6 +1064,8 @@ Tcl_PackageObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + return Tcl_NRCallObjProc(interp, TclNRPackageObjCmd, NULL, objc, objv); } @@ -1089,6 +1098,7 @@ 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 ...?"); @@ -1536,9 +1546,11 @@ TclNRPackageObjCmd( static int TclNRPackageObjCmdCleanup( ClientData data[], - Tcl_Interp *interp, + Tcl_Interp *dummy, int result) { + (void)dummy; + TclDecrRefCount((Tcl_Obj *) data[0]); TclDecrRefCount((Tcl_Obj *) data[1]); return result; diff --git a/generic/tclScan.c b/generic/tclScan.c index b6d4132..78fd3be 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -584,6 +584,7 @@ Tcl_ScanObjCmd( char buf[513]; /* Temporary buffer to hold scanned number * strings before they are passed to * strtoul. */ + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index c4f4f87..5bdf496 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -347,6 +347,9 @@ Tcl_DbNewStringObj( int line) /* Line number in the source file; used for * debugging. */ { + (void)file; + (void)line; + return Tcl_NewStringObj(bytes, length); } #endif /* TCL_MEM_DEBUG */ @@ -4166,9 +4169,11 @@ DupStringInternalRep( static int SetStringFromAny( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ + Tcl_Interp *dummy, /* Not used. */ Tcl_Obj *objPtr) /* The object to convert. */ { + (void)dummy; + if (!TclHasIntRep(objPtr, &tclStringType)) { String *stringPtr = stringAlloc(0); diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index 59379de..b6ac741 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -240,6 +240,7 @@ ProcBodyTestProcObjCmd( Tcl_Obj *bodyObjPtr; Tcl_Obj *myobjv[5]; int result; + (void)dummy; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "newName argsList bodyName"); @@ -333,6 +334,7 @@ ProcBodyTestCheckObjCmd( Tcl_Obj *const objv[]) /* arguments */ { const char *version; + (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, ""); diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 48aa445..7fc748e 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -223,6 +223,7 @@ ThreadObjCmd( THREAD_ID, THREAD_JOIN, THREAD_NAMES, THREAD_SEND, THREAD_WAIT, THREAD_ERRORPROC }; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); @@ -1018,6 +1019,7 @@ ThreadEventProc( Tcl_Interp *interp = tsdPtr->interp; int code; const char *result, *errorCode, *errorInfo; + (void)mask; if (interp == NULL) { code = TCL_ERROR; @@ -1109,8 +1111,10 @@ ThreadFreeProc( static int ThreadDeleteEvent( Tcl_Event *eventPtr, /* Really ThreadEvent */ - void *clientData) /* dummy */ + void *dummy) /* dummy */ { + (void)dummy; + if (eventPtr->proc == ThreadEventProc) { ckfree(((ThreadEvent *) eventPtr)->script); return 1; diff --git a/generic/tclTrace.c b/generic/tclTrace.c index 3dac23f..4725e97 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -210,6 +210,7 @@ Tcl_TraceObjCmd( TRACE_OLD_VARIABLE, TRACE_OLD_VDELETE, TRACE_OLD_VINFO #endif }; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); @@ -1050,6 +1051,7 @@ Tcl_CommandTraceInfo( { Command *cmdPtr; CommandTrace *tracePtr; + (void)flags; cmdPtr = (Command *) Tcl_FindCommand(interp, cmdName, NULL, TCL_LEAVE_ERR_MSG); diff --git a/generic/tclUtil.c b/generic/tclUtil.c index f1133e3..b4f0e79 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -2479,6 +2479,7 @@ TclByteArrayMatch( { const unsigned char *stringEnd, *patternEnd; unsigned char p; + (void)flags; stringEnd = string + strLen; patternEnd = pattern + ptnLen; @@ -3263,9 +3264,7 @@ Tcl_DStringEndSublist( void Tcl_PrintDouble( - Tcl_Interp *interp, /* Interpreter whose tcl_precision variable - * used to be used to control printing. It's - * ignored now. */ + Tcl_Interp *dummy, /* Not used. */ double value, /* Value to print as string. */ char *dst) /* Where to store converted value; must have * at least TCL_DOUBLE_SPACE characters. */ @@ -3276,6 +3275,7 @@ Tcl_PrintDouble( char *digits; char *end; int *precisionPtr = (int *)Tcl_GetThreadData(&precisionKey, sizeof(int)); + (void)dummy; /* * Handle NaN. diff --git a/generic/tclVar.c b/generic/tclVar.c index 6526e25..bcb12ca 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -1534,6 +1534,7 @@ Tcl_SetObjCmd( 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); @@ -2830,6 +2831,7 @@ Tcl_UnsetObjCmd( { int i, flags = TCL_LEAVE_ERR_MSG; const char *name; + (void)dummy; if (objc == 1) { /* @@ -2900,6 +2902,7 @@ 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 ...?"); @@ -2966,6 +2969,7 @@ Tcl_LappendObjCmd( int numElems, createdNewObj; Var *varPtr, *arrayPtr; int result; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "varName ?value ...?"); @@ -3182,6 +3186,7 @@ ArrayForNRCmd( ArraySearch *searchPtr = NULL; Var *varPtr; int isArray, numVars; + (void)dummy; /* * array for {k v} a body @@ -3404,7 +3409,7 @@ ArrayPopulateSearch( static int ArrayStartSearchCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -3412,6 +3417,7 @@ ArrayStartSearchCmd( Var *varPtr; int isArray; ArraySearch *searchPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "arrayName"); diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 09195a2..71f0ad5 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -1920,7 +1920,7 @@ Tcl_ZlibAdler32( static int ZlibCmd( - void *notUsed, + void *dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1939,6 +1939,7 @@ ZlibCmd( CMD_ADLER, CMD_COMPRESS, CMD_CRC, CMD_DECOMPRESS, CMD_DEFLATE, CMD_GUNZIP, CMD_GZIP, CMD_INFLATE, CMD_PUSH, CMD_STREAM }; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command arg ?...?"); diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c index 915f290..81d8d04 100644 --- a/macosx/tclMacOSXBundle.c +++ b/macosx/tclMacOSXBundle.c @@ -197,7 +197,7 @@ Tcl_MacOSXOpenBundleResources( int Tcl_MacOSXOpenVersionedBundleResources( - Tcl_Interp *interp, + Tcl_Interp *dummy, const char *bundleName, const char *bundleVersion, int hasResourceFile, @@ -208,6 +208,7 @@ Tcl_MacOSXOpenVersionedBundleResources( CFBundleRef bundleRef, versionedBundleRef = NULL; CFStringRef bundleNameRef; CFURLRef libURL; + (void)dummy; libraryPath[0] = '\0'; diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index 945ea4b..1523400 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -945,6 +945,8 @@ TimerWakeUp( CFRunLoopTimerRef timer, void *info) { + (void)timer; + (void)info; } /* @@ -1453,6 +1455,7 @@ UpdateWaitingListAndServiceEvents( void *info) { ThreadSpecificData *tsdPtr = (ThreadSpecificData *)info; + (void)observer; if (tsdPtr->sleeping) { return; @@ -1827,13 +1830,14 @@ TclUnixWaitForFile( static TCL_NORETURN void NotifierThreadProc( - ClientData clientData) /* Not used. */ + ClientData dummy) /* Not used. */ { ThreadSpecificData *tsdPtr; fd_set readableMask, writableMask, exceptionalMask; int i, numFdBits = 0, polling; struct timeval poll = {0., 0.}, *timePtr; char buf[2]; + (void)dummy; /* * Look for file events and report them to interested threads. diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index 14e05b2..9d4e99c 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -491,6 +491,9 @@ TclGuessPackageName( Tcl_DString *bufPtr) /* Initialized empty dstring. Append package * name to this if possible. */ { + (void)fileName; + (void)bufPtr; + return 0; } @@ -513,10 +516,11 @@ TclGuessPackageName( #ifdef TCL_LOAD_FROM_MEMORY MODULE_SCOPE void * TclpLoadMemoryGetBuffer( - Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Interp *dummy, /* Used for error reporting. */ int size) /* Size of desired buffer. */ { void *buffer = NULL; + (void)dummy; /* * NSCreateObjectFileImageFromMemory is available but always fails diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 341a70b..a3a64a9 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -1062,6 +1062,10 @@ MacOSXGetLibraryPath( foundInFramework = Tcl_MacOSXOpenVersionedBundleResources(interp, "com.tcltk.tcllibrary", TCL_FRAMEWORK_VERSION, 0, maxPathLen, tclLibPath); +#else + (void)interp; + (void)maxPathLen; + (void)tclLibPath; #endif return foundInFramework; diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index c061a78..993ee95 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -334,8 +334,10 @@ Tcl_GetHostName(void) int TclpHasSockets( - Tcl_Interp *interp) /* Not used. */ + Tcl_Interp *dummy) /* Not used. */ { + (void)dummy; + return TCL_OK; } @@ -621,11 +623,12 @@ TcpOutputProc( static int TcpCloseProc( void *instanceData, /* The socket to close. */ - Tcl_Interp *interp) /* For error reporting - unused. */ + Tcl_Interp *dummy) /* For error reporting - unused. */ { 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 @@ -1116,6 +1119,7 @@ TcpGetHandleProc( void **handlePtr) /* Where to store the handle. */ { TcpState *statePtr = (TcpState *)instanceData; + (void)direction; *handlePtr = INT2PTR(statePtr->fds.fd); return TCL_OK; @@ -1140,6 +1144,8 @@ TcpAsyncCallback( * TCL_READABLE, TCL_WRITABLE and * TCL_EXCEPTION. */ { + (void)mask; + TcpConnect(NULL, (TcpState *)clientData); } @@ -1779,6 +1785,7 @@ 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 eb91ba1..7b0719e 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -138,7 +138,7 @@ TclplatformtestInit( static int TestfilehandlerCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -148,6 +148,7 @@ TestfilehandlerCmd( static int initialized = 0; char buffer[4000]; TclFile file; + (void)dummy; /* * NOTE: When we make this code work on Windows also, the following @@ -360,7 +361,7 @@ TestFileHandlerProc( static int TestfilewaitCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -369,6 +370,7 @@ TestfilewaitCmd( Tcl_Channel channel; int fd; ClientData data; + (void)dummy; if (argc != 4) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -429,12 +431,13 @@ TestfilewaitCmd( static int TestfindexecutableCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { Tcl_Obj *saveName; + (void)dummy; if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -472,12 +475,13 @@ TestfindexecutableCmd( static int TestgetopenfileCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { ClientData filePtr; + (void)dummy; if (argc != 3) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -515,11 +519,13 @@ TestgetopenfileCmd( static int TestsetencpathObjCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* Argument strings. */ { + (void)dummy; + if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "defaultDir"); return TCL_ERROR; @@ -548,12 +554,13 @@ TestsetencpathObjCmd( static int TestforkObjCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ 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, ""); @@ -593,11 +600,13 @@ TestforkObjCmd( static int TestgetencpathObjCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* Argument strings. */ { + (void)dummy; + if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, ""); return TCL_ERROR; @@ -627,7 +636,7 @@ TestgetencpathObjCmd( static int TestalarmCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -635,6 +644,7 @@ TestalarmCmd( #ifdef SA_RESTART unsigned int sec; struct sigaction action; + (void)dummy; if (argc > 1) { Tcl_GetInt(interp, argv[1], (int *)&sec); @@ -658,6 +668,8 @@ TestalarmCmd( (void) alarm(sec); return TCL_OK; #else + (void)dummy; + Tcl_AppendResult(interp, "warning: sigaction SA_RESTART not support on this platform", NULL); @@ -685,6 +697,8 @@ static void AlarmHandler( int signum) { + (void)signum; + gotsig = "1"; } @@ -706,11 +720,15 @@ AlarmHandler( static int TestgotsigCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { + (void)dummy; + (void)argc; + (void)argv; + Tcl_AppendResult(interp, gotsig, NULL); gotsig = "0"; return TCL_OK; @@ -743,6 +761,7 @@ TestchmodCmd( 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 fb0b5e1..fb649d2 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -511,6 +511,8 @@ NativeScaleTime( Tcl_Time *timePtr, ClientData clientData) { + (void)timePtr; + (void)clientData; /* Native scale is 1:1. Nothing is done */ } @@ -534,9 +536,10 @@ NativeScaleTime( static void NativeGetTime( Tcl_Time *timePtr, - ClientData clientData) + ClientData dummy) { struct timeval tv; + (void)dummy; (void) gettimeofday(&tv, NULL); timePtr->sec = tv.tv_sec; -- cgit v0.12