diff options
-rw-r--r-- | ChangeLog | 24 | ||||
-rw-r--r-- | generic/tclAsync.c | 4 | ||||
-rw-r--r-- | generic/tclBasic.c | 24 | ||||
-rw-r--r-- | generic/tclBinary.c | 23 | ||||
-rw-r--r-- | generic/tclCmdAH.c | 4 | ||||
-rw-r--r-- | generic/tclCmdIL.c | 52 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 50 | ||||
-rw-r--r-- | generic/tclCompile.c | 6 | ||||
-rw-r--r-- | generic/tclDate.c | 10 | ||||
-rw-r--r-- | generic/tclDictObj.c | 42 | ||||
-rw-r--r-- | generic/tclExecute.c | 20 | ||||
-rw-r--r-- | generic/tclGetDate.y | 12 | ||||
-rw-r--r-- | generic/tclIOCmd.c | 40 | ||||
-rw-r--r-- | generic/tclIOUtil.c | 3 | ||||
-rw-r--r-- | generic/tclIndexObj.c | 10 | ||||
-rw-r--r-- | generic/tclOO.c | 6 | ||||
-rw-r--r-- | generic/tclZlib.c | 6 | ||||
-rw-r--r-- | win/tclWinChan.c | 12 | ||||
-rw-r--r-- | win/tclWinConsole.c | 4 | ||||
-rw-r--r-- | win/tclWinInit.c | 15 | ||||
-rw-r--r-- | win/tclWinNotify.c | 4 |
21 files changed, 199 insertions, 172 deletions
@@ -1,11 +1,33 @@ 2009-11-18 Jan Nijtmans <nijtmans@users.sf.net> + * generic/tclAsync.c Eliminate various gcc warnings (in -Wextra mode) + * generic/tclBasic.c + * generic/tclBinary.c + * generic/tclCmdAH.c + * generic/tclCmdIL.c + * generic/tclCmdMZ.c + * generic/tclCompile.c + * generic/tclDate.c + * generic/tclExecute.c + * generic/tclDictObj.c + * generic/tclIndexObj.c + * generic/tclIOCmd.c + * generic/tclIOUtil.c + * generic/tclOO.c + * generic/tclZlib.c + * generic/tclGetDate.y + * win/tclWinInit.c + * win/tclWinChan.c + * win/tclWinConsole.c + * win/tclWinFile.c + * win/tclWinNotify.c + * win/tclWinReg.c * library/auto.tcl Eliminate "then" keyword * library/clock.tcl * library/history.tcl * library/safe.tcl * library/tm.tcl - * library/http/http.tcl Eliminate unneccessary spaces + * library/http/http.tcl Eliminate unnecessary spaces * library/http1.0/http.tcl * library/msgcat/msgcat.tcl * library/opt/optparse.tcl diff --git a/generic/tclAsync.c b/generic/tclAsync.c index 208b2fa..faf012f 100644 --- a/generic/tclAsync.c +++ b/generic/tclAsync.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAsync.c,v 1.18 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclAsync.c,v 1.19 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -262,7 +262,7 @@ Tcl_AsyncInvoke( * Failure to locate the handler in current thread private list * of async handlers will result in panic; exception: the list * is already empty (potential trouble?). - * Consequently, threads should create and delete handlers + * Consequently, threads should create and delete handlers * themselves. I.e. a handler created by one should not be * deleted by some other thread. * diff --git a/generic/tclBasic.c b/generic/tclBasic.c index cd7bd25..b0cc7f6 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.409 2009/11/16 18:00:11 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.410 2009/11/18 21:59:50 nijtmans Exp $ */ #include "tclInt.h" @@ -4075,7 +4075,7 @@ TclNREvalObjv( cmdPtrPtr = (Command **) &(TOP_CB(interp)->data[0]); TclNRSpliceDeferred(interp); - + iPtr->numLevels++; result = TclInterpReady(interp); @@ -4564,14 +4564,14 @@ TEOV_NotFound( /* * Release any resources we locked and allocated during the handler call. */ - + for (i = 0; i < handlerObjc; ++i) { Tcl_DecrRefCount(newObjv[i]); } TclStackFree(interp, newObjv); return TCL_ERROR; } - + if (lookupNsPtr) { savedNsPtr = varFramePtr->nsPtr; varFramePtr->nsPtr = lookupNsPtr; @@ -4591,9 +4591,9 @@ TEOV_NotFoundCallback( int objc = PTR2INT(data[0]); Tcl_Obj **objv = data[1]; Namespace *savedNsPtr = data[2]; - + int i; - + if (savedNsPtr) { iPtr->varFramePtr->nsPtr = savedNsPtr; } @@ -4608,7 +4608,7 @@ TEOV_NotFoundCallback( TclStackFree(interp, objv); return result; -} +} static int TEOV_RunEnterTraces( @@ -5928,7 +5928,7 @@ TclNREvalObjEx( listPtr = TclListObjCopy(interp, objPtr); Tcl_IncrRefCount(listPtr); TclDecrRefCount(objPtr); - + if (word != INT_MIN) { /* * TIP #280 Structures for tracking lines. As we know that this is @@ -8192,12 +8192,12 @@ TclNRTailcallObjCmd( Tcl_Obj *listPtr, *nsObjPtr; Tcl_Namespace *nsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; Tcl_Namespace *ns1Ptr; - + if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command ?arg ...?"); return TCL_ERROR; } - + if (!iPtr->varFramePtr->isProcCallFrame || /* is not a body ... */ (iPtr->framePtr != iPtr->varFramePtr)) { /* or is upleveled */ Tcl_SetResult(interp, @@ -8215,7 +8215,7 @@ TclNRTailcallObjCmd( Tcl_Panic("Tailcall failed to find the proper namespace"); } Tcl_IncrRefCount(nsObjPtr); - + /* * Add two callbacks: first the one to actually evaluate the tailcalled * command, then the one that signals TEBC to stash the first at its @@ -8340,7 +8340,7 @@ static int NRCoroutineExitCallback(ClientData data[], static int NRCoroutineCallerCallback(ClientData data[], Tcl_Interp *interp, int result); -static const CorContext NULL_CONTEXT = {NULL, NULL, NULL}; +static const CorContext NULL_CONTEXT = {NULL, NULL, NULL, NULL}; #define SAVE_CONTEXT(context) \ (context).framePtr = iPtr->framePtr; \ diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 8a3aeac..c360c8f 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.55 2009/07/16 21:24:39 dgp Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.56 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -472,6 +472,7 @@ FreeByteArrayInternalRep( Tcl_Obj *objPtr) /* Object with internal rep to free. */ { ckfree((char *) GET_BYTEARRAY(objPtr)); + objPtr->typePtr = NULL; } /* @@ -595,23 +596,23 @@ TclInitBinaryCmd( Tcl_Interp *interp) { const EnsembleImplMap binaryMap[] = { - { "format", BinaryFormatCmd, NULL }, - { "scan", BinaryScanCmd, NULL }, - { "encode", NULL, NULL }, - { "decode", NULL, NULL }, - { NULL, NULL, NULL } + { "format", BinaryFormatCmd, NULL, NULL ,NULL }, + { "scan", BinaryScanCmd, NULL,NULL ,NULL }, + { "encode", NULL, NULL, NULL, NULL }, + { "decode", NULL, NULL, NULL, NULL }, + { NULL, NULL, NULL, NULL, NULL } }; const EnsembleImplMap encodeMap[] = { { "hex", BinaryEncodeHex, NULL, NULL, (ClientData)HexDigits }, { "uuencode", BinaryEncode64, NULL, NULL, (ClientData)UueDigits }, { "base64", BinaryEncode64, NULL, NULL, (ClientData)B64Digits }, - { NULL, NULL, NULL } + { NULL, NULL, NULL, NULL, NULL } }; const EnsembleImplMap decodeMap[] = { - { "hex", BinaryDecodeHex, NULL }, - { "uuencode", BinaryDecodeUu, NULL }, - { "base64", BinaryDecode64, NULL }, - { NULL, NULL, NULL } + { "hex", BinaryDecodeHex, NULL, NULL, NULL }, + { "uuencode", BinaryDecodeUu, NULL, NULL, NULL }, + { "base64", BinaryDecode64, NULL, NULL, NULL }, + { NULL, NULL, NULL, NULL, NULL } }; Tcl_Command binaryEnsemble; diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 9a0c677..95e6fd8 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.121 2009/08/19 14:32:12 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.122 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -322,7 +322,7 @@ CatchObjCmdCallback( result = TCL_ERROR; Tcl_SetResult(interp,"Tailcall called from within a catch environment", TCL_STATIC); - } + } /* diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 39afc83..e84703b 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.173 2009/11/16 18:00:11 dgp Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.174 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -157,30 +157,30 @@ static Tcl_Obj * SelectObjFromSublist(Tcl_Obj *firstPtr, */ static const EnsembleImplMap defaultInfoMap[] = { - {"args", InfoArgsCmd, NULL}, - {"body", InfoBodyCmd, NULL}, - {"cmdcount", InfoCmdCountCmd, NULL}, - {"commands", InfoCommandsCmd, NULL}, - {"complete", InfoCompleteCmd, NULL}, - {"coroutine", TclInfoCoroutineCmd, NULL}, - {"default", InfoDefaultCmd, NULL}, - {"exists", TclInfoExistsCmd, TclCompileInfoExistsCmd}, - {"frame", InfoFrameCmd, NULL}, - {"functions", InfoFunctionsCmd, NULL}, - {"globals", TclInfoGlobalsCmd, NULL}, - {"hostname", InfoHostnameCmd, NULL}, - {"level", InfoLevelCmd, NULL}, - {"library", InfoLibraryCmd, NULL}, - {"loaded", InfoLoadedCmd, NULL}, - {"locals", TclInfoLocalsCmd, NULL}, - {"nameofexecutable", InfoNameOfExecutableCmd, NULL}, - {"patchlevel", InfoPatchLevelCmd, NULL}, - {"procs", InfoProcsCmd, NULL}, - {"script", InfoScriptCmd, NULL}, - {"sharedlibextension", InfoSharedlibCmd, NULL}, - {"tclversion", InfoTclVersionCmd, NULL}, - {"vars", TclInfoVarsCmd, NULL}, - {NULL, NULL, NULL} + {"args", InfoArgsCmd, NULL, NULL, NULL}, + {"body", InfoBodyCmd, NULL, NULL, NULL}, + {"cmdcount", InfoCmdCountCmd, NULL, NULL, NULL}, + {"commands", InfoCommandsCmd, NULL, NULL, NULL}, + {"complete", InfoCompleteCmd, NULL, NULL, NULL}, + {"coroutine", TclInfoCoroutineCmd, NULL, NULL, NULL}, + {"default", InfoDefaultCmd, NULL, NULL, NULL}, + {"exists", TclInfoExistsCmd, TclCompileInfoExistsCmd, NULL, NULL}, + {"frame", InfoFrameCmd, NULL, NULL, NULL}, + {"functions", InfoFunctionsCmd, NULL, NULL, NULL}, + {"globals", TclInfoGlobalsCmd, NULL, NULL, NULL}, + {"hostname", InfoHostnameCmd, NULL, NULL, NULL}, + {"level", InfoLevelCmd, NULL, NULL, NULL}, + {"library", InfoLibraryCmd, NULL, NULL, NULL}, + {"loaded", InfoLoadedCmd, NULL, NULL, NULL}, + {"locals", TclInfoLocalsCmd, NULL, NULL, NULL}, + {"nameofexecutable", InfoNameOfExecutableCmd, NULL, NULL, NULL}, + {"patchlevel", InfoPatchLevelCmd, NULL, NULL, NULL}, + {"procs", InfoProcsCmd, NULL, NULL, NULL}, + {"script", InfoScriptCmd, NULL, NULL, NULL}, + {"sharedlibextension", InfoSharedlibCmd, NULL, NULL, NULL}, + {"tclversion", InfoTclVersionCmd, NULL, NULL, NULL}, + {"vars", TclInfoVarsCmd, NULL, NULL, NULL}, + {NULL, NULL, NULL, NULL, NULL} }; /* @@ -430,7 +430,7 @@ Tcl_IncrObjCmd( * documentation for details on what it does. * * Results: - * FIXME + * Handle for the info command, or NULL on failure. * * Side effects: * none diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 9aed082..427bf68 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.195 2009/09/28 18:02:20 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.196 2009/11/18 21:59:50 nijtmans Exp $ */ #include "tclInt.h" @@ -3326,29 +3326,29 @@ TclInitStringCmd( Tcl_Interp *interp) /* Current interpreter. */ { static const EnsembleImplMap stringImplMap[] = { - {"bytelength", StringBytesCmd, NULL}, - {"compare", StringCmpCmd, TclCompileStringCmpCmd}, - {"equal", StringEqualCmd, TclCompileStringEqualCmd}, - {"first", StringFirstCmd, NULL}, - {"index", StringIndexCmd, TclCompileStringIndexCmd}, - {"is", StringIsCmd, NULL}, - {"last", StringLastCmd, NULL}, - {"length", StringLenCmd, TclCompileStringLenCmd}, - {"map", StringMapCmd, NULL}, - {"match", StringMatchCmd, TclCompileStringMatchCmd}, - {"range", StringRangeCmd, NULL}, - {"repeat", StringReptCmd, NULL}, - {"replace", StringRplcCmd, NULL}, - {"reverse", StringRevCmd, NULL}, - {"tolower", StringLowerCmd, NULL}, - {"toupper", StringUpperCmd, NULL}, - {"totitle", StringTitleCmd, NULL}, - {"trim", StringTrimCmd, NULL}, - {"trimleft", StringTrimLCmd, NULL}, - {"trimright", StringTrimRCmd, NULL}, - {"wordend", StringEndCmd, NULL}, - {"wordstart", StringStartCmd, NULL}, - {NULL} + {"bytelength", StringBytesCmd, NULL, NULL, NULL}, + {"compare", StringCmpCmd, TclCompileStringCmpCmd, NULL, NULL}, + {"equal", StringEqualCmd, TclCompileStringEqualCmd, NULL, NULL}, + {"first", StringFirstCmd, NULL, NULL, NULL}, + {"index", StringIndexCmd, TclCompileStringIndexCmd, NULL, NULL}, + {"is", StringIsCmd, NULL, NULL, NULL}, + {"last", StringLastCmd, NULL, NULL, NULL}, + {"length", StringLenCmd, TclCompileStringLenCmd, NULL, NULL}, + {"map", StringMapCmd, NULL, NULL, NULL}, + {"match", StringMatchCmd, TclCompileStringMatchCmd, NULL, NULL}, + {"range", StringRangeCmd, NULL, NULL, NULL}, + {"repeat", StringReptCmd, NULL, NULL, NULL}, + {"replace", StringRplcCmd, NULL, NULL, NULL}, + {"reverse", StringRevCmd, NULL, NULL, NULL}, + {"tolower", StringLowerCmd, NULL, NULL, NULL}, + {"toupper", StringUpperCmd, NULL, NULL, NULL}, + {"totitle", StringTitleCmd, NULL, NULL, NULL}, + {"trim", StringTrimCmd, NULL, NULL, NULL}, + {"trimleft", StringTrimLCmd, NULL, NULL, NULL}, + {"trimright", StringTrimRCmd, NULL, NULL, NULL}, + {"wordend", StringEndCmd, NULL, NULL, NULL}, + {"wordstart", StringStartCmd, NULL, NULL, NULL}, + {NULL, NULL, NULL, NULL, NULL} }; return TclMakeEnsemble(interp, "string", stringImplMap); @@ -3469,7 +3469,7 @@ Tcl_SwitchObjCmd( { return Tcl_NRCallObjProc(interp, TclNRSwitchObjCmd, dummy, objc, objv); } -int +int TclNRSwitchObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ diff --git a/generic/tclCompile.c b/generic/tclCompile.c index ed4e8f0..57e3a9d 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.178 2009/09/24 17:19:18 dgp Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.179 2009/11/18 21:59:50 nijtmans Exp $ */ #include "tclInt.h" @@ -406,7 +406,7 @@ InstructionDesc const tclInstructionTable[] = { * ERROR: +1; RETURN: +3; BREAK: +5; CONTINUE: +7; * Other non-OK: +9 */ - {0} + {NULL, 0, 0, 0, {OPERAND_NONE}} }; /* @@ -1475,7 +1475,7 @@ TclCompileScript( /* * TIP #280: We have to count newlines before the command even * in the degenerate case when the command has no words. (See - * test info-30.33). So make that counting here, and not in + * test info-30.33). So make that counting here, and not in * the (numWords > 0) branch below. */ TclAdvanceLines(&cmdLine, p, parsePtr->commandStart); diff --git a/generic/tclDate.c b/generic/tclDate.c index 7f67156..5d4a507 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2325,7 +2325,7 @@ static TABLE MonthDayTable[] = { { "thurs", tDAY, 4 }, { "friday", tDAY, 5 }, { "saturday", tDAY, 6 }, - { NULL } + { NULL, 0, 0 } }; /* @@ -2343,7 +2343,7 @@ static TABLE UnitsTable[] = { { "min", tSEC_UNIT, 60 }, { "second", tSEC_UNIT, 1 }, { "sec", tSEC_UNIT, 1 }, - { NULL } + { NULL, 0, 0 } }; /* @@ -2375,7 +2375,7 @@ static TABLE OtherTable[] = { { "ago", tAGO, 1 }, { "epoch", tEPOCH, 0 }, { "stardate", tSTARDATE, 0 }, - { NULL } + { NULL, 0, 0 } }; /* @@ -2461,7 +2461,7 @@ static TABLE TimezoneTable[] = { /* ADDED BY Marco Nijdam */ { "dst", tDST, HOUR( 0) }, /* DST on (hour is ignored) */ /* End ADDED */ - { NULL } + { NULL, 0, 0 } }; /* @@ -2494,7 +2494,7 @@ static TABLE MilitaryTable[] = { { "x", tZONE, HOUR( 11) }, { "y", tZONE, HOUR( 12) }, { "z", tZONE, HOUR( 0) }, - { NULL } + { NULL, 0, 0 } }; /* diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 32a5cb0..dab4418 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.79 2009/10/08 14:37:36 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.80 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -87,26 +87,26 @@ static int DictForLoopCallback(ClientData data[], */ static const EnsembleImplMap implementationMap[] = { - {"append", DictAppendCmd, TclCompileDictAppendCmd }, - {"create", DictCreateCmd }, - {"exists", DictExistsCmd }, - {"filter", DictFilterCmd }, - {"for", NULL, TclCompileDictForCmd, DictForNRCmd }, - {"get", DictGetCmd, TclCompileDictGetCmd }, - {"incr", DictIncrCmd, TclCompileDictIncrCmd }, - {"info", DictInfoCmd }, - {"keys", DictKeysCmd }, - {"lappend", DictLappendCmd, TclCompileDictLappendCmd }, - {"merge", DictMergeCmd }, - {"remove", DictRemoveCmd }, - {"replace", DictReplaceCmd }, - {"set", DictSetCmd, TclCompileDictSetCmd }, - {"size", DictSizeCmd }, - {"unset", DictUnsetCmd }, - {"update", DictUpdateCmd, TclCompileDictUpdateCmd }, - {"values", DictValuesCmd }, - {"with", DictWithCmd }, - {NULL} + {"append", DictAppendCmd, TclCompileDictAppendCmd, NULL, NULL }, + {"create", DictCreateCmd, NULL, NULL, NULL }, + {"exists", DictExistsCmd, NULL, NULL, NULL }, + {"filter", DictFilterCmd, NULL, NULL, NULL }, + {"for", NULL, TclCompileDictForCmd, DictForNRCmd, NULL }, + {"get", DictGetCmd, TclCompileDictGetCmd, NULL, NULL }, + {"incr", DictIncrCmd, TclCompileDictIncrCmd, NULL, NULL }, + {"info", DictInfoCmd, NULL, NULL, NULL }, + {"keys", DictKeysCmd, NULL, NULL, NULL }, + {"lappend", DictLappendCmd, TclCompileDictLappendCmd, NULL, NULL }, + {"merge", DictMergeCmd, NULL, NULL, NULL }, + {"remove", DictRemoveCmd, NULL, NULL, NULL }, + {"replace", DictReplaceCmd, NULL, NULL, NULL }, + {"set", DictSetCmd, TclCompileDictSetCmd, NULL, NULL }, + {"size", DictSizeCmd, NULL, NULL, NULL }, + {"unset", DictUnsetCmd, NULL, NULL, NULL }, + {"update", DictUpdateCmd, TclCompileDictUpdateCmd, NULL, NULL }, + {"values", DictValuesCmd, NULL, NULL, NULL }, + {"with", DictWithCmd, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL} }; /* diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 587dd3e..404696c 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.447 2009/09/30 03:11:25 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.448 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -160,7 +160,7 @@ static BuiltinFunc const tclBuiltinFuncTable[] = { {"round", 1}, {"srand", 1}, {"wide", 1}, - {0}, + {NULL, 0}, }; #define LAST_BUILTIN_FUNC 25 @@ -774,7 +774,7 @@ TclCreateExecEnv( Tcl_Interp *interp, /* Interpreter for which the execution * environment is being created. */ int size) /* the initial stack size, in number of words - * [sizeof(Tcl_Obj*)] */ + * [sizeof(Tcl_Obj*)] */ { ExecEnv *eePtr = (ExecEnv *) ckalloc(sizeof(ExecEnv)); ExecStack *esPtr = (ExecStack *) ckalloc(sizeof(ExecStack) @@ -1622,7 +1622,7 @@ TclCompileObj( int redo = 0; if (invoker) { - CmdFrame *ctxPtr = (CmdFrame *) + CmdFrame *ctxPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); *ctxPtr = *invoker; @@ -1653,7 +1653,7 @@ TclCompileObj( * test info-32.0 using literal of info-24.8 * (dict with ... vs set body ...). */ - redo = + redo = ((eclPtr->type == TCL_LOCATION_SOURCE) && (eclPtr->start != ctxPtr->line[word])) || ((eclPtr->type == TCL_LOCATION_BC) && @@ -2132,7 +2132,7 @@ TclExecuteByteCode( } goto abnormalReturn; } - + if (iPtr->execEnvPtr->rewind) { result = TCL_ERROR; goto abnormalReturn; @@ -2555,7 +2555,7 @@ TclExecuteByteCode( */ if (onlyb) { - for (currPtr = &OBJ_AT_DEPTH(opnd-2); + for (currPtr = &OBJ_AT_DEPTH(opnd-2); appendLen >= 0 && currPtr <= &OBJ_AT_TOS; currPtr++) { if ((*currPtr)->bytes != tclEmptyStringRep) { Tcl_GetByteArrayFromObj(*currPtr, &length); @@ -7935,16 +7935,16 @@ TclExecuteByteCode( /* * Winding down: insure that all pending cleanups are done before - * dropping out of this bytecode. + * dropping out of this bytecode. */ if (TOP_CB(interp) != bottomPtr->rootPtr) { result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); - + if (TOP_CB(interp) != bottomPtr->rootPtr) { Tcl_Panic("Abnormal return with busy callback stack"); } } - + /* * Clear all expansions and same-level NR calls. * diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 8014b73..922b931 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclGetDate.y,v 1.42 2009/07/22 12:00:42 nijtmans Exp $ + * RCS: @(#) $Id: tclGetDate.y,v 1.43 2009/11/18 21:59:50 nijtmans Exp $ */ %parse-param {DateInfo* info} @@ -537,7 +537,7 @@ static TABLE MonthDayTable[] = { { "thurs", tDAY, 4 }, { "friday", tDAY, 5 }, { "saturday", tDAY, 6 }, - { NULL } + { NULL, 0, 0 } }; /* @@ -555,7 +555,7 @@ static TABLE UnitsTable[] = { { "min", tSEC_UNIT, 60 }, { "second", tSEC_UNIT, 1 }, { "sec", tSEC_UNIT, 1 }, - { NULL } + { NULL, 0, 0 } }; /* @@ -587,7 +587,7 @@ static TABLE OtherTable[] = { { "ago", tAGO, 1 }, { "epoch", tEPOCH, 0 }, { "stardate", tSTARDATE, 0 }, - { NULL } + { NULL, 0, 0 } }; /* @@ -673,7 +673,7 @@ static TABLE TimezoneTable[] = { /* ADDED BY Marco Nijdam */ { "dst", tDST, HOUR( 0) }, /* DST on (hour is ignored) */ /* End ADDED */ - { NULL } + { NULL, 0, 0 } }; /* @@ -706,7 +706,7 @@ static TABLE MilitaryTable[] = { { "x", tZONE, HOUR( 11) }, { "y", tZONE, HOUR( 12) }, { "z", tZONE, HOUR( 0) }, - { NULL } + { NULL, 0, 0 } }; /* diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 13a6853..36ac04b 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.64 2009/04/27 09:41:49 nijtmans Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.65 2009/11/18 21:59:50 nijtmans Exp $ */ #include "tclInt.h" @@ -1922,25 +1922,25 @@ TclInitChanCmd( * function at the moment. */ static const EnsembleImplMap initMap[] = { - {"blocked", Tcl_FblockedObjCmd}, - {"close", Tcl_CloseObjCmd}, - {"copy", Tcl_FcopyObjCmd}, - {"create", TclChanCreateObjCmd}, /* TIP #219 */ - {"eof", Tcl_EofObjCmd}, - {"event", Tcl_FileEventObjCmd}, - {"flush", Tcl_FlushObjCmd}, - {"gets", Tcl_GetsObjCmd}, - {"pending", ChanPendingObjCmd}, /* TIP #287 */ - {"pop", TclChanPopObjCmd}, /* TIP #230 */ - {"postevent", TclChanPostEventObjCmd}, /* TIP #219 */ - {"push", TclChanPushObjCmd}, /* TIP #230 */ - {"puts", Tcl_PutsObjCmd}, - {"read", Tcl_ReadObjCmd}, - {"seek", Tcl_SeekObjCmd}, - {"pipe", ChanPipeObjCmd}, /* TIP #304 */ - {"tell", Tcl_TellObjCmd}, - {"truncate", ChanTruncateObjCmd}, /* TIP #208 */ - {NULL} + {"blocked", Tcl_FblockedObjCmd, NULL, NULL, NULL}, + {"close", Tcl_CloseObjCmd, NULL, NULL, NULL}, + {"copy", Tcl_FcopyObjCmd, NULL, NULL, NULL}, + {"create", TclChanCreateObjCmd, NULL, NULL, NULL}, /* TIP #219 */ + {"eof", Tcl_EofObjCmd, NULL, NULL, NULL}, + {"event", Tcl_FileEventObjCmd, NULL, NULL, NULL}, + {"flush", Tcl_FlushObjCmd, NULL, NULL, NULL}, + {"gets", Tcl_GetsObjCmd, NULL, NULL, NULL}, + {"pending", ChanPendingObjCmd, NULL, NULL, NULL}, /* TIP #287 */ + {"pop", TclChanPopObjCmd, NULL, NULL, NULL}, /* TIP #230 */ + {"postevent", TclChanPostEventObjCmd, NULL, NULL, NULL}, /* TIP #219 */ + {"push", TclChanPushObjCmd, NULL, NULL, NULL}, /* TIP #230 */ + {"puts", Tcl_PutsObjCmd, NULL, NULL, NULL}, + {"read", Tcl_ReadObjCmd, NULL, NULL, NULL}, + {"seek", Tcl_SeekObjCmd, NULL, NULL, NULL}, + {"pipe", ChanPipeObjCmd, NULL, NULL, NULL}, /* TIP #304 */ + {"tell", Tcl_TellObjCmd, NULL, NULL, NULL}, + {"truncate", ChanTruncateObjCmd, NULL, NULL, NULL}, /* TIP #208 */ + {NULL, NULL, NULL, NULL, NULL} }; static const char *const extras[] = { "configure", "::fconfigure", diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index f77e737..79769c9 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.164 2009/07/16 21:24:39 dgp Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.165 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -160,6 +160,7 @@ static FilesystemRecord nativeFilesystemRecord = { NULL, &tclNativeFilesystem, 1, + NULL, NULL }; diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 7125891..67c420f 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.52 2009/09/30 03:11:26 dgp Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.53 2009/11/18 21:59:50 nijtmans Exp $ */ #include "tclInt.h" @@ -524,10 +524,10 @@ TclInitPrefixCmd( Tcl_Interp *interp) /* Current interpreter. */ { static const EnsembleImplMap prefixImplMap[] = { - {"all", PrefixAllObjCmd}, - {"longest", PrefixLongestObjCmd}, - {"match", PrefixMatchObjCmd}, - {NULL} + {"all", PrefixAllObjCmd, NULL, NULL, NULL}, + {"longest", PrefixLongestObjCmd, NULL, NULL, NULL}, + {"match", PrefixMatchObjCmd, NULL, NULL, NULL}, + {NULL, NULL, NULL, NULL, NULL} }; Tcl_Command prefixCmd; diff --git a/generic/tclOO.c b/generic/tclOO.c index 4233020..a4e8cce 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.24 2009/07/19 11:46:53 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.25 2009/11/18 21:59:51 nijtmans Exp $ */ #ifdef HAVE_CONFIG_H @@ -121,12 +121,12 @@ static const DeclaredClassMethod objMethods[] = { DCM("unknown", 0, TclOO_Object_Unknown), DCM("variable", 0, TclOO_Object_LinkVar), DCM("varname", 0, TclOO_Object_VarName), - {NULL} + {NULL, 0, {0, NULL, NULL, NULL, NULL}} }, clsMethods[] = { DCM("create", 1, TclOO_Class_Create), DCM("new", 1, TclOO_Class_New), DCM("createWithNamespace", 0, TclOO_Class_CreateNs), - {NULL} + {NULL, 0, {0, NULL, NULL, NULL, NULL}} }; static char initScript[] = diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 7f5ff7b..2ae12c0 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.31 2009/10/29 08:08:33 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.32 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -189,7 +189,9 @@ static const Tcl_ChannelType zlibChannelType = { ZlibTransformBlockMode, NULL, /* flushProc */ ZlibTransformHandler, - NULL /* wideSeekProc */ + NULL, /* wideSeekProc */ + NULL, + NULL }; /* diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 6079887..0511ca2 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinChan.c,v 1.53 2008/10/26 18:43:26 dkf Exp $ + * RCS: @(#) $Id: tclWinChan.c,v 1.54 2009/11/18 21:59:49 nijtmans Exp $ */ #include "tclWinInt.h" @@ -491,7 +491,7 @@ FileSeekProc( oldPosHigh = 0; oldPos = SetFilePointer(infoPtr->handle, 0, &oldPosHigh, FILE_CURRENT); - if (oldPos == INVALID_SET_FILE_POINTER) { + if (oldPos == (LONG)INVALID_SET_FILE_POINTER) { DWORD winError = GetLastError(); if (winError != NO_ERROR) { @@ -503,7 +503,7 @@ FileSeekProc( newPosHigh = (offset < 0 ? -1 : 0); newPos = SetFilePointer(infoPtr->handle, offset, &newPosHigh, moveMethod); - if (newPos == INVALID_SET_FILE_POINTER) { + if (newPos == (LONG)INVALID_SET_FILE_POINTER) { DWORD winError = GetLastError(); if (winError != NO_ERROR) { @@ -566,7 +566,7 @@ FileWideSeekProc( newPosHigh = Tcl_WideAsLong(offset >> 32); newPos = SetFilePointer(infoPtr->handle, Tcl_WideAsLong(offset), &newPosHigh, moveMethod); - if (newPos == INVALID_SET_FILE_POINTER) { + if (newPos == (LONG)INVALID_SET_FILE_POINTER) { DWORD winError = GetLastError(); if (winError != NO_ERROR) { @@ -608,7 +608,7 @@ FileTruncateProc( oldPosHigh = 0; oldPos = SetFilePointer(infoPtr->handle, 0, &oldPosHigh, FILE_CURRENT); - if (oldPos == INVALID_SET_FILE_POINTER) { + if (oldPos == (LONG)INVALID_SET_FILE_POINTER) { DWORD winError = GetLastError(); if (winError != NO_ERROR) { TclWinConvertError(winError); @@ -623,7 +623,7 @@ FileTruncateProc( newPosHigh = Tcl_WideAsLong(length >> 32); newPos = SetFilePointer(infoPtr->handle, Tcl_WideAsLong(length), &newPosHigh, FILE_BEGIN); - if (newPos == INVALID_SET_FILE_POINTER) { + if (newPos == (LONG)INVALID_SET_FILE_POINTER) { DWORD winError = GetLastError(); if (winError != NO_ERROR) { TclWinConvertError(winError); diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index d88b285..880841a 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinConsole.c,v 1.20 2008/04/27 22:21:36 dkf Exp $ + * RCS: @(#) $Id: tclWinConsole.c,v 1.21 2009/11/18 21:59:49 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1187,7 +1187,7 @@ ConsoleReaderThread( DWORD err; err = GetLastError(); - if (err == EOF) { + if (err == (DWORD)EOF) { infoPtr->readFlags = CONSOLE_EOF; } } diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 8043971..7e33234 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInit.c,v 1.83 2009/08/02 10:41:09 nijtmans Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.84 2009/11/18 21:59:50 nijtmans Exp $ */ #include "tclWinInt.h" @@ -472,8 +472,10 @@ TclpSetVariables( { const char *ptr; char buffer[TCL_INTEGER_SPACE * 2]; - SYSTEM_INFO sysInfo, *sysInfoPtr = &sysInfo; - OemId *oemId; + union { + SYSTEM_INFO info; + OemId oemId; + } sys; OSVERSIONINFOA osInfo; Tcl_DString ds; WCHAR szUserName[UNLEN+1]; @@ -485,8 +487,7 @@ TclpSetVariables( osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA); GetVersionExA(&osInfo); - oemId = (OemId *) sysInfoPtr; - GetSystemInfo(&sysInfo); + GetSystemInfo(&sys.info); /* * Define the tcl_platform array. @@ -500,9 +501,9 @@ TclpSetVariables( } wsprintfA(buffer, "%d.%d", osInfo.dwMajorVersion, osInfo.dwMinorVersion); Tcl_SetVar2(interp, "tcl_platform", "osVersion", buffer, TCL_GLOBAL_ONLY); - if (oemId->wProcessorArchitecture < NUMPROCESSORS) { + if (sys.oemId.wProcessorArchitecture < NUMPROCESSORS) { Tcl_SetVar2(interp, "tcl_platform", "machine", - processors[oemId->wProcessorArchitecture], + processors[sys.oemId.wProcessorArchitecture], TCL_GLOBAL_ONLY); } diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c index 47ad88f..9e0db15 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinNotify.c,v 1.25 2008/10/26 18:43:27 dkf Exp $ + * RCS: @(#) $Id: tclWinNotify.c,v 1.26 2009/11/18 21:59:49 nijtmans Exp $ */ #include "tclInt.h" @@ -507,7 +507,7 @@ Tcl_WaitForEvent( PostQuitMessage((int) msg.wParam); status = -1; - } else if (result == -1) { + } else if (result == (DWORD)-1) { /* * We got an error from the system. I have no idea why this * would happen, so we'll just unwind. |