From 683144e7f0a62bea19fb406f3f3cb377a9eb7d58 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 9 Mar 2020 16:13:11 +0000 Subject: TCL_UNUSED for win sources. --- win/tclAppInit.c | 3 +-- win/tclWin32Dll.c | 6 ++---- win/tclWinChan.c | 13 ++++--------- win/tclWinConsole.c | 20 ++++++-------------- win/tclWinFCmd.c | 11 +++-------- win/tclWinFile.c | 3 +-- win/tclWinLoad.c | 12 +++--------- win/tclWinPipe.c | 18 ++++++------------ win/tclWinSerial.c | 19 ++++++------------- win/tclWinSock.c | 19 ++++++------------- win/tclWinTest.c | 40 +++++++++++++--------------------------- win/tclWinTime.c | 17 +++++------------ 12 files changed, 56 insertions(+), 125 deletions(-) diff --git a/win/tclAppInit.c b/win/tclAppInit.c index 0a47000..105af65 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -87,11 +87,10 @@ MODULE_SCOPE int TCL_LOCAL_MAIN_HOOK(int *argc, TCHAR ***argv); int main( int argc, /* Number of command-line arguments. */ - char *dummy[]) /* Not used. */ + TCL_UNUSED(char **)) { TCHAR **argv; TCHAR *p; - (void)dummy; #else int _tmain( diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index 821ac35..156ec9e 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -90,7 +90,7 @@ BOOL APIENTRY DllEntryPoint( HINSTANCE hInst, /* Library instance handle. */ DWORD reason, /* Reason this function is being called. */ - LPVOID reserved) /* Not used. */ + LPVOID reserved) { return DllMain(hInst, reason, reserved); } @@ -117,10 +117,8 @@ BOOL APIENTRY DllMain( HINSTANCE hInst, /* Library instance handle. */ DWORD reason, /* Reason this function is being called. */ - LPVOID reserved) /* Not used. */ + TCL_UNUSED(LPVOID)) { - (void)reserved; - switch (reason) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hInst); diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 7ffd6b5..b13dbd2 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -186,10 +186,8 @@ FileInit(void) static void FileChannelExitHandler( - ClientData dummy) /* Old window proc */ + TCL_UNUSED(ClientData)) { - (void)dummy; - Tcl_DeleteEventSource(FileSetupProc, FileCheckProc, NULL); } @@ -212,13 +210,12 @@ FileChannelExitHandler( void FileSetupProc( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), int flags) /* Event flags as passed to Tcl_DoOneEvent. */ { FileInfo *infoPtr; Tcl_Time blockTime = { 0, 0 }; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - (void)dummy; if (!TEST_FLAG(flags, TCL_FILE_EVENTS)) { return; @@ -256,13 +253,12 @@ FileSetupProc( static void FileCheckProc( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), int flags) /* Event flags as passed to Tcl_DoOneEvent. */ { FileEvent *evPtr; FileInfo *infoPtr; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - (void)dummy; if (!TEST_FLAG(flags, TCL_FILE_EVENTS)) { return; @@ -396,14 +392,13 @@ FileBlockProc( static int FileCloseProc( ClientData instanceData, /* Pointer to FileInfo structure. */ - Tcl_Interp *dummy, /* Not used. */ + TCL_UNUSED(Tcl_Interp *), int flags) { FileInfo *fileInfoPtr = (FileInfo *)instanceData; FileInfo *infoPtr; ThreadSpecificData *tsdPtr; int errorCode = 0; - (void)dummy; if ((flags & (TCL_CLOSE_READ | TCL_CLOSE_WRITE)) != 0) { return EINVAL; diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index 4c1aec0..3b8753b 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -317,10 +317,8 @@ ConsoleInit(void) static void ConsoleExitHandler( - ClientData dummy) /* Old window proc. */ + TCL_UNUSED(ClientData)) { - (void)dummy; - Tcl_DeleteEventSource(ConsoleSetupProc, ConsoleCheckProc, NULL); } @@ -343,10 +341,8 @@ ConsoleExitHandler( static void ProcExitHandler( - ClientData dummy) /* Old window proc. */ + TCL_UNUSED(ClientData)) { - (void)dummy; - Tcl_MutexLock(&consoleMutex); initialized = 0; Tcl_MutexUnlock(&consoleMutex); @@ -371,14 +367,13 @@ ProcExitHandler( void ConsoleSetupProc( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), int flags) /* Event flags as passed to Tcl_DoOneEvent. */ { ConsoleInfo *infoPtr; Tcl_Time blockTime = { 0, 0 }; int block = 1; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - (void)dummy; if (!(flags & TCL_FILE_EVENTS)) { return; @@ -426,13 +421,12 @@ ConsoleSetupProc( static void ConsoleCheckProc( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), int flags) /* Event flags as passed to Tcl_DoOneEvent. */ { ConsoleInfo *infoPtr; int needEvent; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - (void)dummy; if (!(flags & TCL_FILE_EVENTS)) { return; @@ -537,14 +531,13 @@ ConsoleBlockModeProc( static int ConsoleCloseProc( ClientData instanceData, /* Pointer to ConsoleInfo structure. */ - Tcl_Interp *dummy, /* For error reporting. */ + TCL_UNUSED(Tcl_Interp *), int flags) { ConsoleInfo *consolePtr = (ConsoleInfo *)instanceData; int errorCode = 0; ConsoleInfo *infoPtr, **nextPtrPtr; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - (void)dummy; if ((flags & (TCL_CLOSE_READ | TCL_CLOSE_WRITE)) != 0) { return EINVAL; @@ -995,11 +988,10 @@ ConsoleWatchProc( static int ConsoleGetHandleProc( ClientData instanceData, /* The console state. */ - int direction, /* TCL_READABLE or TCL_WRITABLE. */ + TCL_UNUSED(int) /*direction*/, ClientData *handlePtr) /* Where to store the handle. */ { ConsoleInfo *infoPtr = (ConsoleInfo *)instanceData; - (void)direction; *handlePtr = infoPtr->handle; return TCL_OK; diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index b9a5342..347c5e9 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -1427,13 +1427,11 @@ TraversalCopy( static int TraversalDelete( const WCHAR *nativeSrc, /* Source pathname to delete. */ - const WCHAR *dstPtr, /* Not used. */ + TCL_UNUSED(const WCHAR *) /*dstPtr*/, int type, /* Reason for call - see TraverseWinTree() */ Tcl_DString *errorPtr) /* If non-NULL, initialized DString filled * with UTF-8 name of file causing error. */ { - (void)dstPtr; - switch (type) { case DOTREE_F: if (TclpDeleteFile(nativeSrc) == TCL_OK) { @@ -1592,14 +1590,13 @@ GetWinFileAttributes( static int ConvertFileNameFormat( 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. */ int longShort, /* 0 to short name, 1 to long name. */ Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */ { int pathc, i; Tcl_Obj *splitPath; - (void)objIndex; splitPath = Tcl_FSSplitPath(fileName, &pathc); @@ -1895,10 +1892,8 @@ CannotSetAttribute( Tcl_Interp *interp, /* The interp we are using for errors. */ int objIndex, /* The index of the attribute. */ Tcl_Obj *fileName, /* The name of the file. */ - Tcl_Obj *attributePtr) /* The new value of the attribute. */ + TCL_UNUSED(Tcl_Obj *) /*attributePtr*/) { - (void)attributePtr; - Tcl_SetObjResult(interp, Tcl_ObjPrintf( "cannot set attribute \"%s\" for file \"%s\": attribute is readonly", tclpFileAttrStrings[objIndex], Tcl_GetString(fileName))); diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 1380217..d2777d7 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -2541,7 +2541,7 @@ TclpFilesystemPathType( 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 */ @@ -2552,7 +2552,6 @@ TclpObjNormalizePath( Tcl_Obj *temp = NULL; int isDrive = 1; Tcl_DString ds; /* Some workspace. */ - (void)dummy; Tcl_DStringInit(&dsNorm); path = Tcl_GetString(pathPtr); diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index 3f48f7c..1a74618 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -61,13 +61,12 @@ TclpDlopen( /* Filled with address of Tcl_FSUnloadFileProc * function which should be used for this * file. */ - int flags) + TCL_UNUSED(int) /*flags*/) { HINSTANCE hInstance = NULL; const WCHAR *nativeName; Tcl_LoadHandle handlePtr; DWORD firstError; - (void)flags; /* * First try the full path the user gave us. This is particularly @@ -282,14 +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 *), + TCL_UNUSED(Tcl_DString *)) { - (void)fileName; - (void)bufPtr; - return 0; } diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 26f0b3e..7066bd2 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -310,14 +310,13 @@ TclpFinalizePipes(void) void PipeSetupProc( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), int flags) /* Event flags as passed to Tcl_DoOneEvent. */ { PipeInfo *infoPtr; Tcl_Time blockTime = { 0, 0 }; int block = 1; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - (void)dummy; if (!(flags & TCL_FILE_EVENTS)) { return; @@ -364,14 +363,13 @@ PipeSetupProc( static void PipeCheckProc( - ClientData dummy, /* Not used. */ + TCL_UNUNSED(ClientData), int flags) /* Event flags as passed to Tcl_DoOneEvent. */ { PipeInfo *infoPtr; PipeEvent *evPtr; int needEvent; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - (void)dummy; if (!(flags & TCL_FILE_EVENTS)) { return; @@ -1858,11 +1856,10 @@ Tcl_CreatePipe( Tcl_Interp *interp, /* Errors returned in result.*/ Tcl_Channel *rchan, /* Where to return the read side. */ Tcl_Channel *wchan, /* Where to return the write side. */ - int flags) /* Reserved for future use. */ + TCL_UNUSED(int) /*flags*/) /* Reserved for future use. */ { HANDLE readHandle, writeHandle; SECURITY_ATTRIBUTES sec; - (void)flags; sec.nLength = sizeof(SECURITY_ATTRIBUTES); sec.lpSecurityDescriptor = NULL; @@ -2746,7 +2743,7 @@ TclWinAddProcess( /* ARGSUSED */ int Tcl_PidObjCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* Argument strings. */ @@ -2756,7 +2753,6 @@ Tcl_PidObjCmd( PipeInfo *pipePtr; int i; Tcl_Obj *resultPtr; - (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?channelId?"); @@ -3193,9 +3189,9 @@ PipeThreadActionProc( Tcl_Channel TclpOpenTemporaryFile( - Tcl_Obj *dirObj, + TCL_UNUSED(Tcl_Obj *) /*dirObj*/, Tcl_Obj *basenameObj, - Tcl_Obj *extensionObj, + TCL_UNUSED(Tcl_Obj *) /*extensionObj*/, Tcl_Obj *resultingNameObj) { WCHAR name[MAX_PATH]; @@ -3204,8 +3200,6 @@ TclpOpenTemporaryFile( DWORD flags = FILE_ATTRIBUTE_TEMPORARY; int length, counter, counter2; Tcl_DString buf; - (void)dirObj; - (void)extensionObj; if (!resultingNameObj) { flags |= FILE_FLAG_DELETE_ON_CLOSE; diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index 7884453..328fbad 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -285,11 +285,10 @@ SerialInit(void) static void SerialExitHandler( - ClientData dummy) /* Old window proc */ + TCL_UNUSED(ClientData)) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); SerialInfo *infoPtr; - (void)dummy; /* * Clear all eventually pending output. Otherwise Tcl's exit could totally @@ -324,10 +323,8 @@ SerialExitHandler( static void ProcExitHandler( - ClientData dummy) /* Old window proc */ + TCL_UNUSED(ClientData)) { - (void)dummy; - Tcl_MutexLock(&serialMutex); initialized = 0; Tcl_MutexUnlock(&serialMutex); @@ -409,14 +406,13 @@ SerialGetMilliseconds(void) void SerialSetupProc( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), int flags) /* Event flags as passed to Tcl_DoOneEvent. */ { SerialInfo *infoPtr; int block = 1; int msec = INT_MAX; /* min. found block time */ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - (void)dummy; if (!(flags & TCL_FILE_EVENTS)) { return; @@ -465,7 +461,7 @@ SerialSetupProc( static void SerialCheckProc( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), int flags) /* Event flags as passed to Tcl_DoOneEvent. */ { SerialInfo *infoPtr; @@ -474,7 +470,6 @@ SerialCheckProc( ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); COMSTAT cStat; unsigned int time; - (void)dummy; if (!(flags & TCL_FILE_EVENTS)) { return; @@ -606,14 +601,13 @@ SerialBlockProc( static int SerialCloseProc( ClientData instanceData, /* Pointer to SerialInfo structure. */ - Tcl_Interp *dummy, /* For error reporting. */ + TCL_UNUSED(Tcl_Interp *), int flags) { SerialInfo *serialPtr = (SerialInfo *) instanceData; int errorCode = 0, result = 0; SerialInfo *infoPtr, **nextPtrPtr; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - (void)dummy; if ((flags & (TCL_CLOSE_READ | TCL_CLOSE_WRITE)) != 0) { return EINVAL; @@ -1256,11 +1250,10 @@ SerialWatchProc( static int SerialGetHandleProc( ClientData instanceData, /* The serial state. */ - int direction, /* TCL_READABLE or TCL_WRITABLE */ + TCL_UNUSED(int) /*direction*/, ClientData *handlePtr) /* Where to store the handle. */ { SerialInfo *infoPtr = (SerialInfo *) instanceData; - (void)direction; *handlePtr = (ClientData) infoPtr->handle; return TCL_OK; diff --git a/win/tclWinSock.c b/win/tclWinSock.c index ad9ed72..cd07a8f 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -1042,13 +1042,12 @@ TcpOutputProc( static int TcpCloseProc( ClientData instanceData, /* The socket to close. */ - Tcl_Interp *dummy) /* Unused. */ + TCL_UNUSED(Tcl_Interp *)) { TcpState *statePtr = (TcpState *)instanceData; /* TIP #218 */ int errorCode = 0; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - (void)dummy; /* * Check that WinSock is initialized; do not call it if not, to prevent @@ -1189,7 +1188,7 @@ TcpSetOptionProc( ClientData instanceData, /* Socket state. */ Tcl_Interp *interp, /* For error reporting - can be NULL. */ const char *optionName, /* Name of the option to set. */ - const char *value) /* New value for option. */ + TCL_UNUSED(const char *) /*value*/) /* New value for option. */ { #ifdef TCL_FEATURE_KEEPALIVE_NAGLE TcpState *statePtr = instanceData; @@ -1197,7 +1196,6 @@ TcpSetOptionProc( #else (void)instanceData; #endif /*TCL_FEATURE_KEEPALIVE_NAGLE*/ - (void)value; /* * Check that WinSock is initialized; do not call it if not, to prevent @@ -1670,11 +1668,10 @@ TcpWatchProc( static int TcpGetHandleProc( ClientData instanceData, /* The socket state. */ - int direction, /* Not used. */ + TCL_UNUSED(int) /*direction*/, ClientData *handlePtr) /* Where to store the handle. */ { TcpState *statePtr = (TcpState *)instanceData; - (void)direction; *handlePtr = INT2PTR(statePtr->sockets->fd); return TCL_OK; @@ -2620,10 +2617,8 @@ SocketsEnabled(void) /* ARGSUSED */ static void SocketExitHandler( - ClientData dummy) /* Not used. */ + TCL_UNUSED(ClientData)) { - (void)dummy; - Tcl_MutexLock(&socketMutex); /* @@ -2656,13 +2651,12 @@ SocketExitHandler( void SocketSetupProc( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), int flags) /* Event flags as passed to Tcl_DoOneEvent. */ { TcpState *statePtr; Tcl_Time blockTime = { 0, 0 }; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - (void)dummy; if (!GOT_BITS(flags, TCL_FILE_EVENTS)) { return; @@ -2702,13 +2696,12 @@ SocketSetupProc( static void SocketCheckProc( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), int flags) /* Event flags as passed to Tcl_DoOneEvent. */ { TcpState *statePtr; SocketEvent *evPtr; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - (void)dummy; if (!GOT_BITS(flags, TCL_FILE_EVENTS)) { return; diff --git a/win/tclWinTest.c b/win/tclWinTest.c index bc3701d..d78d5f1 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -33,21 +33,14 @@ * Forward declarations of functions defined later in this file: */ -static int TesteventloopCmd(ClientData dummy, Tcl_Interp* interp, - int objc, Tcl_Obj *const objv[]); -static int TestvolumetypeCmd(ClientData dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestwinclockCmd(ClientData dummy, Tcl_Interp* interp, - int objc, Tcl_Obj *const objv[]); -static int TestwinsleepCmd(ClientData dummy, Tcl_Interp* interp, - int objc, Tcl_Obj *const objv[]); -static int TestSizeCmd(ClientData dummy, Tcl_Interp* interp, - int objc, Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc TesteventloopCmd; +static Tcl_ObjCmdProc TestvolumetypeCmd; +static Tcl_ObjCmdProc TestwinclockCmd; +static Tcl_ObjCmdProc TestwinsleepCmd; +static Tcl_ObjCmdProc TestSizeCmd; static Tcl_ObjCmdProc TestExceptionCmd; static int TestplatformChmod(const char *nativePath, int pmode); -static int TestchmodCmd(ClientData dummy, Tcl_Interp* interp, - int objc, Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc TestchmodCmd; /* *---------------------------------------------------------------------- @@ -105,7 +98,7 @@ TclplatformtestInit( static int TesteventloopCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -113,7 +106,6 @@ TesteventloopCmd( static int *framePtr = NULL;/* Pointer to integer on stack frame of * innermost invocation of the "wait" * subcommand. */ - (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "option ..."); @@ -182,7 +174,7 @@ TesteventloopCmd( static int TestvolumetypeCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -191,7 +183,6 @@ TestvolumetypeCmd( int found; char volType[VOL_BUF_SIZE]; const char *path; - (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?name?"); @@ -249,7 +240,7 @@ TestvolumetypeCmd( static int TestwinclockCmd( - ClientData dummy, /* Unused */ + TCL_UNUSED(ClientData), Tcl_Interp* interp, /* Tcl interpreter */ int objc, /* Argument count */ Tcl_Obj *const objv[]) /* Argument vector */ @@ -262,7 +253,6 @@ TestwinclockCmd( Tcl_Obj *result; /* Result of the command */ LARGE_INTEGER t1, t2; LARGE_INTEGER p1, p2; - (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, ""); @@ -299,13 +289,12 @@ TestwinclockCmd( static int TestwinsleepCmd( - ClientData dummy, /* Unused */ + TCL_UNUSED(ClientData), Tcl_Interp* interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const * objv) /* Parameter vector */ { int ms; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "ms"); @@ -320,12 +309,11 @@ TestwinsleepCmd( static int TestSizeCmd( - ClientData dummy, /* Unused */ + TCL_UNUSED(ClientData), Tcl_Interp* interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const * objv) /* Parameter vector */ { - (void)dummy; if (objc != 2) { goto syntax; @@ -370,7 +358,7 @@ syntax: static int TestExceptionCmd( - ClientData dummy, /* Unused */ + TCL_UNUSED(ClientData), Tcl_Interp* interp, /* Tcl interpreter */ int objc, /* Argument count */ Tcl_Obj *const objv[]) /* Argument vector */ @@ -397,7 +385,6 @@ TestExceptionCmd( EXCEPTION_GUARD_PAGE, EXCEPTION_INVALID_HANDLE, CONTROL_C_EXIT }; int cmd; - (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 0, objv, ""); @@ -660,13 +647,12 @@ TestplatformChmod( static int TestchmodCmd( - ClientData dummy, /* Not used. */ + TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Parameter count */ Tcl_Obj *const * objv) /* Parameter vector */ { int i, mode; - (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "mode file ?file ...?"); diff --git a/win/tclWinTime.c b/win/tclWinTime.c index 4a55c3f..8546fc2 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -413,12 +413,9 @@ Tcl_GetTime( static void NativeScaleTime( - Tcl_Time *timePtr, - ClientData dummy) + TCL_UNUSED(Tcl_Time *), + TCL_UNUSED(ClientData)) { - (void)timePtr; - (void)dummy; - /* * Native scale is 1:1. Nothing is done. */ @@ -652,10 +649,9 @@ NativeGetMicroseconds(void) static void NativeGetTime( Tcl_Time *timePtr, - ClientData dummy) + TCL_UNUSED(ClientData)) { Tcl_WideInt usecSincePosixEpoch; - (void)dummy; /* * Try to use high resolution timer. @@ -698,10 +694,8 @@ void TclWinResetTimerResolution(void); static void StopCalibration( - ClientData dummy) /* Client data is unused */ + TCL_UNUSED(ClientData)) { - (void)dummy; - SetEvent(timeInfo.exitEvent); /* @@ -979,11 +973,10 @@ ComputeGMT( static DWORD WINAPI CalibrationThread( - LPVOID arg) + TCL_UNUSED(LPVOID)) { FILETIME curFileTime; DWORD waitResult; - (void)arg; /* * Get initial system time and performance counter. -- cgit v0.12