diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-05 15:14:29 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-05 15:14:29 (GMT) |
commit | 96c82a32e19afd4581f3aa21da39c8c6aa90bd7c (patch) | |
tree | 31455945857d2de92c86342b6a07d812a83f4350 | |
parent | 2d7fb3bc20951567f5cd26584fb146ea5c271cc2 (diff) | |
parent | 26c1cd495a1ba8397db198e13aafe1a29287e6d0 (diff) | |
download | tcl-96c82a32e19afd4581f3aa21da39c8c6aa90bd7c.zip tcl-96c82a32e19afd4581f3aa21da39c8c6aa90bd7c.tar.gz tcl-96c82a32e19afd4581f3aa21da39c8c6aa90bd7c.tar.bz2 |
Mark more function paramaters as unused. Now Tcl compiles fully (on UNIX and Windows) without -Wunused-parameters warnings
44 files changed, 653 insertions, 206 deletions
diff --git a/compat/zlib/contrib/minizip/crypt.h b/compat/zlib/contrib/minizip/crypt.h index 2c3044b..62dcf77 100644 --- a/compat/zlib/contrib/minizip/crypt.h +++ b/compat/zlib/contrib/minizip/crypt.h @@ -43,6 +43,7 @@ static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an * unpredictable manner on 16-bit systems; not a problem * with any known compiler so far, though */ + (void)pcrc_32_tab; temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2; return (int)(((temp * (temp ^ 1)) >> 8) & 0xff); diff --git a/doc/string.n b/doc/string.n index 72c7913..44d621d 100644 --- a/doc/string.n +++ b/doc/string.n @@ -362,21 +362,21 @@ specified using the forms described in \fBSTRING INDICES\fR. Returns a value equal to \fIstring\fR except that any leading or trailing characters present in the string given by \fIchars\fR are removed. If \fIchars\fR is not specified then white space is removed (any character -for which \fBstring is space\fR returns 1, and "\0"). +for which \fBstring is space\fR returns 1, and "\e0"). .TP \fBstring trimleft \fIstring\fR ?\fIchars\fR? . Returns a value equal to \fIstring\fR except that any leading characters present in the string given by \fIchars\fR are removed. If \fIchars\fR is not specified then white space is removed (any character -for which \fBstring is space\fR returns 1, and "\0"). +for which \fBstring is space\fR returns 1, and "\e0"). .TP \fBstring trimright \fIstring\fR ?\fIchars\fR? . Returns a value equal to \fIstring\fR except that any trailing characters present in the string given by \fIchars\fR are removed. If \fIchars\fR is not specified then white space is removed (any character -for which \fBstring is space\fR returns 1, and "\0"). +for which \fBstring is space\fR returns 1, and "\e0"). .SS "OBSOLETE SUBCOMMANDS" .PP These subcommands are currently supported, but are likely to go away in a diff --git a/generic/tclDecls.h b/generic/tclDecls.h index eddd385..4daa32d 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -4038,14 +4038,14 @@ extern const TclStubs *tclStubsPtr; #undef Tcl_SetResult #define Tcl_SetResult(interp, result, freeProc) \ do { \ - char *__result = result; \ + const char *__result = result; \ Tcl_FreeProc *__freeProc = freeProc; \ Tcl_SetObjResult(interp, Tcl_NewStringObj(__result, -1)); \ if (__result != NULL && __freeProc != NULL && __freeProc != TCL_VOLATILE) { \ if (__freeProc == TCL_DYNAMIC) { \ - ckfree(__result); \ + ckfree((char *)__result); \ } else { \ - (*__freeProc)(__result); \ + (*__freeProc)((char *)__result); \ } \ } \ } while(0) diff --git a/generic/tclHash.c b/generic/tclHash.c index 7e1b3e0..10e3027 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -770,14 +770,14 @@ HashArrayKey( void *keyPtr) /* Key from which to compute hash value. */ { const int *array = (const int *) keyPtr; - unsigned int result; + TCL_HASH_TYPE result; int count; for (result = 0, count = tablePtr->keyType; count > 0; count--, array++) { result += *array; } - return (TCL_HASH_TYPE) result; + return result; } /* @@ -868,7 +868,7 @@ HashStringKey( void *keyPtr) /* Key from which to compute hash value. */ { const char *string = (const char *)keyPtr; - unsigned int result; + TCL_HASH_TYPE result; char c; (void)tablePtr; @@ -909,7 +909,7 @@ HashStringKey( result += (result << 3) + UCHAR(c); } } - return (TCL_HASH_TYPE) result; + return result; } /* diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index 251b5c3..91cd4d5 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -695,7 +695,7 @@ RenameDeleteMethod( int TclOOUnknownDefinition( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -705,6 +705,7 @@ TclOOUnknownDefinition( Tcl_HashEntry *hPtr; int soughtLen; const char *soughtStr, *matchedStr = NULL; + (void)dummy; if (objc < 2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( @@ -1092,7 +1093,7 @@ MagicDefinitionInvoke( int TclOODefineObjCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -1100,6 +1101,7 @@ TclOODefineObjCmd( Tcl_Namespace *nsPtr; Object *oPtr; int result; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "className arg ?arg ...?"); @@ -1168,7 +1170,7 @@ TclOODefineObjCmd( int TclOOObjDefObjCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -1176,6 +1178,7 @@ TclOOObjDefObjCmd( Tcl_Namespace *nsPtr; Object *oPtr; int result; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "objectName arg ?arg ...?"); @@ -1237,7 +1240,7 @@ TclOOObjDefObjCmd( int TclOODefineSelfObjCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -1245,6 +1248,7 @@ TclOODefineSelfObjCmd( Tcl_Namespace *nsPtr; Object *oPtr; int result, isPrivate; + (void)dummy; oPtr = (Object *) TclOOGetDefineCmdContext(interp); if (oPtr == NULL) { @@ -1308,12 +1312,13 @@ TclOODefineSelfObjCmd( int TclOODefineObjSelfObjCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Object *oPtr; + (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1415,7 +1420,7 @@ TclOODefinePrivateObjCmd( int TclOODefineClassObjCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -1424,6 +1429,7 @@ TclOODefineClassObjCmd( Class *clsPtr; Foundation *fPtr = TclOOGetFoundation(interp); int wasClass, willBeClass; + (void)dummy; /* * Parse the context to get the object to operate on. @@ -1524,7 +1530,7 @@ TclOODefineClassObjCmd( int TclOODefineConstructorObjCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -1533,6 +1539,7 @@ TclOODefineConstructorObjCmd( Class *clsPtr; Tcl_Method method; int bodyLength; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "arguments body"); @@ -1593,7 +1600,7 @@ TclOODefineConstructorObjCmd( int TclOODefineDefnNsObjCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -1607,6 +1614,7 @@ TclOODefineDefnNsObjCmd( Object *oPtr; Tcl_Namespace *nsPtr; Tcl_Obj *nsNamePtr, **storagePtr; + (void)dummy; oPtr = (Object *) TclOOGetDefineCmdContext(interp); if (oPtr == NULL) { @@ -1735,7 +1743,7 @@ TclOODefineDeleteMethodObjCmd( int TclOODefineDestructorObjCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -1744,6 +1752,7 @@ TclOODefineDestructorObjCmd( Class *clsPtr; Tcl_Method method; int bodyLength; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "body"); @@ -2314,7 +2323,7 @@ TclOODefineSlots( static int ClassFilterGet( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, @@ -2323,6 +2332,7 @@ ClassFilterGet( Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp); Tcl_Obj *resultObj, *filterObj; int i; + (void)dummy; if (Tcl_ObjectContextSkippedArgs(context) != objc) { Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, @@ -2348,7 +2358,7 @@ ClassFilterGet( static int ClassFilterSet( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, @@ -2357,6 +2367,7 @@ ClassFilterSet( Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp); int filterc; Tcl_Obj **filterv; + (void)dummy; if (Tcl_ObjectContextSkippedArgs(context) + 1 != objc) { Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, @@ -2394,7 +2405,7 @@ ClassFilterSet( static int ClassMixinGet( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, @@ -2404,6 +2415,7 @@ ClassMixinGet( Tcl_Obj *resultObj; Class *mixinPtr; int i; + (void)dummy; if (Tcl_ObjectContextSkippedArgs(context) != objc) { Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, @@ -2431,7 +2443,7 @@ ClassMixinGet( static int ClassMixinSet( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, @@ -2441,6 +2453,7 @@ ClassMixinSet( int mixinc, i; Tcl_Obj **mixinv; Class **mixins; + (void)dummy; if (Tcl_ObjectContextSkippedArgs(context) + 1 != objc) { Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, @@ -2500,7 +2513,7 @@ ClassMixinSet( static int ClassSuperGet( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, @@ -2510,6 +2523,7 @@ ClassSuperGet( Tcl_Obj *resultObj; Class *superPtr; int i; + (void)dummy; if (Tcl_ObjectContextSkippedArgs(context) != objc) { Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, @@ -2536,7 +2550,7 @@ ClassSuperGet( static int ClassSuperSet( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, @@ -2546,6 +2560,7 @@ ClassSuperSet( int superc, i, j; Tcl_Obj **superv; Class **superclasses, *superPtr; + (void)dummy; if (Tcl_ObjectContextSkippedArgs(context) + 1 != objc) { Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, @@ -2668,7 +2683,7 @@ ClassSuperSet( static int ClassVarsGet( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, @@ -2677,6 +2692,7 @@ ClassVarsGet( Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp); Tcl_Obj *resultObj; int i; + (void)dummy; if (Tcl_ObjectContextSkippedArgs(context) != objc) { Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, @@ -2712,7 +2728,7 @@ ClassVarsGet( static int ClassVarsSet( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, @@ -2722,6 +2738,7 @@ ClassVarsSet( int varc; Tcl_Obj **varv; int i; + (void)dummy; if (Tcl_ObjectContextSkippedArgs(context) + 1 != objc) { Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, @@ -2783,7 +2800,7 @@ ClassVarsSet( static int ObjFilterGet( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, @@ -2792,6 +2809,7 @@ ObjFilterGet( Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp); Tcl_Obj *resultObj, *filterObj; int i; + (void)dummy; if (Tcl_ObjectContextSkippedArgs(context) != objc) { Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index e8a4e47..580a8d5 100644 --- a/generic/tclOOInfo.c +++ b/generic/tclOOInfo.c @@ -171,12 +171,13 @@ GetClassFromObj( static int InfoObjectClassCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Object *oPtr; + (void)dummy; if (objc != 2 && objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "objName ?className?"); @@ -228,7 +229,7 @@ InfoObjectClassCmd( static int InfoObjectDefnCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -238,6 +239,7 @@ InfoObjectDefnCmd( Proc *procPtr; CompiledLocal *localPtr; Tcl_Obj *resultObjs[2]; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "objName methodName"); @@ -302,7 +304,7 @@ InfoObjectDefnCmd( static int InfoObjectFiltersCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -310,6 +312,7 @@ InfoObjectFiltersCmd( int i; Tcl_Obj *filterObj, *resultObj; Object *oPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "objName"); @@ -341,7 +344,7 @@ InfoObjectFiltersCmd( static int InfoObjectForwardCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -349,6 +352,7 @@ InfoObjectForwardCmd( Object *oPtr; Tcl_HashEntry *hPtr; Tcl_Obj *prefixObj; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "objName methodName"); @@ -398,7 +402,7 @@ InfoObjectForwardCmd( static int InfoObjectIsACmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -411,6 +415,7 @@ InfoObjectIsACmd( }; Object *oPtr, *o2Ptr; int idx, i, result = 0; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "category objName ?arg ...?"); @@ -517,7 +522,7 @@ InfoObjectIsACmd( static int InfoObjectMethodsCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -540,6 +545,7 @@ InfoObjectMethodsCmd( SCOPE_PRIVATE, SCOPE_PUBLIC, SCOPE_UNEXPORTED, SCOPE_LOCALPRIVATE }; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "objName ?-option value ...?"); @@ -637,7 +643,7 @@ InfoObjectMethodsCmd( static int InfoObjectMethodTypeCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -645,6 +651,7 @@ InfoObjectMethodTypeCmd( Object *oPtr; Tcl_HashEntry *hPtr; Method *mPtr; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "objName methodName"); @@ -694,7 +701,7 @@ InfoObjectMethodTypeCmd( static int InfoObjectMixinsCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -703,6 +710,7 @@ InfoObjectMixinsCmd( Object *oPtr; Tcl_Obj *resultObj; int i; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "objName"); @@ -737,12 +745,13 @@ InfoObjectMixinsCmd( static int InfoObjectIdCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Object *oPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "objName"); @@ -769,12 +778,13 @@ InfoObjectIdCmd( static int InfoObjectNsCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Object *oPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "objName"); @@ -802,7 +812,7 @@ InfoObjectNsCmd( static int InfoObjectVariablesCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -810,6 +820,7 @@ InfoObjectVariablesCmd( Object *oPtr; Tcl_Obj *resultObj; int i, isPrivate = 0; + (void)dummy; if (objc != 2 && objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "objName ?-private?"); @@ -856,7 +867,7 @@ InfoObjectVariablesCmd( static int InfoObjectVarsCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -866,6 +877,7 @@ InfoObjectVarsCmd( FOREACH_HASH_DECLS; VarInHash *vihPtr; Tcl_Obj *nameObj, *resultObj; + (void)dummy; if (objc != 2 && objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "objName ?pattern?"); @@ -917,7 +929,7 @@ InfoObjectVarsCmd( static int InfoClassConstrCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -926,6 +938,7 @@ InfoClassConstrCmd( CompiledLocal *localPtr; Tcl_Obj *resultObjs[2]; Class *clsPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "className"); @@ -978,7 +991,7 @@ InfoClassConstrCmd( static int InfoClassDefnCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -988,6 +1001,7 @@ InfoClassDefnCmd( CompiledLocal *localPtr; Tcl_Obj *resultObjs[2]; Class *clsPtr; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "className methodName"); @@ -1046,7 +1060,7 @@ InfoClassDefnCmd( static int InfoClassDefnNsCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1059,6 +1073,7 @@ InfoClassDefnNsCmd( int kind = 0; Tcl_Obj *nsNamePtr; Class *clsPtr; + (void)dummy; if (objc != 2 && objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "className ?kind?"); @@ -1096,13 +1111,14 @@ InfoClassDefnNsCmd( static int InfoClassDestrCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Proc *procPtr; Class *clsPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "className"); @@ -1140,7 +1156,7 @@ InfoClassDestrCmd( static int InfoClassFiltersCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1148,6 +1164,7 @@ InfoClassFiltersCmd( int i; Tcl_Obj *filterObj, *resultObj; Class *clsPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "className"); @@ -1178,7 +1195,7 @@ InfoClassFiltersCmd( static int InfoClassForwardCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1186,6 +1203,7 @@ InfoClassForwardCmd( Tcl_HashEntry *hPtr; Tcl_Obj *prefixObj; Class *clsPtr; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "className methodName"); @@ -1229,7 +1247,7 @@ InfoClassForwardCmd( static int InfoClassInstancesCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1239,6 +1257,7 @@ InfoClassInstancesCmd( int i; const char *pattern = NULL; Tcl_Obj *resultObj; + (void)dummy; if (objc != 2 && objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "className ?pattern?"); @@ -1277,7 +1296,7 @@ InfoClassInstancesCmd( static int InfoClassMethodsCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1298,6 +1317,7 @@ InfoClassMethodsCmd( enum Scopes { SCOPE_PRIVATE, SCOPE_PUBLIC, SCOPE_UNEXPORTED }; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "className ?-option value ...?"); @@ -1393,7 +1413,7 @@ InfoClassMethodsCmd( static int InfoClassMethodTypeCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1401,6 +1421,7 @@ InfoClassMethodTypeCmd( Tcl_HashEntry *hPtr; Method *mPtr; Class *clsPtr; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "className methodName"); @@ -1445,7 +1466,7 @@ InfoClassMethodTypeCmd( static int InfoClassMixinsCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1453,6 +1474,7 @@ InfoClassMixinsCmd( Class *clsPtr, *mixinPtr; Tcl_Obj *resultObj; int i; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "className"); @@ -1487,7 +1509,7 @@ InfoClassMixinsCmd( static int InfoClassSubsCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1496,6 +1518,7 @@ InfoClassSubsCmd( Tcl_Obj *resultObj; int i; const char *pattern = NULL; + (void)dummy; if (objc != 2 && objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "className ?pattern?"); @@ -1542,7 +1565,7 @@ InfoClassSubsCmd( static int InfoClassSupersCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1550,6 +1573,7 @@ InfoClassSupersCmd( Class *clsPtr, *superPtr; Tcl_Obj *resultObj; int i; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "className"); @@ -1581,7 +1605,7 @@ InfoClassSupersCmd( static int InfoClassVariablesCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1589,6 +1613,7 @@ InfoClassVariablesCmd( Class *clsPtr; Tcl_Obj *resultObj; int i, isPrivate = 0; + (void)dummy; if (objc != 2 && objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "className ?-private?"); @@ -1635,13 +1660,14 @@ InfoClassVariablesCmd( static int InfoObjectCallCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Object *oPtr; CallContext *contextPtr; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "objName methodName"); @@ -1681,13 +1707,14 @@ InfoObjectCallCmd( static int InfoClassCallCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Class *clsPtr; CallChain *callPtr; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "className methodName"); diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index fb8a587..5144176 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -135,7 +135,7 @@ static const Tcl_MethodType fwdMethodType = { Tcl_Method Tcl_NewInstanceMethod( - Tcl_Interp *interp, /* Unused? */ + Tcl_Interp *dummy, /* Unused. */ Tcl_Object object, /* The object that has the method attached to * it. */ Tcl_Obj *nameObj, /* The name of the method. May be NULL; if so, @@ -153,6 +153,7 @@ Tcl_NewInstanceMethod( Method *mPtr; Tcl_HashEntry *hPtr; int isNew; + (void)dummy; if (nameObj == NULL) { mPtr = (Method *)ckalloc(sizeof(Method)); @@ -208,7 +209,7 @@ Tcl_NewInstanceMethod( Tcl_Method Tcl_NewMethod( - Tcl_Interp *interp, /* The interpreter containing the class. */ + Tcl_Interp *dummy, /* The interpreter containing the class. */ Tcl_Class cls, /* The class to attach the method to. */ Tcl_Obj *nameObj, /* The name of the object. May be NULL (e.g., * for constructors or destructors); if so, up @@ -225,6 +226,7 @@ Tcl_NewMethod( Method *mPtr; Tcl_HashEntry *hPtr; int isNew; + (void)dummy; if (nameObj == NULL) { mPtr = (Method *)ckalloc(sizeof(Method)); @@ -963,6 +965,7 @@ ProcedureMethodVarResolver( { int result; Tcl_ResolvedVarInfo *rPtr = NULL; + (void)flags; result = ProcedureMethodCompiledVarResolver(interp, varName, strlen(varName), contextNs, &rPtr); @@ -1105,7 +1108,7 @@ ProcedureMethodCompiledVarDelete( static int ProcedureMethodCompiledVarResolver( - Tcl_Interp *interp, + Tcl_Interp *dummy, const char *varName, int length, Tcl_Namespace *contextNs, @@ -1113,6 +1116,8 @@ ProcedureMethodCompiledVarResolver( { OOResVarInfo *infoPtr; Tcl_Obj *variableObj = Tcl_NewStringObj(varName, length); + (void)dummy; + (void)contextNs; /* * Do not create resolvers for cases that contain namespace separators or @@ -1191,6 +1196,7 @@ MethodErrorHandler( const char *objectName, *kindName, *methodName = TclGetStringFromObj(mPtr->namePtr, &nameLen); Object *declarerPtr; + (void)methodNameObj; if (mPtr->declaringObjectPtr != NULL) { declarerPtr = mPtr->declaringObjectPtr; @@ -1221,6 +1227,7 @@ ConstructorErrorHandler( Object *declarerPtr; const char *objectName, *kindName; int objectNameLen; + (void)methodNameObj; if (mPtr->declaringObjectPtr != NULL) { declarerPtr = mPtr->declaringObjectPtr; @@ -1250,6 +1257,7 @@ DestructorErrorHandler( Object *declarerPtr; const char *objectName, *kindName; int objectNameLen; + (void)methodNameObj; if (mPtr->declaringObjectPtr != NULL) { declarerPtr = mPtr->declaringObjectPtr; @@ -1524,12 +1532,13 @@ DeleteForwardMethod( static int CloneForwardMethod( - Tcl_Interp *interp, + Tcl_Interp *dummy, void *clientData, void **newClientData) { ForwardMethod *fmPtr = (ForwardMethod *)clientData; ForwardMethod *fm2Ptr = (ForwardMethod *)ckalloc(sizeof(ForwardMethod)); + (void)dummy; fm2Ptr->prefixObj = fmPtr->prefixObj; Tcl_IncrRefCount(fm2Ptr->prefixObj); diff --git a/generic/tclObj.c b/generic/tclObj.c index edbf50b..4be3ad4 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -3189,6 +3189,9 @@ Tcl_DbNewWideIntObj( int line) /* Line number in the source file; used for * debugging. */ { + (void)file; + (void)line; + return Tcl_NewWideIntObj(wideValue); } #endif /* TCL_MEM_DEBUG */ @@ -3563,6 +3566,9 @@ Tcl_DbNewBignumObj( const char *file, int line) { + (void)file; + (void)line; + return Tcl_NewBignumObj(bignumValue); } #endif @@ -3978,6 +3984,9 @@ Tcl_DbIncrRefCount( } } # endif /* TCL_THREADS */ +#else + (void)file; + (void)line; #endif /* TCL_MEM_DEBUG */ ++(objPtr)->refCount; } @@ -4041,6 +4050,9 @@ Tcl_DbDecrRefCount( } } # endif /* TCL_THREADS */ +#else + (void)file; + (void)line; #endif /* TCL_MEM_DEBUG */ if (objPtr->refCount-- <= 1) { @@ -4106,6 +4118,9 @@ Tcl_DbIsShared( } } # endif /* TCL_THREADS */ +#else + (void)file; + (void)line; #endif /* TCL_MEM_DEBUG */ #ifdef TCL_COMPILE_STATS @@ -4169,11 +4184,12 @@ Tcl_InitObjHashTable( static Tcl_HashEntry * AllocObjEntry( - Tcl_HashTable *tablePtr, /* Hash table. */ + Tcl_HashTable *dummy, /* Hash table. */ void *keyPtr) /* Key to store in the hash table entry. */ { Tcl_Obj *objPtr = (Tcl_Obj *)keyPtr; Tcl_HashEntry *hPtr = (Tcl_HashEntry *)ckalloc(sizeof(Tcl_HashEntry)); + (void)dummy; hPtr->key.objPtr = objPtr; Tcl_IncrRefCount(objPtr); @@ -4290,13 +4306,14 @@ TclFreeObjEntry( TCL_HASH_TYPE TclHashObjKey( - Tcl_HashTable *tablePtr, /* Hash table. */ + Tcl_HashTable *dummy, /* Hash table. */ void *keyPtr) /* Key from which to compute hash value. */ { Tcl_Obj *objPtr = (Tcl_Obj *)keyPtr; int length; const char *string = TclGetStringFromObj(objPtr, &length); - unsigned int result = 0; + TCL_HASH_TYPE result = 0; + (void)dummy; /* * I tried a zillion different hash functions and asked many other people @@ -4338,7 +4355,7 @@ TclHashObjKey( result += (result << 3) + UCHAR(*++string); } } - return (TCL_HASH_TYPE) result; + return result; } /* @@ -4691,12 +4708,13 @@ SetCmdNameFromAny( int Tcl_RepresentationCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Tcl_Obj *descObj; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "value"); diff --git a/generic/tclProc.c b/generic/tclProc.c index 5dc3f50..d2a10dd 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -163,6 +163,7 @@ Tcl_ProcObjCmd( const char *simpleName, *procArgs, *procBody; Namespace *nsPtr, *altNsPtr, *cxtNsPtr; Tcl_Command cmd; + (void)dummy; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "name args body"); @@ -404,6 +405,7 @@ TclCreateProc( Proc **procPtrPtr) /* Returns: pointer to proc data. */ { Interp *iPtr = (Interp *) interp; + (void)nsPtr; Proc *procPtr = NULL; int i, result, numArgs; @@ -904,6 +906,7 @@ TclNRUplevelObjCmd( int result; CallFrame *savedVarFramePtr, *framePtr; Tcl_Obj *objPtr; + (void)dummy; if (objc < 2) { uplevelSyntax: @@ -1375,6 +1378,7 @@ InitArgsAndLocals( Var *varPtr, *defPtr; int localCt = procPtr->numCompiledLocals, numArgs, argCt, i, imax; Tcl_Obj *const *argObjs; + (void)procNameObj; ByteCodeGetIntRep(procPtr->bodyPtr, &tclByteCodeType, codePtr); @@ -1955,6 +1959,9 @@ TclProcCompileProc( fprintf(stdout, "%s\"\n", TclGetString(message)); Tcl_DecrRefCount(message); } +#else + (void)description; + (void)procName; #endif /* @@ -2633,6 +2640,7 @@ TclNRApplyObjCmd( int result; Tcl_Namespace *nsPtr; ApplyExtraData *extraPtr; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "lambdaExpr ?arg ...?"); diff --git a/generic/tclProcess.c b/generic/tclProcess.c index 2f3f4ba..573baf4 100644 --- a/generic/tclProcess.c +++ b/generic/tclProcess.c @@ -402,7 +402,7 @@ BuildProcessStatusObj( static int ProcessListObjCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -411,6 +411,7 @@ ProcessListObjCmd( Tcl_HashEntry *entry; Tcl_HashSearch search; ProcessInfo *info; + (void)dummy; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -453,7 +454,7 @@ ProcessListObjCmd( static int ProcessStatusObjCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -475,6 +476,7 @@ ProcessStatusObjCmd( enum switches { STATUS_WAIT, STATUS_LAST }; + (void)dummy; while (objc > 1) { if (TclGetString(objv[1])[0] != '-') { @@ -601,7 +603,7 @@ ProcessStatusObjCmd( static int ProcessPurgeObjCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -614,6 +616,7 @@ ProcessPurgeObjCmd( int result; int i; int pid; + (void)dummy; if (objc != 1 && objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "?pids?"); @@ -701,11 +704,13 @@ ProcessPurgeObjCmd( static int ProcessAutopurgeObjCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + if (objc != 1 && objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "?flag?"); return TCL_ERROR; diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index ebb0857..74b384a 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -1053,11 +1053,12 @@ FreeRegexp( static void FinalizeRegexp( - ClientData clientData) /* Not used. */ + ClientData dummy) /* Not used. */ { int i; TclRegexp *regexpPtr; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + (void)dummy; for (i = 0; (i < NUM_REGEXPS) && (tsdPtr->patterns[i] != NULL); i++) { regexpPtr = tsdPtr->regexps[i]; diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index af72161..edce39f 100644 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -3061,6 +3061,7 @@ StrictInt64Conversion( int digit; /* Current output digit. */ char *s = retval; /* Cursor in the output buffer. */ int i; /* Current position in the output buffer. */ + (void)dPtr; /* * Adjust if the logarithm was guessed wrong. @@ -3446,6 +3447,7 @@ StrictBignumConversionPowD( mp_digit digit; /* Current output digit. */ char *s = retval; /* Cursor in the output buffer. */ int i; /* Index in the output buffer. */ + (void)dPtr; /* * b = bw * 2**b2 * 5**b5 @@ -3853,6 +3855,7 @@ StrictBignumConversion( int digit; /* Current digit of the result. */ int g; /* Size of the current digit ground. */ int i, j; + (void)dPtr; /* * b = bw * 2**b2 * 5**b5 diff --git a/generic/tclTest.c b/generic/tclTest.c index f87698c..26a20be 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -840,6 +840,7 @@ TestasyncCmd( TestAsyncHandler *asyncPtr, *prevPtr; int id, code; static int nextId = 1; + (void)dummy; if (argc < 2) { wrongNumArgs: @@ -1048,6 +1049,8 @@ TestbumpinterpepochObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *)interp; + (void)dummy; + if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, ""); return TCL_ERROR; @@ -1083,6 +1086,7 @@ TestcmdinfoCmd( const char **argv) /* Argument strings. */ { Tcl_CmdInfo info; + (void)dummy; if (argc != 3) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -1153,6 +1157,9 @@ CmdProc1( int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { + (void)argc; + (void)argv; + Tcl_AppendResult(interp, "CmdProc1 ", (char *) clientData, NULL); return TCL_OK; } @@ -1165,6 +1172,9 @@ CmdProc2( int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { + (void)argc; + (void)argv; + Tcl_AppendResult(interp, "CmdProc2 ", (char *) clientData, NULL); return TCL_OK; } @@ -1215,6 +1225,7 @@ TestcmdtokenCmd( Tcl_Command token; int *l; char buf[30]; + (void)dummy; if (argc != 3) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -1278,6 +1289,7 @@ TestcmdtraceCmd( { Tcl_DString buffer; int result; + (void)dummy; if (argc != 3) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -1375,6 +1387,10 @@ CmdTraceProc( { Tcl_DString *bufPtr = (Tcl_DString *) clientData; int i; + (void)interp; + (void)level; + (void)cmdProc; + (void)cmdClientData; Tcl_DStringAppendElement(bufPtr, command); @@ -1387,7 +1403,7 @@ CmdTraceProc( static void CmdTraceDeleteProc( - void *clientData, /* Unused. */ + void *dummy, /* Unused. */ Tcl_Interp *interp, /* Current interpreter. */ int level, /* Current trace level. */ char *command, /* The command being traced (after @@ -1398,6 +1414,14 @@ CmdTraceDeleteProc( int argc, /* Number of arguments. */ const char *argv[]) /* Argument strings. */ { + (void)dummy; + (void)level; + (void)command; + (void)cmdProc; + (void)cmdClientData; + (void)argc; + (void)argv; + /* * Remove ourselves to test whether calling Tcl_DeleteTrace within a trace * callback causes the for loop in TclNRExecuteByteCode that calls traces to @@ -1409,7 +1433,7 @@ CmdTraceDeleteProc( static int ObjTraceProc( - void *clientData, /* unused */ + void *dummy, /* unused */ Tcl_Interp *interp, /* Tcl interpreter */ int level, /* Execution level */ const char *command, /* Command being executed */ @@ -1418,6 +1442,11 @@ ObjTraceProc( Tcl_Obj *const objv[]) /* Parameter list */ { const char *word = Tcl_GetString(objv[0]); + (void)dummy; + (void)level; + (void)token; + (void)objc; + (void)objv; if (!strcmp(word, "Error")) { Tcl_SetObjResult(interp, Tcl_NewStringObj(command, -1)); @@ -1471,6 +1500,8 @@ TestcreatecommandCmd( int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { + (void)dummy; + if (argc != 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " option\"", NULL); @@ -1496,13 +1527,16 @@ TestcreatecommandCmd( static int CreatedCommandProc( - void *clientData, /* String to return. */ + void *dummy, /* String to return. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { Tcl_CmdInfo info; int found; + (void)dummy; + (void)argc; + (void)argv; found = Tcl_GetCommandInfo(interp, "test_ns_basic::createdcommand", &info); @@ -1518,13 +1552,16 @@ CreatedCommandProc( static int CreatedCommandProc2( - void *clientData, /* String to return. */ + void *dummy, /* String to return. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { Tcl_CmdInfo info; int found; + (void)dummy; + (void)argc; + (void)argv; found = Tcl_GetCommandInfo(interp, "value:at:", &info); if (!found) { @@ -1563,6 +1600,7 @@ TestdcallCmd( const char **argv) /* Argument strings. */ { int i, id; + (void)dummy; delInterp = Tcl_CreateInterp(); Tcl_DStringInit(&delString); @@ -1629,6 +1667,7 @@ TestdelCmd( { DelCmd *dPtr; Tcl_Interp *slave; + (void)dummy; if (argc != 4) { Tcl_AppendResult(interp, "wrong # args", NULL); @@ -1658,6 +1697,8 @@ DelCmdProc( const char **argv) /* Argument strings. */ { DelCmd *dPtr = (DelCmd *) clientData; + (void)argc; + (void)argv; Tcl_AppendResult(interp, dPtr->deleteCmd, NULL); ckfree(dPtr->deleteCmd); @@ -1697,11 +1738,13 @@ DelDeleteProc( static int TestdelassocdataCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { + (void)dummy; + if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], " data_key\"", NULL); @@ -1733,7 +1776,7 @@ TestdelassocdataCmd( */ static int -TestdoubledigitsObjCmd(void *unused, +TestdoubledigitsObjCmd(void *dummy, /* NULL */ Tcl_Interp* interp, /* Tcl interpreter */ @@ -1765,6 +1808,7 @@ TestdoubledigitsObjCmd(void *unused, char* endPtr; Tcl_Obj* strObj; Tcl_Obj* retval; + (void)dummy; if (objc < 4 || objc > 5) { Tcl_WrongNumArgs(interp, 1, objv, "fpval ndigits type ?shorten?"); @@ -1831,6 +1875,7 @@ TestdstringCmd( const char **argv) /* Argument strings. */ { int count; + (void)dummy; if (argc < 2) { wrongNumArgs: @@ -1967,6 +2012,7 @@ TestencodingObjCmd( enum options { ENC_CREATE, ENC_DELETE }; + (void)dummy; if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0, &index) != TCL_OK) { @@ -2033,6 +2079,9 @@ EncodingToUtfProc( { int len; TclEncoding *encodingPtr; + (void)src; + (void)flags; + (void)statePtr; encodingPtr = (TclEncoding *) clientData; Tcl_EvalEx(encodingPtr->interp, encodingPtr->toUtfCmd, -1, TCL_EVAL_GLOBAL); @@ -2065,6 +2114,9 @@ EncodingFromUtfProc( { int len; TclEncoding *encodingPtr; + (void)src; + (void)flags; + (void)statePtr; encodingPtr = (TclEncoding *) clientData; Tcl_EvalEx(encodingPtr->interp, encodingPtr->fromUtfCmd, -1, TCL_EVAL_GLOBAL); @@ -2119,6 +2171,7 @@ TestevalexObjCmd( { int length, flags; const char *script; + (void)dummy; flags = 0; if (objc == 3) { @@ -2163,6 +2216,7 @@ TestevalobjvObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int evalGlobal; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "global word ?word ...?"); @@ -2206,7 +2260,7 @@ TestevalobjvObjCmd( static int TesteventObjCmd( - void *unused, /* Not used */ + void *dummy, /* Not used */ Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const objv[]) /* Parameter vector */ @@ -2226,6 +2280,7 @@ TesteventObjCmd( TCL_QUEUE_MARK }; TestEvent *ev; /* Event to be queued */ + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?arg ...?"); @@ -2299,6 +2354,7 @@ TesteventProc( int result = Tcl_EvalObjEx(interp, command, TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT); int retval; + (void)flags; if (result != TCL_OK) { Tcl_AddErrorInfo(interp, @@ -2385,12 +2441,13 @@ TesteventDeleteProc( static int TestexithandlerCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { int value; + (void)dummy; if (argc != 3) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -2461,7 +2518,7 @@ ExitProcEven( static int TestexprlongCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -2469,6 +2526,7 @@ TestexprlongCmd( long exprResult; char buf[4 + TCL_INTEGER_SPACE]; int result; + (void)dummy; if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -2504,7 +2562,7 @@ TestexprlongCmd( static int TestexprlongobjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* Argument objects. */ @@ -2512,6 +2570,7 @@ TestexprlongobjCmd( long exprResult; char buf[4 + TCL_INTEGER_SPACE]; int result; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "expression"); @@ -2546,7 +2605,7 @@ TestexprlongobjCmd( static int TestexprdoubleCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -2554,6 +2613,7 @@ TestexprdoubleCmd( double exprResult; char buf[4 + TCL_DOUBLE_SPACE]; int result; + (void)dummy; if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -2590,7 +2650,7 @@ TestexprdoubleCmd( static int TestexprdoubleobjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* Argument objects. */ @@ -2598,6 +2658,7 @@ TestexprdoubleobjCmd( double exprResult; char buf[4 + TCL_DOUBLE_SPACE]; int result; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "expression"); @@ -2632,11 +2693,13 @@ TestexprdoubleobjCmd( static int TestexprstringCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { + (void)dummy; + if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], " expression\"", NULL); @@ -2664,12 +2727,13 @@ TestexprstringCmd( static int TestfilelinkCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { Tcl_Obj *contents; + (void)dummy; if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "source ?target?"); @@ -2731,12 +2795,13 @@ TestfilelinkCmd( static int TestgetassocdataCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { char *res; + (void)dummy; if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -2769,13 +2834,14 @@ TestgetassocdataCmd( static int TestgetplatformCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { static const char *const platformStrings[] = { "unix", "mac", "windows" }; TclPlatformType *platform; + (void)dummy; platform = TclGetPlatform(); @@ -2816,6 +2882,7 @@ TestinterpdeleteCmd( const char **argv) /* Argument strings. */ { Tcl_Interp *slaveToDelete; + (void)dummy; if (argc != 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -2874,6 +2941,7 @@ TestlinkCmd( char buffer[2*TCL_DOUBLE_SPACE]; int writable, flag; Tcl_Obj *tmp; + (void)dummy; if (argc < 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -3343,6 +3411,7 @@ TestlinkarrayCmd( int optionIndex, typeIndex, readonly, i, size, length; char *name, *arg; Tcl_WideInt addr; + (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "option args"); @@ -3437,13 +3506,14 @@ TestlinkarrayCmd( static int TestlocaleCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { int index; const char *locale; + (void)dummy; static const char *const optionStrings[] = { "ctype", "numeric", "time", "collate", "monetary", @@ -3500,8 +3570,10 @@ TestlocaleCmd( static void CleanupTestSetassocdataTests( void *clientData, /* Data to be released. */ - Tcl_Interp *interp) /* Interpreter being deleted. */ + Tcl_Interp *dummy) /* Interpreter being deleted. */ { + (void)dummy; + ckfree(clientData); } @@ -3524,7 +3596,7 @@ CleanupTestSetassocdataTests( static int TestparserObjCmd( - void *clientData, /* Not used. */ + void *dummy1, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ @@ -3532,6 +3604,7 @@ TestparserObjCmd( const char *script; int length, dummy; Tcl_Parse parse; + (void)dummy1; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "script length"); @@ -3580,7 +3653,7 @@ TestparserObjCmd( static int TestexprparserObjCmd( - void *clientData, /* Not used. */ + void *dummy1, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ @@ -3588,6 +3661,7 @@ TestexprparserObjCmd( const char *script; int length, dummy; Tcl_Parse parse; + (void)dummy1; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "expr length"); @@ -3727,12 +3801,13 @@ PrintParse( static int TestparsevarObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { const char *value, *name, *termPtr; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "varName"); @@ -3768,7 +3843,7 @@ TestparsevarObjCmd( static int TestparsevarnameObjCmd( - void *clientData, /* Not used. */ + void *dummy1, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ @@ -3776,6 +3851,7 @@ TestparsevarnameObjCmd( const char *script; int append, length, dummy; Tcl_Parse parse; + (void)dummy1; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "script length append"); @@ -3831,12 +3907,16 @@ TestparsevarnameObjCmd( static int TestpreferstableObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { Interp *iPtr = (Interp *) interp; + (void)dummy; + (void)objc; + (void)objv; + iPtr->packagePrefer = PKG_PREFER_STABLE; return TCL_OK; } @@ -3860,13 +3940,14 @@ TestpreferstableObjCmd( static int TestprintObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { Tcl_WideInt argv1 = 0; size_t argv2; + (void)dummy; if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "format wideint"); @@ -3925,6 +4006,7 @@ TestregexpObjCmd( REGEXP_XFLAGS, REGEXP_LAST }; + (void)dummy; indices = 0; about = 0; @@ -4231,6 +4313,11 @@ TestreturnObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + (void)interp; + (void)objc; + (void)objv; + return TCL_RETURN; } @@ -4254,13 +4341,14 @@ TestreturnObjCmd( static int TestsetassocdataCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { char *buf, *oldData; Tcl_InterpDeleteProc *procPtr; + (void)dummy; if (argc != 3) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -4305,13 +4393,14 @@ TestsetassocdataCmd( static int TestsetplatformCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { size_t length; TclPlatformType *platform; + (void)dummy; platform = TclGetPlatform(); @@ -4360,6 +4449,7 @@ TeststaticpkgCmd( const char **argv) /* Argument strings. */ { int safe, loaded; + (void)dummy; if (argc != 4) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", @@ -4412,6 +4502,7 @@ TesttranslatefilenameCmd( { Tcl_DString buffer; const char *result; + (void)dummy; if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", @@ -4453,6 +4544,7 @@ TestupvarCmd( const char **argv) /* Argument strings. */ { int flags = 0; + (void)dummy; if ((argc != 5) && (argc != 6)) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", @@ -4505,6 +4597,8 @@ TestseterrorcodeCmd( int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { + (void)dummy; + if (argc > 6) { Tcl_AppendResult(interp, "too many args", NULL); return TCL_ERROR; @@ -4558,6 +4652,8 @@ TestsetobjerrorcodeCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { + (void)dummy; + Tcl_SetObjErrorCode(interp, Tcl_ConcatObj(objc - 1, objv + 1)); return TCL_ERROR; } @@ -4582,7 +4678,7 @@ TestsetobjerrorcodeCmd( /* ARGSUSED */ static int TestfeventCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ @@ -4590,6 +4686,7 @@ TestfeventCmd( static Tcl_Interp *interp2 = NULL; int code; Tcl_Channel chan; + (void)dummy; if (argc < 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -4660,6 +4757,8 @@ TestpanicCmd( const char **argv) /* Argument strings. */ { char *argString; + (void)dummy; + (void)interp; /* * Put the arguments into a var args structure @@ -4683,6 +4782,7 @@ TestfileCmd( int force, i, j, result; Tcl_Obj *error = NULL; const char *subcmd; + (void)dummy; if (argc < 3) { return TCL_ERROR; @@ -4767,6 +4867,7 @@ TestgetvarfullnameCmd( Tcl_Namespace *namespacePtr; Tcl_CallFrame *framePtr; Tcl_Var variable; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "name scope"); @@ -4831,10 +4932,10 @@ TestgetvarfullnameCmd( static int GetTimesObjCmd( - void *unused, /* Unused. */ + void *dummy, /* Unused. */ Tcl_Interp *interp, /* The current interpreter. */ - int notused1, /* Number of arguments. */ - Tcl_Obj *const notused2[]) /* The argument objects. */ + int cobjc, /* Number of arguments. */ + Tcl_Obj *const cobjv[]) /* The argument objects. */ { Interp *iPtr = (Interp *) interp; int i, n; @@ -4843,6 +4944,9 @@ GetTimesObjCmd( Tcl_Obj *objPtr, **objv; const char *s; char newString[TCL_INTEGER_SPACE]; + (void)dummy; + (void)cobjc; + (void)cobjv; /* alloc & free 100000 times */ fprintf(stderr, "alloc & free 100000 6 word items\n"); @@ -5010,11 +5114,16 @@ GetTimesObjCmd( static int NoopCmd( - void *unused, /* Unused. */ + void *dummy, /* Unused. */ Tcl_Interp *interp, /* The current interpreter. */ int argc, /* The number of arguments. */ const char **argv) /* The argument strings. */ { + (void)dummy; + (void)interp; + (void)argc; + (void)argv; + return TCL_OK; } @@ -5037,11 +5146,16 @@ NoopCmd( static int NoopObjCmd( - void *unused, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { + (void)dummy; + (void)interp; + (void)objc; + (void)objv; + return TCL_OK; } @@ -5062,13 +5176,14 @@ NoopObjCmd( static int TeststringbytesObjCmd( - void *unused, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { int n; const unsigned char *p; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "value"); @@ -5102,12 +5217,13 @@ TeststringbytesObjCmd( static int TestpurebytesobjObjCmd( - void *unused, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { Tcl_Obj *objPtr; + (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?string?"); @@ -5149,13 +5265,14 @@ TestpurebytesobjObjCmd( static int TestbytestringObjCmd( - void *unused, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { int n = 0; const char *p; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "bytearray"); @@ -5288,6 +5405,7 @@ TestsaveresultCmd( enum options { RESULT_APPEND, RESULT_DYNAMIC, RESULT_FREE, RESULT_OBJECT, RESULT_SMALL }; + (void)dummy; /* * Parse arguments @@ -5382,6 +5500,7 @@ static void TestsaveresultFree( char *blockPtr) { + (void)blockPtr; freeCount++; } @@ -5409,6 +5528,9 @@ TestmainthreadCmd( int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { + (void)dummy; + (void)argv; + if (argc == 1) { Tcl_Obj *idObj = Tcl_NewWideIntObj((Tcl_WideInt)(size_t)Tcl_GetCurrentThread()); @@ -5470,9 +5592,14 @@ TestsetmainloopCmd( int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { - exitMainLoop = 0; - Tcl_SetMainLoop(MainLoop); - return TCL_OK; + (void)dummy; + (void)interp; + (void)argc; + (void)argv; + + exitMainLoop = 0; + Tcl_SetMainLoop(MainLoop); + return TCL_OK; } /* @@ -5499,8 +5626,13 @@ TestexitmainloopCmd( int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { - exitMainLoop = 1; - return TCL_OK; + (void)dummy; + (void)interp; + (void)argc; + (void)argv; + + exitMainLoop = 1; + return TCL_OK; } /* @@ -5523,7 +5655,7 @@ TestexitmainloopCmd( /* ARGSUSED */ static int TestChannelCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Interpreter for result. */ int argc, /* Count of additional args. */ const char **argv) /* Additional arg strings. */ @@ -5539,6 +5671,7 @@ TestChannelCmd( int IOQueued; /* How much IO is queued inside channel? */ char buf[TCL_INTEGER_SPACE];/* For sprintf. */ int mode; /* rw mode of the channel */ + (void)dummy; if (argc < 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -6003,6 +6136,7 @@ TestChannelEventCmd( EventScriptRecord *esPtr, *prevEsPtr, *nextEsPtr; const char *cmd; int index, i, mask, len; + (void)dummy; if ((argc < 3) || (argc > 5)) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -6205,13 +6339,14 @@ TestChannelEventCmd( /* ARGSUSED */ static int TestSocketCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Interpreter for result. */ int argc, /* Count of additional args. */ const char **argv) /* Additional arg strings. */ { const char *cmdName; /* Sub command. */ size_t len; /* Length of subcommand string. */ + (void)dummy; if (argc < 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -6279,6 +6414,7 @@ TestWrongNumArgsObjCmd( { int i, length; const char *msg; + (void)dummy; if (objc < 3) { /* @@ -6337,6 +6473,7 @@ TestGetIndexFromObjStructObjCmd( "a", "b", "c", "d", "e", "f", NULL, NULL }; int idx,target; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "argument targetvalue"); @@ -6389,6 +6526,7 @@ TestFilesystemObjCmd( { int res, boolVal; const char *msg; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "boolean"); @@ -6718,10 +6856,12 @@ TestReportUtime( static int TestReportNormalizePath( - Tcl_Interp *interp, + Tcl_Interp *dummy, Tcl_Obj *pathPtr, int nextCheckpoint) { + (void)dummy; + TestReport("normalizepath", pathPtr, NULL); return nextCheckpoint; } @@ -6729,9 +6869,10 @@ TestReportNormalizePath( static int SimplePathInFilesystem( Tcl_Obj *pathPtr, - void **clientDataPtr) + void **dummy) { const char *str = Tcl_GetString(pathPtr); + (void)dummy; if (strncmp(str, "simplefs:/", 10)) { return -1; @@ -6765,6 +6906,7 @@ TestSimpleFilesystemObjCmd( { int res, boolVal; const char *msg; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "boolean"); @@ -6918,11 +7060,13 @@ SimpleListVolumes(void) static int TestNumUtfCharsCmd( - void *clientData, + void *dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { + (void)dummy; + if (objc > 1) { int len = -1; @@ -6941,11 +7085,13 @@ TestNumUtfCharsCmd( static int TestFindFirstCmd( - void *clientData, + void *dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { + (void)dummy; + if (objc > 1) { int len = -1; @@ -6963,11 +7109,13 @@ TestFindFirstCmd( static int TestFindLastCmd( - void *clientData, + void *dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { + (void)dummy; + if (objc > 1) { int len = -1; @@ -7013,6 +7161,7 @@ TestcpuidCmd( int status, index, i; int regs[4]; Tcl_Obj *regsObjs[4]; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "eax"); @@ -7041,7 +7190,7 @@ TestcpuidCmd( static int TestHashSystemHashCmd( - void *clientData, + void *dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -7053,6 +7202,7 @@ TestHashSystemHashCmd( Tcl_HashTable hash; Tcl_HashEntry *hPtr; int i, isNew, limit = 100; + (void)dummy; if (objc>1 && Tcl_GetIntFromObj(interp, objv[1], &limit)!=TCL_OK) { return TCL_ERROR; @@ -7122,6 +7272,8 @@ TestgetintCmd( int argc, const char **argv) { + (void)dummy; + if (argc < 2) { Tcl_AppendResult(interp, "wrong # args", NULL); return TCL_ERROR; @@ -7149,6 +7301,9 @@ TestlongsizeCmd( int argc, const char **argv) { + (void)dummy; + (void)argv; + if (argc != 1) { Tcl_AppendResult(interp, "wrong # args", NULL); return TCL_ERROR; @@ -7164,6 +7319,7 @@ NREUnwind_callback( int result) { int none; + (void)result; if (data[0] == INT2PTR(-1)) { Tcl_NRAddCallback(interp, NREUnwind_callback, &none, INT2PTR(-1), @@ -7186,11 +7342,14 @@ NREUnwind_callback( static int TestNREUnwind( - void *clientData, + void *dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { + (void)dummy; + (void)objc; + (void)objv; /* * Insure that callbacks effectively run at the proper level during the * unwinding of the NRE stack. @@ -7204,7 +7363,7 @@ TestNREUnwind( static int TestNRELevels( - void *clientData, + void *dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -7215,6 +7374,9 @@ TestNRELevels( Tcl_Obj *levels[6]; int i = 0; NRE_callback *cbPtr = iPtr->execEnvPtr->callbackPtr; + (void)dummy; + (void)objc; + (void)objv; if (refDepth == NULL) { refDepth = &depth; @@ -7268,6 +7430,9 @@ TestconcatobjCmd( Tcl_Obj *list1Ptr, *list2Ptr, *emptyPtr, *concatPtr, *tmpPtr; int result = TCL_OK, len; Tcl_Obj *objv[3]; + (void)dummy; + (void)argc; + (void)argv; /* * Set the start of the error message as obj result; it will be cleared at @@ -7569,6 +7734,7 @@ TestparseargsCmd( {TCL_ARGV_CONSTANT, "-bool", INT2PTR(1), &foo, "booltest", NULL}, TCL_ARGV_AUTO_REST, TCL_ARGV_AUTO_HELP, TCL_ARGV_TABLE_END }; + (void)dummy; foo = 0; if (Tcl_ParseArgsObjv(interp, argTable, &count, objv, &remObjv)!=TCL_OK) { @@ -7600,6 +7766,8 @@ InterpCmdResolver( varFramePtr->procPtr : NULL; Namespace *callerNsPtr = varFramePtr->nsPtr; Tcl_Command resolvedCmdPtr = NULL; + (void)context; + (void)flags; /* * Just do something special on a cmd literal "z" in two cases: @@ -7687,6 +7855,12 @@ InterpVarResolver( int flags, Tcl_Var *rPtr) { + (void)interp; + (void)name; + (void)context; + (void)flags; + (void)rPtr; + /* * Don't resolve the variable; use standard rules. */ @@ -7774,12 +7948,16 @@ MyCompiledVarFetch( static int InterpCompiledVarResolver( - Tcl_Interp *interp, + Tcl_Interp *dummy, const char *name, int length, Tcl_Namespace *context, Tcl_ResolvedVarInfo **rPtr) { + (void)dummy; + (void)length; + (void)context; + if (*name == 'T') { MyResolvedVarInfo *resVarInfo = (MyResolvedVarInfo *)ckalloc(sizeof(MyResolvedVarInfo)); @@ -7796,7 +7974,7 @@ InterpCompiledVarResolver( static int TestInterpResolverCmd( - void *clientData, + void *dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -7806,6 +7984,7 @@ TestInterpResolverCmd( }; int idx; #define RESOLVER_KEY "testInterpResolver" + (void)dummy; if ((objc < 2) || (objc > 3)) { Tcl_WrongNumArgs(interp, 1, objv, "up|down ?interp?"); diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index 4763084..6dce6a3 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -146,7 +146,7 @@ TclObjTest_Init( static int TestbignumobjCmd( - void *clientData, /* unused */ + void *dummy, /* unused */ Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Argument count */ Tcl_Obj *const objv[]) /* Argument vector */ @@ -162,6 +162,7 @@ TestbignumobjCmd( const char *string; mp_int bignumValue, newValue; Tcl_Obj **varPtr; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); @@ -345,7 +346,7 @@ TestbignumobjCmd( static int TestbooleanobjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -353,6 +354,7 @@ TestbooleanobjCmd( int varIndex, boolValue; const char *index, *subCmd; Tcl_Obj **varPtr; + (void)dummy; if (objc < 3) { wrongNumArgs: @@ -445,7 +447,7 @@ TestbooleanobjCmd( static int TestdoubleobjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -454,6 +456,7 @@ TestdoubleobjCmd( double doubleValue; const char *index, *subCmd, *string; Tcl_Obj **varPtr; + (void)dummy; if (objc < 3) { wrongNumArgs: @@ -563,7 +566,7 @@ TestdoubleobjCmd( static int TestindexobjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -571,6 +574,8 @@ TestindexobjCmd( int allowAbbrev, index, index2, setError, i, result; const char **argv; static const char *const tablePtr[] = {"a", "b", "check", NULL}; + (void)dummy; + /* * Keep this structure declaration in sync with tclIndexObj.c */ @@ -652,7 +657,7 @@ TestindexobjCmd( static int TestintobjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -661,6 +666,7 @@ TestintobjCmd( Tcl_WideInt wideValue; const char *index, *subCmd, *string; Tcl_Obj **varPtr; + (void)dummy; if (objc < 3) { wrongNumArgs: @@ -856,7 +862,7 @@ TestintobjCmd( static int TestlistobjCmd( - void *clientData, /* Not used */ + void *dummy, /* Not used */ Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Number of arguments */ Tcl_Obj *const objv[]) /* Argument objects */ @@ -879,6 +885,7 @@ TestlistobjCmd( int first; /* First index in the list */ int count; /* Count of elements in a list */ Tcl_Obj **varPtr; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg...?"); @@ -953,7 +960,7 @@ TestlistobjCmd( static int TestobjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -962,6 +969,7 @@ TestobjCmd( const char *index, *subCmd, *string; const Tcl_ObjType *targetType; Tcl_Obj **varPtr; + (void)dummy; if (objc < 2) { wrongNumArgs: @@ -1165,7 +1173,7 @@ TestobjCmd( static int TeststringobjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -1181,6 +1189,7 @@ TeststringobjCmd( "set", "set2", "setlength", "maxchars", "appendself", "appendself2", NULL }; + (void)dummy; if (objc < 3) { wrongNumArgs: diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c index 45b0e26..dfda199 100644 --- a/generic/tclThreadAlloc.c +++ b/generic/tclThreadAlloc.c @@ -875,6 +875,8 @@ UnlockBucket( Cache *cachePtr, int bucket) { + (void)cachePtr; + Tcl_MutexUnlock(bucketInfo[bucket].lockPtr); } diff --git a/generic/tclTimer.c b/generic/tclTimer.c index f4f41a1..924881e 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -211,9 +211,10 @@ InitTimer(void) static void TimerExitProc( - ClientData clientData) /* Not used. */ + ClientData dummy) /* Not used. */ { ThreadSpecificData *tsdPtr = (ThreadSpecificData *)TclThreadDataKeyGet(&dataKey); + (void)dummy; Tcl_DeleteEventSource(TimerSetupProc, TimerCheckProc, NULL); if (tsdPtr != NULL) { @@ -398,11 +399,12 @@ Tcl_DeleteTimerHandler( static void TimerSetupProc( - ClientData data, /* Not used. */ + ClientData dummy, /* Not used. */ 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)) { @@ -456,12 +458,13 @@ TimerSetupProc( static void TimerCheckProc( - ClientData data, /* Not used. */ + ClientData dummy, /* Not used. */ 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) { /* @@ -526,6 +529,7 @@ TimerHandlerEventProc( Tcl_Time time; int currentTimerId; ThreadSpecificData *tsdPtr = InitTimer(); + (void)evPtr; /* * Do nothing if timers aren't enabled. This leaves the event on the @@ -779,7 +783,7 @@ TclServiceIdle(void) /* ARGSUSED */ int Tcl_AfterObjCmd( - ClientData clientData, /* Unused */ + ClientData dummy, /* Unused */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -795,6 +799,7 @@ 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 ...?"); @@ -1253,10 +1258,11 @@ static void AfterCleanupProc( ClientData clientData, /* Points to AfterAssocData for the * interpreter. */ - Tcl_Interp *interp) /* Interpreter that is being deleted. */ + Tcl_Interp *dummy) /* Interpreter that is being deleted. */ { 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 4725e97..08d3771 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -1439,6 +1439,7 @@ TclCheckExecutionTraces( int curLevel; int traceCode = TCL_OK; Tcl_InterpState state = NULL; + (void)numChars; if (cmdPtr->tracePtr == NULL) { return traceCode; @@ -1775,6 +1776,7 @@ 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/tclVar.c b/generic/tclVar.c index bcb12ca..2c2f967 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -3506,7 +3506,7 @@ ArrayDoneSearch( /* ARGSUSED */ static int ArrayAnyMoreCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -3516,6 +3516,7 @@ ArrayAnyMoreCmd( Tcl_Obj *varNameObj, *searchObj; int gotValue, isArray; ArraySearch *searchPtr; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId"); @@ -3585,7 +3586,7 @@ ArrayAnyMoreCmd( /* ARGSUSED */ static int ArrayNextElementCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -3594,6 +3595,7 @@ ArrayNextElementCmd( Tcl_Obj *varNameObj, *searchObj; ArraySearch *searchPtr; int isArray; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId"); @@ -3666,7 +3668,7 @@ ArrayNextElementCmd( /* ARGSUSED */ static int ArrayDoneSearchCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -3676,6 +3678,7 @@ ArrayDoneSearchCmd( Tcl_Obj *varNameObj, *searchObj; ArraySearch *searchPtr; int isArray; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId"); @@ -3727,13 +3730,14 @@ ArrayDoneSearchCmd( /* ARGSUSED */ static int ArrayExistsCmd( - ClientData clientData, + ClientData dummy, 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"); @@ -3768,7 +3772,7 @@ ArrayExistsCmd( /* ARGSUSED */ static int ArrayGetCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -3779,6 +3783,7 @@ ArrayGetCmd( Tcl_HashSearch search; const char *pattern; int i, count, result, isArray; + (void)dummy; switch (objc) { case 2: @@ -3928,7 +3933,7 @@ ArrayGetCmd( /* ARGSUSED */ static int ArrayNamesCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -3942,6 +3947,7 @@ 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?"); @@ -4096,7 +4102,7 @@ TclFindArrayPtrElements( /* ARGSUSED */ static int ArraySetCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -4105,6 +4111,7 @@ ArraySetCmd( Tcl_Obj *arrayElemObj; Var *varPtr, *arrayPtr; int result, i; + (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "arrayName list"); @@ -4272,7 +4279,7 @@ ArraySetCmd( /* ARGSUSED */ static int ArraySizeCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -4281,6 +4288,7 @@ ArraySizeCmd( Tcl_HashSearch search; Var *varPtr2; int isArray, size = 0; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "arrayName"); @@ -4332,7 +4340,7 @@ ArraySizeCmd( /* ARGSUSED */ static int ArrayStatsCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -4341,6 +4349,7 @@ ArrayStatsCmd( Tcl_Obj *varNameObj; char *stats; int isArray; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "arrayName"); @@ -4387,7 +4396,7 @@ ArrayStatsCmd( /* ARGSUSED */ static int ArrayUnsetCmd( - ClientData clientData, + ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -4398,6 +4407,7 @@ ArrayUnsetCmd( const char *pattern; const int unsetFlags = 0; /* Should this be TCL_LEAVE_ERR_MSG? */ int isArray; + (void)dummy; switch (objc) { case 2: @@ -5023,6 +5033,7 @@ Tcl_GlobalObjCmd( const char *varName; const char *tail; int result, i; + (void)dummy; /* * If we are not executing inside a Tcl procedure, just return. @@ -5128,6 +5139,7 @@ Tcl_VariableObjCmd( Tcl_Obj *varValuePtr; int i, result; Tcl_Obj *varNamePtr, *tailPtr; + (void)dummy; for (i=1 ; i<objc ; i+=2) { /* @@ -5259,6 +5271,7 @@ Tcl_UpvarObjCmd( CallFrame *framePtr; int result, hasLevel; Tcl_Obj *levelObj; + (void)dummy; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, @@ -6077,6 +6090,7 @@ 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 @@ -6263,6 +6277,7 @@ TclInfoGlobalsCmd( Tcl_HashSearch search; Var *varPtr; Tcl_Obj *listPtr, *varNamePtr, *patternPtr; + (void)dummy; if (objc == 1) { pattern = NULL; @@ -6353,6 +6368,7 @@ TclInfoLocalsCmd( { Interp *iPtr = (Interp *) interp; Tcl_Obj *patternPtr, *listPtr; + (void)dummy; if (objc == 1) { patternPtr = NULL; @@ -6567,6 +6583,7 @@ AllocVarEntry( Tcl_Obj *objPtr = (Tcl_Obj *)keyPtr; Tcl_HashEntry *hPtr; Var *varPtr; + (void)tablePtr; varPtr = (Var *)ckalloc(sizeof(VarInHash)); varPtr->flags = VAR_IN_HASHTABLE; @@ -6652,7 +6669,7 @@ CompareVarKeys( /* ARGSUSED */ static int ArrayDefaultCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -6664,6 +6681,7 @@ 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 7b8f162..b1a8a92 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -276,7 +276,9 @@ static struct { Tcl_HashTable fileHash; /* File name to ZipEntry mapping */ Tcl_HashTable zipHash; /* Mount to ZipFile mapping */ } ZipFS = { - 0, 0, 0, DEFAULT_WRITE_MAX_SIZE, 0, {0}, {0} + 0, 0, 0, DEFAULT_WRITE_MAX_SIZE, 0, + {0,{0,0,0,0},0,0,0,0,0,0,0,0,0}, + {0,{0,0,0,0},0,0,0,0,0,0,0,0,0} }; /* @@ -1879,11 +1881,13 @@ TclZipfs_Unmount( static int ZipFSMountObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ 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, "?mountpoint? ?zipfile? ?password?"); @@ -1913,7 +1917,7 @@ ZipFSMountObjCmd( static int ZipFSMountBufferObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -1921,6 +1925,7 @@ ZipFSMountBufferObjCmd( const char *mountPoint; /* Mount point path. */ unsigned char *data; int length; + (void)dummy; if (objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "?mountpoint? ?data?"); @@ -1965,11 +1970,15 @@ ZipFSMountBufferObjCmd( static int ZipFSRootObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + (void)objc; + (void)objv; + Tcl_SetObjResult(interp, Tcl_NewStringObj(ZIPFS_VOLUME, -1)); return TCL_OK; } @@ -1992,11 +2001,13 @@ ZipFSRootObjCmd( static int ZipFSUnmountObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ 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"); return TCL_ERROR; @@ -2023,13 +2034,14 @@ ZipFSUnmountObjCmd( static int ZipFSMkKeyObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ 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"); @@ -2802,11 +2814,13 @@ ZipFSMkZipOrImgObjCmd( static int ZipFSMkZipObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ 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; @@ -2822,11 +2836,13 @@ ZipFSMkZipObjCmd( static int ZipFSLMkZipObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ 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; @@ -2859,11 +2875,13 @@ ZipFSLMkZipObjCmd( static int ZipFSMkImgObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ 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?"); @@ -2880,11 +2898,13 @@ ZipFSMkImgObjCmd( static int ZipFSLMkImgObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ 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; @@ -2917,7 +2937,7 @@ ZipFSLMkImgObjCmd( static int ZipFSCanonicalObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -2926,6 +2946,7 @@ ZipFSCanonicalObjCmd( char *filename = NULL; char *result; Tcl_DString dPath; + (void)dummy; if (objc < 2 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "?mountpoint? filename ?inZipfs?"); @@ -2973,7 +2994,7 @@ ZipFSCanonicalObjCmd( static int ZipFSExistsObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -2981,6 +3002,7 @@ ZipFSExistsObjCmd( char *filename; int exists; Tcl_DString ds; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "filename"); @@ -3026,13 +3048,14 @@ ZipFSExistsObjCmd( static int ZipFSInfoObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ 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"); @@ -3076,7 +3099,7 @@ ZipFSInfoObjCmd( static int ZipFSListObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -3086,6 +3109,7 @@ 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?"); @@ -3273,11 +3297,15 @@ TclZipfs_TclLibrary(void) static int ZipFSTclLibraryObjCmd( - void *clientData, /* Not used. */ + void *dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + (void)dummy; + (void)objc; + (void)objv; + if (!Tcl_IsSafe(interp)) { Tcl_Obj *pResult = TclZipfs_TclLibrary(); @@ -3308,9 +3336,10 @@ ZipFSTclLibraryObjCmd( static int ZipChannelClose( void *instanceData, - Tcl_Interp *interp) /* Current interpreter. */ + Tcl_Interp *dummy) /* Current interpreter. */ { ZipChannel *info = (ZipChannel *)instanceData; + (void)dummy; if (info->iscompr && info->ubuf) { ckfree(info->ubuf); @@ -3560,6 +3589,9 @@ ZipChannelWatchChannel( void *instanceData, int mask) { + (void)instanceData; + (void)mask; + return; } @@ -3586,6 +3618,10 @@ ZipChannelGetFile( int direction, void **handlePtr) { + (void)instanceData; + (void)direction; + (void)handlePtr; + return TCL_ERROR; } @@ -3617,6 +3653,7 @@ ZipChannelOpen( 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)))) { @@ -4139,6 +4176,8 @@ static Tcl_Obj * ZipFSFilesystemSeparatorProc( Tcl_Obj *pathPtr) { + (void)pathPtr; + return Tcl_NewStringObj("/", -1); } @@ -4163,7 +4202,7 @@ ZipFSFilesystemSeparatorProc( static int ZipFSMatchInDirectoryProc( - Tcl_Interp *interp, /* Current interpreter. */ + Tcl_Interp *dummy, /* Current interpreter. */ Tcl_Obj *result, Tcl_Obj *pathPtr, const char *pattern, @@ -4176,6 +4215,7 @@ ZipFSMatchInDirectoryProc( size_t len; char *pat, *prefix, *path; Tcl_DString dsPref; + (void)dummy; if (!normPathPtr) { return -1; @@ -4354,13 +4394,14 @@ ZipFSMatchInDirectoryProc( static int ZipFSPathInFilesystemProc( Tcl_Obj *pathPtr, - void **clientDataPtr) + void **dummy) { Tcl_HashEntry *hPtr; Tcl_HashSearch search; int ret = -1; size_t len; char *path; + (void)dummy; pathPtr = Tcl_FSGetNormalizedPath(NULL, pathPtr); if (!pathPtr) { @@ -4453,6 +4494,9 @@ ZipFSFileAttrStringsProc( Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef) { + (void)pathPtr; + (void)objPtrRef; + static const char *const attrs[] = { "-uncompsize", "-compsize", @@ -4563,6 +4607,10 @@ ZipFSFileAttrsSetProc( Tcl_Obj *pathPtr, 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); @@ -4586,6 +4634,7 @@ static Tcl_Obj * ZipFSFilesystemPathTypeProc( Tcl_Obj *pathPtr) { + (void)pathPtr; return Tcl_NewStringObj("zip", -1); } @@ -4977,6 +5026,8 @@ TclZipfs_AppHook( #ifdef _WIN32 Tcl_DStringFree(&ds); #endif /* _WIN32 */ +#else + (void)argcPtr; #endif /* SUPPORT_BUILTIN_ZIP_INSTALL */ } return TCL_OK; diff --git a/unix/configure b/unix/configure index 35f99ab..545291c 100755 --- a/unix/configure +++ b/unix/configure @@ -4934,7 +4934,7 @@ fi if test "$GCC" = yes; then : CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall -Wwrite-strings -Wsign-compare -Wpointer-arith" + CFLAGS_WARNING="-Wall -Wwrite-strings -Wsign-compare -Wpointer-arith -Wunused-parameter" else diff --git a/unix/tcl.m4 b/unix/tcl.m4 index c05f2d9..fdcb3d3 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -986,7 +986,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g AS_IF([test "$GCC" = yes], [ CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall -Wwrite-strings -Wsign-compare -Wpointer-arith" + CFLAGS_WARNING="-Wall -Wwrite-strings -Wsign-compare -Wpointer-arith -Wunused-parameter" ], [ CFLAGS_OPTIMIZE=-O CFLAGS_WARNING="" diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index 0fef500..4f63ab3 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -287,6 +287,8 @@ TclGuessPackageName( Tcl_DString *bufPtr) /* Initialized empty dstring. Append package * name to this if possible. */ { + (void)fileName; + (void)bufPtr; return 0; } diff --git a/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c index cd62f6a..d3b3fe1 100644 --- a/unix/tclSelectNotfy.c +++ b/unix/tclSelectNotfy.c @@ -925,7 +925,7 @@ Tcl_WaitForEvent( #if TCL_THREADS static TCL_NORETURN void NotifierThreadProc( - ClientData clientData) /* Not used. */ + ClientData dummy) /* Not used. */ { ThreadSpecificData *tsdPtr; fd_set readableMask; @@ -937,6 +937,7 @@ 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 f3814fb..2dc5f46 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -353,10 +353,11 @@ FileOutputProc( static int FileCloseProc( void *instanceData, /* File state. */ - Tcl_Interp *interp) /* For error reporting - unused. */ + Tcl_Interp *dummy) /* For error reporting - unused. */ { FileState *fsPtr = (FileState *)instanceData; int errorCode = 0; + (void)dummy; Tcl_DeleteFileHandler(fsPtr->fd); @@ -1927,7 +1928,7 @@ 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 checkUsage, /* 1 means verify that the file was opened in + 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 * the channel is open for the requested @@ -1939,6 +1940,7 @@ 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/tclUnixFCmd.c b/unix/tclUnixFCmd.c index f15c3d9..6f60664 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -1230,7 +1230,7 @@ TraversalCopy( static int TraversalDelete( Tcl_DString *srcPtr, /* Source pathname (native). */ - Tcl_DString *ignore, /* Destination pathname (not used). */ + Tcl_DString *dummy, /* Destination pathname (not used). */ const Tcl_StatBuf *statBufPtr, /* Stat info for file specified by srcPtr. */ int type, /* Reason for call - see TraverseUnixTree(). */ @@ -1238,6 +1238,9 @@ TraversalDelete( * filled with UTF-8 name of file causing * error. */ { + (void)dummy; + (void)statBufPtr; + switch (type) { case DOTREE_F: if (TclpDeleteFile(Tcl_DStringValue(srcPtr)) == 0) { @@ -1286,6 +1289,7 @@ CopyFileAtts( { struct utimbuf tval; mode_t newMode; + (void)src; newMode = statBufPtr->st_mode & (S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO); @@ -1344,6 +1348,7 @@ GetGroupAttribute( Tcl_StatBuf statBuf; struct group *groupPtr; int result; + (void)objIndex; result = TclpObjStat(fileName, &statBuf); @@ -1398,6 +1403,7 @@ GetOwnerAttribute( Tcl_StatBuf statBuf; struct passwd *pwPtr; int result; + (void)objIndex; result = TclpObjStat(fileName, &statBuf); @@ -1449,6 +1455,7 @@ GetPermissionsAttribute( { Tcl_StatBuf statBuf; int result; + (void)objIndex; result = TclpObjStat(fileName, &statBuf); @@ -1492,6 +1499,7 @@ SetGroupAttribute( Tcl_WideInt gid; int result; const char *native; + (void)objIndex; if (Tcl_GetWideIntFromObj(NULL, attributePtr, &gid) != TCL_OK) { Tcl_DString ds; @@ -1558,6 +1566,7 @@ SetOwnerAttribute( Tcl_WideInt uid; int result; const char *native; + (void)objIndex; if (Tcl_GetWideIntFromObj(NULL, attributePtr, &uid) != TCL_OK) { Tcl_DString ds; @@ -1627,6 +1636,7 @@ SetPermissionsAttribute( const char *native; const char *modeStringPtr = TclGetString(attributePtr); int scanned = TclParseAllWhiteSpace(modeStringPtr, -1); + (void)objIndex; /* * First supply support for octal number format @@ -1739,7 +1749,7 @@ TclpObjListVolumes(void) static int GetModeFromPermString( - Tcl_Interp *interp, /* The interp we are using for errors. */ + Tcl_Interp *dummy, /* The interp we are using for errors. */ const char *modeStringPtr, /* Permissions string */ mode_t *modePtr) /* pointer to the mode value */ { @@ -1748,6 +1758,7 @@ 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 @@ -1929,7 +1940,7 @@ GetModeFromPermString( int TclpObjNormalizePath( - Tcl_Interp *interp, + Tcl_Interp *dummy, Tcl_Obj *pathPtr, int nextCheckpoint) { @@ -1942,6 +1953,7 @@ TclpObjNormalizePath( #ifndef NO_REALPATH char normPath[MAXPATHLEN]; #endif + (void)dummy; /* * We add '1' here because if nextCheckpoint is zero we know that '/' diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 2f6baf6..6b0ddb0 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -44,6 +44,8 @@ TclpFindExecutable( int length; char buf[PATH_MAX * 2]; char name[PATH_MAX * TCL_UTF_MAX + 1]; + (void)argv0; + GetModuleFileNameW(NULL, buf, PATH_MAX); cygwin_conv_path(3, buf, name, PATH_MAX); length = strlen(name); @@ -555,6 +557,8 @@ NativeMatchType( return matchResult; } } +#else + (void)interp; #endif /* MAC_OSX_TCL */ return 1; @@ -1018,6 +1022,7 @@ Tcl_Obj * TclpFilesystemPathType( Tcl_Obj *pathPtr) { + (void)pathPtr; /* * All native paths are of the same type. */ diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index bb01597..31d9671 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -271,6 +271,7 @@ TclpTempFileNameForLibrary( Tcl_Obj *path) /* Path name of the library in the VFS. */ { Tcl_Obj *retval = TclpTempFileName(); + (void)path; if (retval == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( @@ -813,6 +814,7 @@ Tcl_CreatePipe( int flags) /* Reserved for future use. */ { int fileNums[2]; + (void)flags; if (pipe(fileNums) < 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf("pipe creation failed: %s", @@ -1261,6 +1263,7 @@ Tcl_PidObjCmd( PipeState *pipePtr; int i; Tcl_Obj *resultPtr; + (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?channelId?"); diff --git a/win/configure b/win/configure index b0e1d5a..d2beded 100755 --- a/win/configure +++ b/win/configure @@ -4173,7 +4173,7 @@ $as_echo "using shared flags" >&6; } CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -Wwrite-strings -Wsign-compare -Wdeclaration-after-statement -Wpointer-arith" + CFLAGS_WARNING="-Wall -Wwrite-strings -Wsign-compare -Wdeclaration-after-statement -Wpointer-arith -Wunused-parameter" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= diff --git a/win/rules.vc b/win/rules.vc index 44e8704..b683651 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -1278,9 +1278,9 @@ OPTDEFINES = $(OPTDEFINES) -DTCL_MEM_DEBUG !if $(TCL_COMPILE_DEBUG)
OPTDEFINES = $(OPTDEFINES) -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS
!endif
-!if $(TCL_THREADS) && $(TCL_VERSION) <= 86
+!if $(TCL_THREADS) && $(TCL_VERSION) < 87
OPTDEFINES = $(OPTDEFINES) -DTCL_THREADS=1
-!if $(USE_THREAD_ALLOC)
+!if $(USE_THREAD_ALLOC) && $(TCL_VERSION) < 87
OPTDEFINES = $(OPTDEFINES) -DUSE_THREAD_ALLOC=1
!endif
!endif
@@ -1751,6 +1751,9 @@ TCLNMAKECONFIG = "$(OUT_DIR)\tcl.nmake" !if defined(CORE_MACHINE) && "$(CORE_MACHINE)" != "$(MACHINE)"
!error ERROR: Build target ($(MACHINE)) does not match the Tcl library architecture ($(CORE_MACHINE)).
!endif
+!if $(TCL_VERSION) < 87 && defined(CORE_USE_THREAD_ALLOC) && $(CORE_USE_THREAD_ALLOC) != $(USE_THREAD_ALLOC)
+!message WARNING: Value of USE_THREAD_ALLOC ($(USE_THREAD_ALLOC)) does not match its Tcl core value ($(CORE_USE_THREAD_ALLOC)).
+!endif
!if defined(CORE_DEBUG) && $(CORE_DEBUG) != $(DEBUG)
!message WARNING: Value of DEBUG ($(DEBUG)) does not match its Tcl library configuration ($(DEBUG)).
!endif
@@ -685,7 +685,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -Wwrite-strings -Wsign-compare -Wdeclaration-after-statement -Wpointer-arith" + CFLAGS_WARNING="-Wall -Wwrite-strings -Wsign-compare -Wdeclaration-after-statement -Wpointer-arith -Wunused-parameter" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index ebd0e24..85e2925 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -119,6 +119,8 @@ DllMain( DWORD reason, /* Reason this function is being called. */ LPVOID reserved) /* Not used. */ { + (void)reserved; + switch (reason) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hInst); diff --git a/win/tclWinChan.c b/win/tclWinChan.c index a2a7942..c36173b 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -180,8 +180,10 @@ FileInit(void) static void FileChannelExitHandler( - ClientData clientData) /* Old window proc */ + ClientData dummy) /* Old window proc */ { + (void)dummy; + Tcl_DeleteEventSource(FileSetupProc, FileCheckProc, NULL); } @@ -204,12 +206,13 @@ FileChannelExitHandler( void FileSetupProc( - ClientData data, /* Not used. */ + ClientData dummy, /* Not used. */ 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; @@ -247,12 +250,13 @@ FileSetupProc( static void FileCheckProc( - ClientData data, /* Not used. */ + ClientData dummy, /* Not used. */ 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; @@ -386,12 +390,13 @@ FileBlockProc( static int FileCloseProc( ClientData instanceData, /* Pointer to FileInfo structure. */ - Tcl_Interp *interp) /* Not used. */ + Tcl_Interp *dummy) /* Not used. */ { FileInfo *fileInfoPtr = (FileInfo *)instanceData; FileInfo *infoPtr; ThreadSpecificData *tsdPtr; int errorCode = 0; + (void)dummy; /* * Remove the file from the watch list. diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index 8456fcb..fe43c60 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -317,8 +317,10 @@ ConsoleInit(void) static void ConsoleExitHandler( - ClientData clientData) /* Old window proc. */ + ClientData dummy) /* Old window proc. */ { + (void)dummy; + Tcl_DeleteEventSource(ConsoleSetupProc, ConsoleCheckProc, NULL); } @@ -341,8 +343,10 @@ ConsoleExitHandler( static void ProcExitHandler( - ClientData clientData) /* Old window proc. */ + ClientData dummy) /* Old window proc. */ { + (void)dummy; + Tcl_MutexLock(&consoleMutex); initialized = 0; Tcl_MutexUnlock(&consoleMutex); @@ -367,13 +371,14 @@ ProcExitHandler( void ConsoleSetupProc( - ClientData data, /* Not used. */ + ClientData dummy, /* Not used. */ 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; @@ -421,12 +426,13 @@ ConsoleSetupProc( static void ConsoleCheckProc( - ClientData data, /* Not used. */ + ClientData dummy, /* Not used. */ 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; @@ -531,12 +537,13 @@ ConsoleBlockModeProc( static int ConsoleCloseProc( ClientData instanceData, /* Pointer to ConsoleInfo structure. */ - Tcl_Interp *interp) /* For error reporting. */ + Tcl_Interp *dummy) /* For error reporting. */ { ConsoleInfo *consolePtr = (ConsoleInfo *)instanceData; int errorCode = 0; ConsoleInfo *infoPtr, **nextPtrPtr; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + (void)dummy; /* * Clean up the background thread if necessary. Note that this must be @@ -987,6 +994,7 @@ ConsoleGetHandleProc( ClientData *handlePtr) /* Where to store the handle. */ { ConsoleInfo *infoPtr = (ConsoleInfo *)instanceData; + (void)direction; *handlePtr = infoPtr->handle; return TCL_OK; diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 2058889..3fe855f 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -178,7 +178,7 @@ Dde_Init( Tcl_CreateObjCommand(interp, "dde", DdeObjCmd, NULL, NULL); Tcl_CreateExitHandler(DdeExitProc, NULL); - return Tcl_PkgProvide(interp, TCL_DDE_PACKAGE_NAME, TCL_DDE_VERSION); + return Tcl_PkgProvideEx(interp, TCL_DDE_PACKAGE_NAME, TCL_DDE_VERSION, NULL); } /* diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index b962889..1df929a 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -1432,6 +1432,8 @@ TraversalDelete( 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) { @@ -1597,6 +1599,7 @@ ConvertFileNameFormat( { int pathc, i; Tcl_Obj *splitPath; + (void)objIndex; splitPath = Tcl_FSSplitPath(fileName, &pathc); @@ -1894,6 +1897,8 @@ CannotSetAttribute( Tcl_Obj *fileName, /* The name of the file. */ Tcl_Obj *attributePtr) /* The new value of the attribute. */ { + (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 60337da..5440cd8 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -2541,7 +2541,7 @@ TclpFilesystemPathType( int TclpObjNormalizePath( - Tcl_Interp *interp, + Tcl_Interp *dummy, Tcl_Obj *pathPtr, int nextCheckpoint) { @@ -2551,6 +2551,7 @@ 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 a24e1b0..d4fb852 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -67,6 +67,7 @@ TclpDlopen( const WCHAR *nativeName; Tcl_LoadHandle handlePtr; DWORD firstError; + (void)flags; /* * First try the full path the user gave us. This is particularly @@ -286,6 +287,9 @@ TclGuessPackageName( Tcl_DString *bufPtr) /* Initialized empty dstring. Append package * name to this if possible. */ { + (void)fileName; + (void)bufPtr; + return 0; } diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 618052b..38112e4 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -310,13 +310,14 @@ TclpFinalizePipes(void) void PipeSetupProc( - ClientData data, /* Not used. */ + ClientData dummy, /* Not used. */ 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; @@ -363,13 +364,14 @@ PipeSetupProc( static void PipeCheckProc( - ClientData data, /* Not used. */ + ClientData dummy, /* Not used. */ 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; @@ -1860,6 +1862,7 @@ Tcl_CreatePipe( { HANDLE readHandle, writeHandle; SECURITY_ATTRIBUTES sec; + (void)flags; sec.nLength = sizeof(SECURITY_ATTRIBUTES); sec.lpSecurityDescriptor = NULL; @@ -2753,6 +2756,7 @@ Tcl_PidObjCmd( PipeInfo *pipePtr; int i; Tcl_Obj *resultPtr; + (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?channelId?"); @@ -3200,6 +3204,8 @@ 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/tclWinPort.h b/win/tclWinPort.h index 3f8b546..1a5ce36 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -19,7 +19,7 @@ #define __MINGW_USE_VC2005_COMPAT #endif -#if !defined(_WIN64) && !defined(__MINGW_USE_VC2005_COMPAT) && defined(BUILD_tcl) +#if !defined(_WIN64) && !defined(__MINGW_USE_VC2005_COMPAT) /* See [Bug 3354324]: file mtime sets wrong time */ # define _USE_32BIT_TIME_T #endif diff --git a/win/tclWinReg.c b/win/tclWinReg.c index ee13dbb..f89d120 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -188,7 +188,7 @@ Registry_Init( cmd = Tcl_CreateObjCommand(interp, "registry", RegistryObjCmd, interp, DeleteCmd); Tcl_SetAssocData(interp, REGISTRY_ASSOC_KEY, NULL, cmd); - return Tcl_PkgProvide(interp, "registry", "1.3.3"); + return Tcl_PkgProvideEx(interp, "registry", "1.3.3", NULL); } /* diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index 6ede6d9..0d0f5a8 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -285,10 +285,11 @@ SerialInit(void) static void SerialExitHandler( - ClientData clientData) /* Old window proc */ + ClientData dummy) /* Old window proc */ { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); SerialInfo *infoPtr; + (void)dummy; /* * Clear all eventually pending output. Otherwise Tcl's exit could totally @@ -323,8 +324,10 @@ SerialExitHandler( static void ProcExitHandler( - ClientData clientData) /* Old window proc */ + ClientData dummy) /* Old window proc */ { + (void)dummy; + Tcl_MutexLock(&serialMutex); initialized = 0; Tcl_MutexUnlock(&serialMutex); @@ -406,13 +409,14 @@ SerialGetMilliseconds(void) void SerialSetupProc( - ClientData data, /* Not used. */ + ClientData dummy, /* Not used. */ 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; @@ -461,7 +465,7 @@ SerialSetupProc( static void SerialCheckProc( - ClientData data, /* Not used. */ + ClientData dummy, /* Not used. */ int flags) /* Event flags as passed to Tcl_DoOneEvent. */ { SerialInfo *infoPtr; @@ -470,6 +474,7 @@ SerialCheckProc( ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); COMSTAT cStat; unsigned int time; + (void)dummy; if (!(flags & TCL_FILE_EVENTS)) { return; @@ -601,12 +606,13 @@ SerialBlockProc( static int SerialCloseProc( ClientData instanceData, /* Pointer to SerialInfo structure. */ - Tcl_Interp *interp) /* For error reporting. */ + Tcl_Interp *dummy) /* For error reporting. */ { SerialInfo *serialPtr = (SerialInfo *) instanceData; int errorCode, result = 0; SerialInfo *infoPtr, **nextPtrPtr; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + (void)dummy; errorCode = 0; @@ -1250,6 +1256,7 @@ SerialGetHandleProc( 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 c1fc3ce..05898a5 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -1038,12 +1038,13 @@ TcpOutputProc( static int TcpCloseProc( ClientData instanceData, /* The socket to close. */ - Tcl_Interp *interp) /* Unused. */ + Tcl_Interp *dummy) /* Unused. */ { 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 @@ -1197,7 +1198,10 @@ TcpSetOptionProc( #ifdef TCL_FEATURE_KEEPALIVE_NAGLE TcpState *statePtr = instanceData; SOCKET sock; +#else + (void)instanceData; #endif /*TCL_FEATURE_KEEPALIVE_NAGLE*/ + (void)value; /* * Check that WinSock is initialized; do not call it if not, to prevent @@ -1674,6 +1678,7 @@ TcpGetHandleProc( ClientData *handlePtr) /* Where to store the handle. */ { TcpState *statePtr = (TcpState *)instanceData; + (void)direction; *handlePtr = INT2PTR(statePtr->sockets->fd); return TCL_OK; @@ -2619,8 +2624,10 @@ SocketsEnabled(void) /* ARGSUSED */ static void SocketExitHandler( - ClientData clientData) /* Not used. */ + ClientData dummy) /* Not used. */ { + (void)dummy; + Tcl_MutexLock(&socketMutex); /* @@ -2653,12 +2660,13 @@ SocketExitHandler( void SocketSetupProc( - ClientData data, /* Not used. */ + ClientData dummy, /* Not used. */ 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; @@ -2698,12 +2706,13 @@ SocketSetupProc( static void SocketCheckProc( - ClientData data, /* Not used. */ + ClientData dummy, /* Not used. */ 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 1a1ed12..ffae7af 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -104,7 +104,7 @@ TclplatformtestInit( static int TesteventloopCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -112,6 +112,7 @@ 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 ..."); @@ -180,7 +181,7 @@ TesteventloopCmd( static int TestvolumetypeCmd( - ClientData clientData, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -189,6 +190,7 @@ TestvolumetypeCmd( int found; char volType[VOL_BUF_SIZE]; const char *path; + (void)dummy; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?name?"); @@ -259,6 +261,7 @@ 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, ""); @@ -295,12 +298,13 @@ TestwinclockCmd( static int TestwinsleepCmd( - ClientData clientData, /* Unused */ + ClientData dummy, /* Unused */ 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"); @@ -315,11 +319,13 @@ TestwinsleepCmd( static int TestSizeCmd( - ClientData clientData, /* Unused */ + ClientData dummy, /* Unused */ Tcl_Interp* interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const * objv) /* Parameter vector */ { + (void)dummy; + if (objc != 2) { goto syntax; } @@ -385,6 +391,7 @@ TestExceptionCmd( EXCEPTION_GUARD_PAGE, EXCEPTION_INVALID_HANDLE, CONTROL_C_EXIT }; int cmd; + (void)dummy; if (objc != 2) { Tcl_WrongNumArgs(interp, 0, objv, "<type-of-exception>"); @@ -653,6 +660,7 @@ TestchmodCmd( 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 49389de..39e1100 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -414,8 +414,11 @@ Tcl_GetTime( static void NativeScaleTime( Tcl_Time *timePtr, - ClientData clientData) + ClientData dummy) { + (void)timePtr; + (void)dummy; + /* * Native scale is 1:1. Nothing is done. */ @@ -649,9 +652,10 @@ NativeGetMicroseconds(void) static void NativeGetTime( Tcl_Time *timePtr, - ClientData clientData) + ClientData dummy) { Tcl_WideInt usecSincePosixEpoch; + (void)dummy; /* * Try to use high resolution timer. @@ -694,8 +698,10 @@ void TclWinResetTimerResolution(void); static void StopCalibration( - ClientData unused) /* Client data is unused */ + ClientData dummy) /* Client data is unused */ { + (void)dummy; + SetEvent(timeInfo.exitEvent); /* @@ -972,6 +978,7 @@ CalibrationThread( { FILETIME curFileTime; DWORD waitResult; + (void)arg; /* * Get initial system time and performance counter. |