diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-05-29 19:14:34 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-05-29 19:14:34 (GMT) |
commit | 4675e3f16b23202f92aed5a60aafe5c334d5f844 (patch) | |
tree | f570a294301b0af2f6801ee007dfe15b65527edb /generic | |
parent | 01ba0865d8ceaa19c915e6c65d14928d67e0e32d (diff) | |
download | tcl-4675e3f16b23202f92aed5a60aafe5c334d5f844.zip tcl-4675e3f16b23202f92aed5a60aafe5c334d5f844.tar.gz tcl-4675e3f16b23202f92aed5a60aafe5c334d5f844.tar.bz2 |
Another round of sentinel fixes for 8.6, NULL -> (char *)NULL
Diffstat (limited to 'generic')
35 files changed, 217 insertions, 217 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 8971334..cbcb4a1 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -2437,7 +2437,7 @@ BinaryDecodeHex( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid hexadecimal digit \"%c\" at position %d", ch, (int) (data - datastart - 1))); - Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "INVALID", NULL); + Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "INVALID", (char *)NULL); return TCL_ERROR; } diff --git a/generic/tclClock.c b/generic/tclClock.c index 071f533..5d39de4 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -1064,7 +1064,7 @@ ConvertUTCToLocalUsingC( if ((Tcl_WideInt)tock != fields->seconds) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "number too large to represent as a Posix time", -1)); - Tcl_SetErrorCode(interp, "CLOCK", "argTooLarge", NULL); + Tcl_SetErrorCode(interp, "CLOCK", "argTooLarge", (char *)NULL); return TCL_ERROR; } TzsetIfNecessary(); @@ -1073,7 +1073,7 @@ ConvertUTCToLocalUsingC( Tcl_SetObjResult(interp, Tcl_NewStringObj( "localtime failed (clock value may be too " "large/small to represent)", -1)); - Tcl_SetErrorCode(interp, "CLOCK", "localtimeFailed", NULL); + Tcl_SetErrorCode(interp, "CLOCK", "localtimeFailed", (char *)NULL); return TCL_ERROR; } @@ -1925,7 +1925,7 @@ ClockParseformatargsObjCmd( Tcl_WrongNumArgs(interp, 0, objv, "clock format clockval ?-format string? " "?-gmt boolean? ?-locale LOCALE? ?-timezone ZONE?"); - Tcl_SetErrorCode(interp, "CLOCK", "wrongNumArgs", NULL); + Tcl_SetErrorCode(interp, "CLOCK", "wrongNumArgs", (char *)NULL); return TCL_ERROR; } @@ -1972,7 +1972,7 @@ ClockParseformatargsObjCmd( if ((saw & (1 << CLOCK_FORMAT_GMT)) && (saw & (1 << CLOCK_FORMAT_TIMEZONE))) { Tcl_SetObjResult(interp, litPtr[LIT_CANNOT_USE_GMT_AND_TIMEZONE]); - Tcl_SetErrorCode(interp, "CLOCK", "gmtWithTimezone", NULL); + Tcl_SetErrorCode(interp, "CLOCK", "gmtWithTimezone", (char *)NULL); return TCL_ERROR; } if (gmtFlag) { diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index a26254c..adbe9a6 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -2063,7 +2063,7 @@ PathFilesystemCmd( if (fsInfo == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("unrecognised path", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "FILESYSTEM", - TclGetString(objv[1]), NULL); + TclGetString(objv[1]), (char *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, fsInfo); @@ -2213,7 +2213,7 @@ PathSplitCmd( "could not read \"%s\": no such file or directory", TclGetString(objv[1]))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PATHSPLIT", "NONESUCH", - NULL); + (char *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, res); @@ -2315,7 +2315,7 @@ FilesystemSeparatorCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "unrecognised path", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "FILESYSTEM", - TclGetString(objv[1]), NULL); + TclGetString(objv[1]), (char *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, separatorObj); @@ -2681,7 +2681,7 @@ TclNRForIterCallback( Tcl_ResetResult(interp); TclNewObj(boolObj); TclNRAddCallback(interp, ForCondCallback, iterPtr, boolObj, NULL, - NULL); + (char *)NULL); return Tcl_NRExprObj(interp, iterPtr->cond, boolObj); case TCL_BREAK: result = TCL_OK; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index a6e9ffd..cfccd5e 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -1863,7 +1863,7 @@ StringMapCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad option \"%s\": must be -nocase", string)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", "option", - string, NULL); + string, (char *)NULL); return TCL_ERROR; } } diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 989ca79..313c51f 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -1439,7 +1439,7 @@ ParseExpr( parsePtr->string, (numBytes < limit) ? "" : "...")); if (errCode) { Tcl_SetErrorCode(interp, "TCL", "PARSE", "EXPR", errCode, - subErrCode, NULL); + subErrCode, (char *)NULL); } } diff --git a/generic/tclConfig.c b/generic/tclConfig.c index 8fe8fc9..f00a568 100644 --- a/generic/tclConfig.c +++ b/generic/tclConfig.c @@ -230,7 +230,7 @@ QueryConfigObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj("package not known", -1)); Tcl_SetErrorCode(interp, "TCL", "FATAL", "PKGCFG_BASE", - Tcl_GetString(pkgName), NULL); + Tcl_GetString(pkgName), (char *)NULL); return TCL_ERROR; } @@ -245,7 +245,7 @@ QueryConfigObjCmd( || val == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("key not known", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CONFIG", - Tcl_GetString(objv[2]), NULL); + Tcl_GetString(objv[2]), (char *)NULL); return TCL_ERROR; } @@ -278,7 +278,7 @@ QueryConfigObjCmd( if (!listPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "insufficient memory to create list", -1)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (char *)NULL); return TCL_ERROR; } diff --git a/generic/tclDate.c b/generic/tclDate.c index d3b6947..7e2aded 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2792,12 +2792,12 @@ TclClockOldscanObjCmd( if (status == 1) { Tcl_SetObjResult(interp, dateInfo.messages); Tcl_DecrRefCount(dateInfo.messages); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "PARSE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "PARSE", (char *)NULL); return TCL_ERROR; } else if (status == 2) { Tcl_SetObjResult(interp, Tcl_NewStringObj("memory exhausted", -1)); Tcl_DecrRefCount(dateInfo.messages); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (char *)NULL); return TCL_ERROR; } else if (status != 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj("Unknown status returned " @@ -2805,7 +2805,7 @@ TclClockOldscanObjCmd( "report this error as a " "bug in Tcl.", -1)); Tcl_DecrRefCount(dateInfo.messages); - Tcl_SetErrorCode(interp, "TCL", "BUG", NULL); + Tcl_SetErrorCode(interp, "TCL", "BUG", (char *)NULL); return TCL_ERROR; } Tcl_DecrRefCount(dateInfo.messages); @@ -2813,31 +2813,31 @@ TclClockOldscanObjCmd( if (yyHaveDate > 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj("more than one date in string", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", (char *)NULL); return TCL_ERROR; } if (yyHaveTime > 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj("more than one time of day in string", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", (char *)NULL); return TCL_ERROR; } if (yyHaveZone > 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj("more than one time zone in string", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", (char *)NULL); return TCL_ERROR; } if (yyHaveDay > 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj("more than one weekday in string", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", (char *)NULL); return TCL_ERROR; } if (yyHaveOrdinalMonth > 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj("more than one ordinal month in string", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", (char *)NULL); return TCL_ERROR; } diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 3cd9f43..d67de7c 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -720,7 +720,7 @@ SetDictFromAny( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "missing value to go with key", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DICTIONARY", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DICTIONARY", (char *)NULL); } errorInFindDictElement: DeleteChainTable(dict); @@ -796,7 +796,7 @@ TclTraceDictPath( "key \"%s\" not known in dictionary", TclGetString(keyv[i]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "DICT", - TclGetString(keyv[i]), NULL); + TclGetString(keyv[i]), (char *)NULL); } return NULL; } @@ -1725,7 +1725,7 @@ DictGetCmd( "key \"%s\" not known in dictionary", TclGetString(objv[objc-1]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "DICT", - TclGetString(objv[objc-1]), NULL); + TclGetString(objv[objc-1]), (char *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, valuePtr); @@ -2517,7 +2517,7 @@ DictForNRCmd( if (varc != 2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "must have exactly two variable names", -1)); - Tcl_SetErrorCode(interp, "TCL", "SYNTAX", "dict", "for", NULL); + Tcl_SetErrorCode(interp, "TCL", "SYNTAX", "dict", "for", (char *)NULL); return TCL_ERROR; } searchPtr = (Tcl_DictSearch *)TclStackAlloc(interp, sizeof(Tcl_DictSearch)); @@ -2712,7 +2712,7 @@ DictMapNRCmd( if (varc != 2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "must have exactly two variable names", -1)); - Tcl_SetErrorCode(interp, "TCL", "SYNTAX", "dict", "map", NULL); + Tcl_SetErrorCode(interp, "TCL", "SYNTAX", "dict", "map", (char *)NULL); return TCL_ERROR; } storagePtr = (DictMapStorage *)TclStackAlloc(interp, sizeof(DictMapStorage)); @@ -3151,7 +3151,7 @@ DictFilterCmd( if (varc != 2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "must have exactly two variable names", -1)); - Tcl_SetErrorCode(interp, "TCL", "SYNTAX", "dict", "filter", NULL); + Tcl_SetErrorCode(interp, "TCL", "SYNTAX", "dict", "filter", (char *)NULL); return TCL_ERROR; } keyVarObj = varv[0]; diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index bbcaeb9..e1f2536 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -1575,7 +1575,7 @@ OpenEncodingFileChannel( if ((NULL == chan) && (interp != NULL)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown encoding \"%s\"", name)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ENCODING", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ENCODING", name, (char *)NULL); } Tcl_DecrRefCount(fileNameObj); Tcl_DecrRefCount(searchPath); @@ -1649,7 +1649,7 @@ LoadEncodingFile( if ((encoding == NULL) && (interp != NULL)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid encoding file \"%s\"", name)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ENCODING", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ENCODING", name, (char *)NULL); } Tcl_Close(NULL, chan); diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 49880b6..99d5e0a 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -327,7 +327,7 @@ TclDefaultBgErrorHandlerObjCmd( if (result != TCL_OK || valuePtr == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "missing return option \"-level\"", -1)); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", (char *)NULL); return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, valuePtr, &level) == TCL_ERROR) { @@ -337,7 +337,7 @@ TclDefaultBgErrorHandlerObjCmd( if (result != TCL_OK || valuePtr == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "missing return option \"-code\"", -1)); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", (char *)NULL); return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, valuePtr, &code) == TCL_ERROR) { @@ -1425,7 +1425,7 @@ Tcl_VwaitObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't wait for variable \"%s\": would wait forever", nameString)); - Tcl_SetErrorCode(interp, "TCL", "EVENT", "NO_SOURCES", NULL); + Tcl_SetErrorCode(interp, "TCL", "EVENT", "NO_SOURCES", (char *)NULL); return TCL_ERROR; } if (!done) { diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index 56445b6..e550882 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -1080,7 +1080,7 @@ TclFileAttrsCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad option \"%s\", there are no file attributes in this" " filesystem", TclGetString(objv[0]))); - Tcl_SetErrorCode(interp, "TCL","OPERATION","FATTR","NONE", NULL); + Tcl_SetErrorCode(interp, "TCL","OPERATION","FATTR","NONE", (char *)NULL); goto end; } @@ -1107,7 +1107,7 @@ TclFileAttrsCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad option \"%s\", there are no file attributes in this" " filesystem", TclGetString(objv[0]))); - Tcl_SetErrorCode(interp, "TCL","OPERATION","FATTR","NONE", NULL); + Tcl_SetErrorCode(interp, "TCL","OPERATION","FATTR","NONE", (char *)NULL); goto end; } @@ -1123,7 +1123,7 @@ TclFileAttrsCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "value for \"%s\" missing", TclGetString(objv[i]))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FATTR", - "NOVALUE", NULL); + "NOVALUE", (char *)NULL); goto end; } if (Tcl_FSFileAttrsSet(interp, index, filePtr, diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 7e24552..1fc89dc 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -1539,7 +1539,7 @@ Tcl_GlobObjCmd( badTypesArg: Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad argument to \"-types\": %s", - TclGetString(look))); + Tcl_GetString(look))); Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "BAD", (char *)NULL); result = TCL_ERROR; join = 0; diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index f73f9ce..3a55b8e 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -1013,12 +1013,12 @@ TclClockOldscanObjCmd( if (status == 1) { Tcl_SetObjResult(interp, dateInfo.messages); Tcl_DecrRefCount(dateInfo.messages); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "PARSE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "PARSE", (char *)NULL); return TCL_ERROR; } else if (status == 2) { Tcl_SetObjResult(interp, Tcl_NewStringObj("memory exhausted", -1)); Tcl_DecrRefCount(dateInfo.messages); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (char *)NULL); return TCL_ERROR; } else if (status != 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj("Unknown status returned " @@ -1026,7 +1026,7 @@ TclClockOldscanObjCmd( "report this error as a " "bug in Tcl.", -1)); Tcl_DecrRefCount(dateInfo.messages); - Tcl_SetErrorCode(interp, "TCL", "BUG", NULL); + Tcl_SetErrorCode(interp, "TCL", "BUG", (char *)NULL); return TCL_ERROR; } Tcl_DecrRefCount(dateInfo.messages); @@ -1034,31 +1034,31 @@ TclClockOldscanObjCmd( if (yyHaveDate > 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj("more than one date in string", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", (char *)NULL); return TCL_ERROR; } if (yyHaveTime > 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj("more than one time of day in string", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", (char *)NULL); return TCL_ERROR; } if (yyHaveZone > 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj("more than one time zone in string", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", (char *)NULL); return TCL_ERROR; } if (yyHaveDay > 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj("more than one weekday in string", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", (char *)NULL); return TCL_ERROR; } if (yyHaveOrdinalMonth > 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj("more than one ordinal month in string", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DATE", "MULTIPLE", (char *)NULL); return TCL_ERROR; } diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index cdcef10..0c8af09 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -450,7 +450,7 @@ Tcl_ReadObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected non-negative integer but got \"%s\"", TclGetString(objv[i]))); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "NUMBER", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "NUMBER", (char *)NULL); return TCL_ERROR; } newline = 1; @@ -1386,7 +1386,7 @@ AcceptCallbackProc( Tcl_RegisterChannel(NULL, chan); result = Tcl_VarEval(interp, script, " ", Tcl_GetChannelName(chan), - " ", address, " ", portBuf, NULL); + " ", address, " ", portBuf, (char *)NULL); if (result != TCL_OK) { Tcl_BackgroundException(interp, result); Tcl_UnregisterChannel(interp, chan); diff --git a/generic/tclInterp.c b/generic/tclInterp.c index ad06293..c34cbbf 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -3118,7 +3118,7 @@ ChildMarkTrusted( "permission denied: safe interpreter cannot mark trusted", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "UNSAFE", - NULL); + (char *)NULL); return TCL_ERROR; } ((Interp *) childInterp)->flags &= ~SAFE_INTERP; diff --git a/generic/tclListObj.c b/generic/tclListObj.c index b2d6228..f063599 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -168,7 +168,7 @@ AttemptNewList( "list creation failed: unable to alloc %u bytes", LIST_SIZE(objc))); } - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (char *)NULL); } return listRepPtr; } @@ -582,7 +582,7 @@ Tcl_ListObjAppendElement( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "max length of a Tcl list (%d elements) exceeded", LIST_MAX)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (char *)NULL); } return TCL_ERROR; } @@ -1447,7 +1447,7 @@ TclLsetFlat( Tcl_SetObjResult(interp, Tcl_NewStringObj("list index out of range", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSET", - "BADINDEX", NULL); + "BADINDEX", (char *)NULL); } result = TCL_ERROR; break; @@ -1637,7 +1637,7 @@ TclListObjSetElement( Tcl_SetObjResult(interp, Tcl_NewStringObj("list index out of range", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSET", - "BADINDEX", NULL); + "BADINDEX", (char *)NULL); } return TCL_ERROR; } @@ -1659,7 +1659,7 @@ TclListObjSetElement( Tcl_SetObjResult(interp, Tcl_NewStringObj("list index out of range", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSET", "BADINDEX", - NULL); + (char *)NULL); } return TCL_ERROR; } diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 28117f5..df9ef7d 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -185,7 +185,7 @@ Tcl_LoadObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "must specify either file name or package name", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "NOLIBRARY", - NULL); + (char *)NULL); code = TCL_ERROR; goto done; } @@ -253,7 +253,7 @@ Tcl_LoadObjCmd( "file \"%s\" is already loaded for package \"%s\"", fullFileName, pkgPtr->packageName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", - "SPLITPERSONALITY", NULL); + "SPLITPERSONALITY", (char *)NULL); code = TCL_ERROR; Tcl_MutexUnlock(&packageMutex); goto done; @@ -290,7 +290,7 @@ Tcl_LoadObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "package \"%s\" isn't loaded statically", packageName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "NOTSTATIC", - NULL); + (char *)NULL); code = TCL_ERROR; goto done; } @@ -349,7 +349,7 @@ Tcl_LoadObjCmd( "couldn't figure out package name for %s", fullFileName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", - "WHATPACKAGE", NULL); + "WHATPACKAGE", (char *)NULL); code = TCL_ERROR; goto done; } @@ -446,7 +446,7 @@ Tcl_LoadObjCmd( "can't use package in a safe interpreter: no" " %s_SafeInit procedure", pkgPtr->packageName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "UNSAFE", - NULL); + (char *)NULL); code = TCL_ERROR; goto done; } @@ -457,7 +457,7 @@ Tcl_LoadObjCmd( "can't attach package to interpreter: no %s_Init procedure", pkgPtr->packageName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "ENTRYPOINT", - NULL); + (char *)NULL); code = TCL_ERROR; goto done; } @@ -608,7 +608,7 @@ Tcl_UnloadObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "must specify either file name or package name", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "NOLIBRARY", - NULL); + (char *)NULL); code = TCL_ERROR; goto done; } @@ -682,7 +682,7 @@ Tcl_UnloadObjCmd( "package \"%s\" is loaded statically and cannot be unloaded", packageName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "STATIC", - NULL); + (char *)NULL); code = TCL_ERROR; goto done; } @@ -694,7 +694,7 @@ Tcl_UnloadObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "file \"%s\" has never been loaded", fullFileName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "NEVERLOADED", - NULL); + (char *)NULL); code = TCL_ERROR; goto done; } @@ -724,7 +724,7 @@ Tcl_UnloadObjCmd( "file \"%s\" has never been loaded in this interpreter", fullFileName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "NEVERLOADED", - NULL); + (char *)NULL); code = TCL_ERROR; goto done; } @@ -741,7 +741,7 @@ Tcl_UnloadObjCmd( "file \"%s\" cannot be unloaded under a safe interpreter", fullFileName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "CANNOT", - NULL); + (char *)NULL); code = TCL_ERROR; goto done; } @@ -752,7 +752,7 @@ Tcl_UnloadObjCmd( "file \"%s\" cannot be unloaded under a trusted interpreter", fullFileName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "CANNOT", - NULL); + (char *)NULL); code = TCL_ERROR; goto done; } @@ -893,7 +893,7 @@ Tcl_UnloadObjCmd( "file \"%s\" cannot be unloaded: unloading disabled", fullFileName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "DISABLED", - NULL); + (char *)NULL); code = TCL_ERROR; #endif } diff --git a/generic/tclOO.c b/generic/tclOO.c index 86c4087..a7aeeeb 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -1773,7 +1773,7 @@ TclNewObjectInstanceCommon( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't create object \"%s\": command already exists with" " that name", nameStr)); - Tcl_SetErrorCode(interp, "TCL", "OO", "OVERWRITE_OBJECT", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "OVERWRITE_OBJECT", (char *)NULL); return NULL; } } @@ -1827,7 +1827,7 @@ FinalizeAlloc( if (result != TCL_ERROR && Destructing(oPtr)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "object deleted in constructor", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "STILLBORN", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "STILLBORN", (char *)NULL); result = TCL_ERROR; } if (result != TCL_OK) { @@ -1896,7 +1896,7 @@ Tcl_CopyObjectInstance( if (IsRootClass(oPtr)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "may not clone the class of classes", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "CLONING_CLASS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CLONING_CLASS", (char *)NULL); return NULL; } @@ -2587,7 +2587,7 @@ TclOOObjectCmdCore( "impossible to invoke method \"%s\": no defined method or" " unknown method", TclGetString(methodNamePtr))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD_MAPPED", - TclGetString(methodNamePtr), NULL); + TclGetString(methodNamePtr), (char *)NULL); return TCL_ERROR; } } else { @@ -2603,7 +2603,7 @@ TclOOObjectCmdCore( "impossible to invoke method \"%s\": no defined method or" " unknown method", TclGetString(methodNamePtr))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(methodNamePtr), NULL); + TclGetString(methodNamePtr), (char *)NULL); return TCL_ERROR; } } @@ -2630,7 +2630,7 @@ TclOOObjectCmdCore( Tcl_SetObjResult(interp, Tcl_NewStringObj( "no valid method implementation", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(methodNamePtr), NULL); + TclGetString(methodNamePtr), (char *)NULL); TclOODeleteContext(contextPtr); return TCL_ERROR; } @@ -2711,7 +2711,7 @@ Tcl_ObjectContextInvokeNext( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "no next %s implementation", methodType)); - Tcl_SetErrorCode(interp, "TCL", "OO", "NOTHING_NEXT", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "NOTHING_NEXT", (char *)NULL); return TCL_ERROR; } @@ -2780,7 +2780,7 @@ TclNRObjectContextInvokeNext( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "no next %s implementation", methodType)); - Tcl_SetErrorCode(interp, "TCL", "OO", "NOTHING_NEXT", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "NOTHING_NEXT", (char *)NULL); return TCL_ERROR; } @@ -2859,7 +2859,7 @@ Tcl_GetObjectFromObj( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%s does not refer to an object", TclGetString(objPtr))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "OBJECT", TclGetString(objPtr), - NULL); + (char *)NULL); return NULL; } diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index e746b64..40a70c2 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -169,7 +169,7 @@ TclOO_Class_Create( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "object \"%s\" is not a class", TclGetString(cmdnameObj))); - Tcl_SetErrorCode(interp, "TCL", "OO", "INSTANTIATE_NONCLASS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "INSTANTIATE_NONCLASS", (char *)NULL); return TCL_ERROR; } @@ -187,7 +187,7 @@ TclOO_Class_Create( if (len == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "object name must not be empty", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "EMPTY_NAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "EMPTY_NAME", (char *)NULL); return TCL_ERROR; } @@ -234,7 +234,7 @@ TclOO_Class_CreateNs( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "object \"%s\" is not a class", TclGetString(cmdnameObj))); - Tcl_SetErrorCode(interp, "TCL", "OO", "INSTANTIATE_NONCLASS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "INSTANTIATE_NONCLASS", (char *)NULL); return TCL_ERROR; } @@ -252,7 +252,7 @@ TclOO_Class_CreateNs( if (len == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "object name must not be empty", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "EMPTY_NAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "EMPTY_NAME", (char *)NULL); return TCL_ERROR; } nsName = Tcl_GetStringFromObj( @@ -260,7 +260,7 @@ TclOO_Class_CreateNs( if (len == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "namespace name must not be empty", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "EMPTY_NAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "EMPTY_NAME", (char *)NULL); return TCL_ERROR; } @@ -305,7 +305,7 @@ TclOO_Class_New( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "object \"%s\" is not a class", TclGetString(cmdnameObj))); - Tcl_SetErrorCode(interp, "TCL", "OO", "INSTANTIATE_NONCLASS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "INSTANTIATE_NONCLASS", (char *)NULL); return TCL_ERROR; } @@ -538,7 +538,7 @@ TclOO_Object_Unknown( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "object \"%s\" has no %s", TclGetString(tmpBuf), piece)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[skip]), NULL); + TclGetString(objv[skip]), (char *)NULL); return TCL_ERROR; } @@ -557,7 +557,7 @@ TclOO_Object_Unknown( ckfree(methodNames); Tcl_SetObjResult(interp, errorMsg); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[skip]), NULL); + TclGetString(objv[skip]), (char *)NULL); return TCL_ERROR; } @@ -614,7 +614,7 @@ TclOO_Object_LinkVar( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "variable name \"%s\" illegal: must not contain namespace" " separator", varName)); - Tcl_SetErrorCode(interp, "TCL", "UPVAR", "INVERTED", NULL); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "INVERTED", (char *)NULL); return TCL_ERROR; } @@ -643,7 +643,7 @@ TclOO_Object_LinkVar( TclVarErrMsg(interp, varName, NULL, "define", "name refers to an element in an array"); - Tcl_SetErrorCode(interp, "TCL", "UPVAR", "LOCAL_ELEMENT", NULL); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "LOCAL_ELEMENT", (char *)NULL); return TCL_ERROR; } @@ -718,7 +718,7 @@ TclOO_Object_VarName( TCL_NAMESPACE_ONLY|TCL_LEAVE_ERR_MSG, "refer to", 1, 1, &aryVar); Tcl_DecrRefCount(varNamePtr); if (varPtr == NULL) { - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARIABLE", arg, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARIABLE", arg, (char *)NULL); return TCL_ERROR; } @@ -789,7 +789,7 @@ TclOONextObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%s may only be called from inside a method", TclGetString(objv[0]))); - Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", (char *)NULL); return TCL_ERROR; } context = framePtr->clientData; @@ -829,7 +829,7 @@ TclOONextToObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%s may only be called from inside a method", TclGetString(objv[0]))); - Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", (char *)NULL); return TCL_ERROR; } contextPtr = framePtr->clientData; @@ -850,7 +850,7 @@ TclOONextToObjCmd( if (classPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "\"%s\" is not a class", TclGetString(objv[1]))); - Tcl_SetErrorCode(interp, "TCL", "OO", "CLASS_REQUIRED", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CLASS_REQUIRED", (char *)NULL); return TCL_ERROR; } @@ -899,14 +899,14 @@ TclOONextToObjCmd( "%s implementation by \"%s\" not reachable from here", methodType, TclGetString(objv[1]))); Tcl_SetErrorCode(interp, "TCL", "OO", "CLASS_NOT_REACHABLE", - NULL); + (char *)NULL); return TCL_ERROR; } } Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%s has no non-filter implementation by \"%s\"", methodType, TclGetString(objv[1]))); - Tcl_SetErrorCode(interp, "TCL", "OO", "CLASS_NOT_THERE", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CLASS_NOT_THERE", (char *)NULL); return TCL_ERROR; } @@ -969,7 +969,7 @@ TclOOSelfObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%s may only be called from inside a method", TclGetString(objv[0]))); - Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", (char *)NULL); return TCL_ERROR; } @@ -1004,7 +1004,7 @@ TclOOSelfObjCmd( if (clsPtr == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "method not defined by a class", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "UNMATCHED_CONTEXT", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "UNMATCHED_CONTEXT", (char *)NULL); return TCL_ERROR; } @@ -1025,7 +1025,7 @@ TclOOSelfObjCmd( if (!CurrentlyInvoked(contextPtr).isFilter) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "not inside a filtering context", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "UNMATCHED_CONTEXT", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "UNMATCHED_CONTEXT", (char *)NULL); return TCL_ERROR; } else { struct MInvoke *miPtr = &CurrentlyInvoked(contextPtr); @@ -1051,7 +1051,7 @@ TclOOSelfObjCmd( !(framePtr->callerVarPtr->isProcCallFrame & FRAME_IS_METHOD)){ Tcl_SetObjResult(interp, Tcl_NewStringObj( "caller is not an object", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", (char *)NULL); return TCL_ERROR; } else { CallContext *callerPtr = framePtr->callerVarPtr->clientData; @@ -1119,7 +1119,7 @@ TclOOSelfObjCmd( if (!CurrentlyInvoked(contextPtr).isFilter) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "not inside a filtering context", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "UNMATCHED_CONTEXT", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "UNMATCHED_CONTEXT", (char *)NULL); return TCL_ERROR; } else { Method *mPtr; diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 5cff201..5633130 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -845,7 +845,7 @@ PushMethodCallFrame( pmPtr->procPtr->cmdPtr = &pmPtr->cmd; if (pmPtr->procPtr->bodyPtr->typePtr == &tclByteCodeType) { - ByteCode *codePtr = + ByteCode *codePtr = (ByteCode *) pmPtr->procPtr->bodyPtr->internalRep.twoPtrValue.ptr1; codePtr->nsPtr = nsPtr; @@ -1356,7 +1356,7 @@ TclOONewForwardInstanceMethod( if (prefixLen < 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "method forward prefix must be non-empty", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_FORWARD", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_FORWARD", (char *)NULL); return NULL; } @@ -1395,7 +1395,7 @@ TclOONewForwardMethod( if (prefixLen < 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "method forward prefix must be non-empty", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_FORWARD", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_FORWARD", (char *)NULL); return NULL; } diff --git a/generic/tclObj.c b/generic/tclObj.c index 284a431..35c62c3 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -976,7 +976,7 @@ Tcl_ConvertToType( if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't convert value to type %s", typePtr->name)); - Tcl_SetErrorCode(interp, "TCL", "API_ABUSE", NULL); + Tcl_SetErrorCode(interp, "TCL", "API_ABUSE", (char *)NULL); } return TCL_ERROR; } @@ -1996,7 +1996,7 @@ TclSetBooleanFromAny( Tcl_AppendLimitedToObj(msg, str, length, 50, ""); Tcl_AppendToObj(msg, "\"", -1); Tcl_SetObjResult(interp, msg); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "BOOLEAN", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "BOOLEAN", (char *)NULL); } return TCL_ERROR; } @@ -2285,7 +2285,7 @@ Tcl_GetDoubleFromObj( Tcl_SetObjResult(interp, Tcl_NewStringObj( "floating point value is Not a Number", -1)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "DOUBLE", "NAN", - NULL); + (char *)NULL); } return TCL_ERROR; } @@ -2508,7 +2508,7 @@ Tcl_GetIntFromObj( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected integer but got \"%s\"", Tcl_GetString(objPtr))); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", (char *)NULL); } return TCL_ERROR; } @@ -2518,7 +2518,7 @@ Tcl_GetIntFromObj( const char *s = "integer value too large to represent"; Tcl_SetObjResult(interp, Tcl_NewStringObj(s, -1)); - Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, NULL); + Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, (char *)NULL); } return TCL_ERROR; } @@ -2797,7 +2797,7 @@ Tcl_GetLongFromObj( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected integer but got \"%s\"", TclGetString(objPtr))); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", (char *)NULL); } return TCL_ERROR; } @@ -2839,7 +2839,7 @@ Tcl_GetLongFromObj( Tcl_Obj *msg = Tcl_NewStringObj(s, -1); Tcl_SetObjResult(interp, msg); - Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, NULL); + Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, (char *)NULL); } return TCL_ERROR; } @@ -3093,7 +3093,7 @@ Tcl_GetWideIntFromObj( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected integer but got \"%s\"", TclGetString(objPtr))); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", (char *)NULL); } return TCL_ERROR; } @@ -3130,7 +3130,7 @@ Tcl_GetWideIntFromObj( Tcl_Obj *msg = Tcl_NewStringObj(s, -1); Tcl_SetObjResult(interp, msg); - Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, NULL); + Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, (char *)NULL); } return TCL_ERROR; } @@ -3398,7 +3398,7 @@ GetBignumFromObj( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "insufficient memory to unpack bignum", -1)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (char *)NULL); } return TCL_ERROR; } @@ -3429,7 +3429,7 @@ GetBignumFromObj( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected integer but got \"%s\"", TclGetString(objPtr))); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", (char *)NULL); } return TCL_ERROR; } diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index f5571e2..a17c343 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -1523,7 +1523,7 @@ MakePathFromNormalized( Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't find object string representation", -1)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "PATH", "WTF", - NULL); + (char *)NULL); } return TCL_ERROR; } @@ -2397,7 +2397,7 @@ SetFsPathFromAny( "couldn't find HOME environment variable to" " expand path", -1)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "PATH", - "HOMELESS", NULL); + "HOMELESS", (char *)NULL); } return TCL_ERROR; } @@ -2422,7 +2422,7 @@ SetFsPathFromAny( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "user \"%s\" doesn't exist", expandedUser)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "PATH", "NOUSER", - NULL); + (char *)NULL); } Tcl_DStringFree(&userName); Tcl_DStringFree(&temp); diff --git a/generic/tclPipe.c b/generic/tclPipe.c index 2c6f99b..676ee3a 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -327,7 +327,7 @@ TclCleanupChildren( if (WIFEXITED(waitStatus)) { if (interp != NULL) { snprintf(msg2, sizeof(msg2), "%u", WEXITSTATUS(waitStatus)); - Tcl_SetErrorCode(interp, "CHILDSTATUS", msg1, msg2, NULL); + Tcl_SetErrorCode(interp, "CHILDSTATUS", msg1, msg2, (char *)NULL); } abnormalExit = 1; } else if (interp != NULL) { @@ -336,20 +336,20 @@ TclCleanupChildren( if (WIFSIGNALED(waitStatus)) { p = Tcl_SignalMsg(WTERMSIG(waitStatus)); Tcl_SetErrorCode(interp, "CHILDKILLED", msg1, - Tcl_SignalId(WTERMSIG(waitStatus)), p, NULL); + Tcl_SignalId(WTERMSIG(waitStatus)), p, (char *)NULL); Tcl_SetObjResult(interp, Tcl_ObjPrintf( "child killed: %s\n", p)); } else if (WIFSTOPPED(waitStatus)) { p = Tcl_SignalMsg(WSTOPSIG(waitStatus)); Tcl_SetErrorCode(interp, "CHILDSUSP", msg1, - Tcl_SignalId(WSTOPSIG(waitStatus)), p, NULL); + Tcl_SignalId(WSTOPSIG(waitStatus)), p, (char *)NULL); Tcl_SetObjResult(interp, Tcl_ObjPrintf( "child suspended: %s\n", p)); } else { Tcl_SetObjResult(interp, Tcl_NewStringObj( "child wait status didn't make sense\n", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "EXEC", - "ODDWAITRESULT", msg1, NULL); + "ODDWAITRESULT", msg1, (char *)NULL); } } } diff --git a/generic/tclPkg.c b/generic/tclPkg.c index 7e8db0e..8bce8b5 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -174,7 +174,7 @@ Tcl_PkgProvideEx( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "conflicting versions provided for package \"%s\": %s, then %s", name, TclGetString(pkgPtr->version), version)); - Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "VERSIONCONFLICT", NULL); + Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "VERSIONCONFLICT", (char *)NULL); return TCL_ERROR; } @@ -306,7 +306,7 @@ Tcl_PkgRequireEx( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "Cannot load package \"%s\" in standalone executable:" " This package is not compiled with stub support", name)); - Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "UNSTUBBED", NULL); + Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "UNSTUBBED", (char *)NULL); return NULL; } @@ -326,7 +326,7 @@ Tcl_PkgRequireEx( } ov = Tcl_NewStringObj(version, -1); if (exact) { - Tcl_AppendStringsToObj(ov, "-", version, NULL); + Tcl_AppendStringsToObj(ov, "-", version, (char *)NULL); } Tcl_IncrRefCount(ov); if (Tcl_PkgRequireProc(interp, name, 1, &ov, clientDataPtr) == TCL_OK) { @@ -432,7 +432,7 @@ PkgRequireCoreStep2(ClientData data[], Tcl_Interp *interp, int result) { if ((result != TCL_OK) && (result != TCL_ERROR)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad return code: %d", result)); - Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "BADRESULT", NULL); + Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "BADRESULT", (char *)NULL); result = TCL_ERROR; } if (result == TCL_ERROR) { @@ -458,7 +458,7 @@ PkgRequireCoreFinal(ClientData data[], Tcl_Interp *interp, int result) { if (reqPtr->pkgPtr->version == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't find package %s", name)); - Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "UNFOUND", NULL); + Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "UNFOUND", (char *)NULL); AddRequirementsToResult(interp, reqc, reqv); return TCL_ERROR; } @@ -479,7 +479,7 @@ PkgRequireCoreFinal(ClientData data[], Tcl_Interp *interp, int result) { "version conflict for package \"%s\": have %s, need", name, TclGetString(reqPtr->pkgPtr->version))); Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "VERSIONCONFLICT", - NULL); + (char *)NULL); AddRequirementsToResult(interp, reqc, reqv); return TCL_ERROR; } @@ -525,7 +525,7 @@ SelectPackage(ClientData data[], Tcl_Interp *interp, int result) { " attempt to provide %s %s requires %s", name, (char *) pkgPtr->clientData, name)); AddRequirementsToResult(interp, reqc, reqv); - Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "CIRCULARITY", NULL); + Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "CIRCULARITY", (char *)NULL); return TCL_ERROR; } @@ -685,7 +685,7 @@ SelectPackageFinal(ClientData data[], Tcl_Interp *interp, int result) { " no version of package %s provided", name, versionToProvide, name)); Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "UNPROVIDED", - NULL); + (char *)NULL); } else { char *pvi, *vi; @@ -709,7 +709,7 @@ SelectPackageFinal(ClientData data[], Tcl_Interp *interp, int result) { name, versionToProvide, name, TclGetString(reqPtr->pkgPtr->version))); Tcl_SetErrorCode(interp, "TCL", "PACKAGE", - "WRONGPROVIDE", NULL); + "WRONGPROVIDE", (char *)NULL); } } } @@ -721,7 +721,7 @@ SelectPackageFinal(ClientData data[], Tcl_Interp *interp, int result) { "attempt to provide package %s %s failed:" " bad return code: %s", name, versionToProvide, TclGetString(codePtr))); - Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "BADRESULT", NULL); + Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "BADRESULT", (char *)NULL); TclDecrRefCount(codePtr); result = TCL_ERROR; } @@ -827,7 +827,7 @@ Tcl_PkgPresentEx( if (foundVersion == NULL) { Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PACKAGE", name, - NULL); + (char *)NULL); } return foundVersion; } @@ -840,7 +840,7 @@ Tcl_PkgPresentEx( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "package %s is not present", name)); } - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PACKAGE", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PACKAGE", name, (char *)NULL); return NULL; } @@ -1508,7 +1508,7 @@ CheckVersionAndConvert( ckfree(ibuf); Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected version number but got \"%s\"", string)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "VERSION", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "VERSION", (char *)NULL); return TCL_ERROR; } @@ -1771,7 +1771,7 @@ CheckRequirement( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected versionMin-versionMax but got \"%s\"", string)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "VERSIONRANGE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "VERSIONRANGE", (char *)NULL); return TCL_ERROR; } diff --git a/generic/tclProc.c b/generic/tclProc.c index 80d4c32..70cfbda 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -148,14 +148,14 @@ Tcl_ProcObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't create procedure \"%s\": unknown namespace", procName)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "COMMAND", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "COMMAND", (char *)NULL); return TCL_ERROR; } if (simpleName == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't create procedure \"%s\": bad procedure name", procName)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "COMMAND", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "COMMAND", (char *)NULL); return TCL_ERROR; } @@ -463,7 +463,7 @@ TclCreateProc( "precompiled header expects %d", procName, numArgs, procPtr->numArgs)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "BYTECODELIES", NULL); + "BYTECODELIES", (char *)NULL); goto procError; } localPtr = procPtr->firstLocalPtr; @@ -493,14 +493,14 @@ TclCreateProc( Tcl_AppendToObj(errorObj, "\"", -1); Tcl_SetObjResult(interp, errorObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "FORMALARGUMENTFORMAT", NULL); + "FORMALARGUMENTFORMAT", (char *)NULL); goto procError; } if ((fieldCount == 0) || (Tcl_GetCharLength(fieldValues[0]) == 0)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "argument with no name", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "FORMALARGUMENTFORMAT", NULL); + "FORMALARGUMENTFORMAT", (char *)NULL); goto procError; } @@ -517,7 +517,7 @@ TclCreateProc( "formal parameter \"%s\" is an array element", TclGetString(fieldValues[0]))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "FORMALARGUMENTFORMAT", NULL); + "FORMALARGUMENTFORMAT", (char *)NULL); goto procError; } } else if (p[0] == ':' && p[1] == ':') { @@ -527,7 +527,7 @@ TclCreateProc( Tcl_AppendToObj(errorObj, "\" is not a simple name", -1); Tcl_SetObjResult(interp, errorObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "FORMALARGUMENTFORMAT", NULL); + "FORMALARGUMENTFORMAT", (char *)NULL); goto procError; } p++; @@ -555,7 +555,7 @@ TclCreateProc( "procedure \"%s\": formal parameter %d is " "inconsistent with precompiled body", procName, i)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "BYTECODELIES", NULL); + "BYTECODELIES", (char *)NULL); goto procError; } @@ -580,7 +580,7 @@ TclCreateProc( "default value inconsistent with precompiled body", -1); Tcl_SetObjResult(interp, errorObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "BYTECODELIES", NULL); + "BYTECODELIES", (char *)NULL); goto procError; } } @@ -731,7 +731,7 @@ TclGetFrame( levelError: Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad level \"%s\"", name)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "STACKLEVEL", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "STACKLEVEL", (char *)NULL); return -1; } @@ -833,7 +833,7 @@ TclObjGetFrame( } Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad level \"%s\"", name)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LEVEL", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LEVEL", name, (char *)NULL); return -1; } @@ -1087,7 +1087,7 @@ ProcWrongNumArgs( if (defPtr->value.objPtr != NULL) { TclNewObj(argObj); - Tcl_AppendStringsToObj(argObj, "?", TclGetString(namePtr), "?", NULL); + Tcl_AppendStringsToObj(argObj, "?", TclGetString(namePtr), "?", (char *)NULL); } else if (defPtr->flags & VAR_IS_ARGS) { numArgs--; final = "?arg ...?"; @@ -1859,7 +1859,7 @@ InterpProcNR2( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invoked \"%s\" outside of a loop", ((result == TCL_BREAK) ? "break" : "continue"))); - Tcl_SetErrorCode(interp, "TCL", "RESULT", "UNEXPECTED", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "UNEXPECTED", (char *)NULL); result = TCL_ERROR; /* FALLTHRU */ @@ -1941,7 +1941,7 @@ TclProcCompileProc( Tcl_SetObjResult(interp, Tcl_NewStringObj( "a precompiled script jumped interps", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "CROSSINTERPBYTECODE", NULL); + "CROSSINTERPBYTECODE", (char *)NULL); return TCL_ERROR; } codePtr->compileEpoch = iPtr->compileEpoch; @@ -2446,7 +2446,7 @@ SetLambdaFromAny( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't interpret \"%s\" as a lambda expression", TclGetString(objPtr))); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "LAMBDA", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "LAMBDA", (char *)NULL); return TCL_ERROR; } diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index 3259b48..9620bb9 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -732,7 +732,7 @@ TclRegError( snprintf(cbuf, sizeof(cbuf), "%d", status); (void) TclReError(REG_ITOA, cbuf, sizeof(cbuf)); - Tcl_SetErrorCode(interp, "REGEXP", cbuf, buf, NULL); + Tcl_SetErrorCode(interp, "REGEXP", cbuf, buf, (char *)NULL); } /* diff --git a/generic/tclResult.c b/generic/tclResult.c index 4b8775a..7364f3f 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -1334,7 +1334,7 @@ TclProcessReturn( if (valuePtr != NULL) { Tcl_SetObjErrorCode(interp, valuePtr); } else { - Tcl_SetErrorCode(interp, "NONE", NULL); + Tcl_SetErrorCode(interp, "NONE", (char *)NULL); } Tcl_DictObjGet(NULL, iPtr->returnOpts, keys[KEY_ERRORLINE], @@ -1416,7 +1416,7 @@ TclMergeReturnOptions( "bad %s value: expected dictionary but got \"%s\"", compare, TclGetString(objv[1]))); Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_OPTIONS", - NULL); + (char *)NULL); goto error; } @@ -1465,7 +1465,7 @@ TclMergeReturnOptions( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad -level value: expected non-negative integer but got" " \"%s\"", TclGetString(valuePtr))); - Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_LEVEL", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_LEVEL", (char *)NULL); goto error; } Tcl_DictObjRemove(NULL, returnOpts, keys[KEY_LEVEL]); @@ -1488,7 +1488,7 @@ TclMergeReturnOptions( "bad -errorcode value: expected a list but got \"%s\"", TclGetString(valuePtr))); Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_ERRORCODE", - NULL); + (char *)NULL); goto error; } } @@ -1510,7 +1510,7 @@ TclMergeReturnOptions( "bad -errorstack value: expected a list but got \"%s\"", TclGetString(valuePtr))); Tcl_SetErrorCode(interp, "TCL", "RESULT", "NONLIST_ERRORSTACK", - NULL); + (char *)NULL); goto error; } if (length % 2) { @@ -1522,7 +1522,7 @@ TclMergeReturnOptions( "forbidden odd-sized list for -errorstack: \"%s\"", TclGetString(valuePtr))); Tcl_SetErrorCode(interp, "TCL", "RESULT", - "ODDSIZEDLIST_ERRORSTACK", NULL); + "ODDSIZEDLIST_ERRORSTACK", (char *)NULL); goto error; } } @@ -1675,7 +1675,7 @@ Tcl_SetReturnOptions( || (objc % 2)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected dict but got \"%s\"", TclGetString(options))); - Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_OPTIONS", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_OPTIONS", (char *)NULL); code = TCL_ERROR; } else if (TCL_ERROR == TclMergeReturnOptions(interp, objc, objv, &mergedOpts, &code, &level)) { diff --git a/generic/tclScan.c b/generic/tclScan.c index 2861e0b..80f0f77 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -425,7 +425,7 @@ ValidateFormat( if (flags & SCAN_BIG) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "unsigned bignum scans are invalid", -1)); - Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADUNSIGNED",NULL); + Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADUNSIGNED", (char *)NULL); goto error; } break; diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index a5d9ad1..432d11b 100644 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -1481,7 +1481,7 @@ TclParseNumber( Tcl_AppendToObj(msg, " (looks like invalid octal number)", -1); } Tcl_SetObjResult(interp, msg); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "NUMBER", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "NUMBER", (char *)NULL); } } @@ -4693,7 +4693,7 @@ Tcl_InitBignumFromDouble( const char *s = "integer value too large to represent"; Tcl_SetObjResult(interp, Tcl_NewStringObj(s, -1)); - Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, NULL); + Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, (char *)NULL); } return TCL_ERROR; } diff --git a/generic/tclTest.c b/generic/tclTest.c index 2fd6714..491fea0 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -1397,7 +1397,7 @@ CreatedCommandProc( &info); if (!found) { Tcl_AppendResult(interp, "CreatedCommandProc could not get command info for test_ns_basic::createdcommand", - NULL); + (char *)NULL); return TCL_ERROR; } Tcl_AppendResult(interp, "CreatedCommandProc in ", @@ -1418,7 +1418,7 @@ CreatedCommandProc2( found = Tcl_GetCommandInfo(interp, "value:at:", &info); if (!found) { Tcl_AppendResult(interp, "CreatedCommandProc2 could not get command info for test_ns_basic::createdcommand", - NULL); + (char *)NULL); return TCL_ERROR; } Tcl_AppendResult(interp, "CreatedCommandProc2 in ", @@ -1769,7 +1769,7 @@ TestdstringCmd( } else { Tcl_AppendResult(interp, "bad gresult option \"", argv[2], "\": must be staticsmall, staticlarge, free, or special", - NULL); + (char *)NULL); return TCL_ERROR; } Tcl_DStringGetResult(interp, &dstring); @@ -2906,7 +2906,7 @@ TestgetplatformCmd( if (argc != 1) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], - NULL); + (char *)NULL); return TCL_ERROR; } @@ -4639,23 +4639,23 @@ TestseterrorcodeCmd( } switch (argc) { case 1: - Tcl_SetErrorCode(interp, "NONE", NULL); + Tcl_SetErrorCode(interp, "NONE", (char *)NULL); break; case 2: - Tcl_SetErrorCode(interp, argv[1], NULL); + Tcl_SetErrorCode(interp, argv[1], (char *)NULL); break; case 3: - Tcl_SetErrorCode(interp, argv[1], argv[2], NULL); + Tcl_SetErrorCode(interp, argv[1], argv[2], (char *)NULL); break; case 4: - Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], NULL); + Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], (char *)NULL); break; case 5: - Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], argv[4], NULL); + Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], argv[4], (char *)NULL); break; case 6: Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], argv[4], - argv[5], NULL); + argv[5], (char *)NULL); } return TCL_ERROR; } @@ -4735,7 +4735,7 @@ TestfeventCmd( } else { Tcl_AppendResult(interp, "called \"testfevent code\" before \"testfevent create\"", - NULL); + (char *)NULL); return TCL_ERROR; } } else if (strcmp(argv[1], "create") == 0) { @@ -7614,7 +7614,7 @@ TestconcatobjCmd( if (concatPtr == tmpPtr) { result = TCL_ERROR; Tcl_AppendResult(interp, "\n\t* (a) concatObj is not a new obj ", - NULL); + (char *)NULL); switch (tmpPtr->refCount) { case 0: Tcl_AppendResult(interp, "(no new refCount)", NULL); @@ -7641,7 +7641,7 @@ TestconcatobjCmd( if (concatPtr == tmpPtr) { result = TCL_ERROR; Tcl_AppendResult(interp, "\n\t* (b) concatObj is not a new obj ", - NULL); + (char *)NULL); switch (tmpPtr->refCount) { case 0: Tcl_AppendResult(interp, "(refCount removed?)", NULL); @@ -7770,7 +7770,7 @@ TestconcatobjCmd( if (concatPtr == tmpPtr) { result = TCL_ERROR; Tcl_AppendResult(interp, "\n\t* (f) concatObj is not a new obj ", - NULL); + (char *)NULL); (void) Tcl_ListObjLength(NULL, concatPtr, &len); switch (tmpPtr->refCount) { @@ -7801,7 +7801,7 @@ TestconcatobjCmd( if (concatPtr == tmpPtr) { result = TCL_ERROR; Tcl_AppendResult(interp, "\n\t* (g) concatObj is not a new obj ", - NULL); + (char *)NULL); (void) Tcl_ListObjLength(NULL, concatPtr, &len); switch (tmpPtr->refCount) { @@ -8165,7 +8165,7 @@ TestInterpResolverCmd( case 0: /*down*/ if (!Tcl_RemoveInterpResolvers(interp, RESOLVER_KEY)) { Tcl_AppendResult(interp, "could not remove the resolver scheme", - NULL); + (char *)NULL); return TCL_ERROR; } } diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 1302b4e..0040d75 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -917,7 +917,7 @@ ThreadSend( if (resultPtr->code != TCL_OK) { if (resultPtr->errorCode) { - Tcl_SetErrorCode(interp, resultPtr->errorCode, NULL); + Tcl_SetErrorCode(interp, resultPtr->errorCode, (char *)NULL); ckfree(resultPtr->errorCode); } if (resultPtr->errorInfo) { diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 3b8bcd6..2a71717 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -833,7 +833,7 @@ Tcl_AfterObjCmd( "bad argument \"%s\": must be" " cancel, idle, info, or an integer", arg)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", "argument", - arg, NULL); + arg, (char *)NULL); return TCL_ERROR; } } @@ -972,7 +972,7 @@ Tcl_AfterObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "event \"%s\" doesn't exist", eventStr)); - Tcl_SetErrorCode(interp, "TCL","LOOKUP","EVENT", eventStr, NULL); + Tcl_SetErrorCode(interp, "TCL","LOOKUP","EVENT", eventStr, (char *)NULL); return TCL_ERROR; } else { Tcl_Obj *resultListPtr; diff --git a/generic/tclTrace.c b/generic/tclTrace.c index 8b5f2c3..11f3af4 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -372,7 +372,7 @@ Tcl_TraceObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad operations \"%s\": should be one or more of rwua", flagOps)); - Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRACE", "BADOPS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRACE", "BADOPS", (char *)NULL); return TCL_ERROR; #endif } @@ -443,7 +443,7 @@ TraceExecutionObjCmd( "bad operation list \"\": must be one or more of" " enter, leave, enterstep, or leavestep", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRACE", "NOOPS", - NULL); + (char *)NULL); return TCL_ERROR; } for (i = 0; i < listLen; i++) { @@ -684,7 +684,7 @@ TraceCommandObjCmd( "bad operation list \"\": must be one or more of" " delete or rename", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRACE", "NOOPS", - NULL); + (char *)NULL); return TCL_ERROR; } @@ -883,7 +883,7 @@ TraceVariableObjCmd( "bad operation list \"\": must be one or more of" " array, read, unset, or write", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRACE", "NOOPS", - NULL); + (char *)NULL); return TCL_ERROR; } for (i = 0; i < listLen ; i++) { diff --git a/generic/tclUtil.c b/generic/tclUtil.c index dab5c3a..0d2df75 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -652,7 +652,7 @@ FindElement( "%s element in braces followed by \"%.*s\" " "instead of space", typeStr, (int) (p2-p), p)); Tcl_SetErrorCode(interp, "TCL", "VALUE", typeCode, "JUNK", - NULL); + (char *)NULL); } return TCL_ERROR; } @@ -704,7 +704,7 @@ FindElement( "%s element in quotes followed by \"%.*s\" " "instead of space", typeStr, (int) (p2-p), p)); Tcl_SetErrorCode(interp, "TCL", "VALUE", typeCode, "JUNK", - NULL); + (char *)NULL); } return TCL_ERROR; } @@ -737,7 +737,7 @@ FindElement( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unmatched open brace in %s", typeStr)); Tcl_SetErrorCode(interp, "TCL", "VALUE", typeCode, "BRACE", - NULL); + (char *)NULL); } return TCL_ERROR; } else if (inQuotes) { @@ -745,7 +745,7 @@ FindElement( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unmatched open quote in %s", typeStr)); Tcl_SetErrorCode(interp, "TCL", "VALUE", typeCode, "QUOTE", - NULL); + (char *)NULL); } return TCL_ERROR; } @@ -892,7 +892,7 @@ Tcl_SplitList( Tcl_SetObjResult(interp, Tcl_NewStringObj( "internal error in Tcl_SplitList", -1)); Tcl_SetErrorCode(interp, "TCL", "INTERNAL", "Tcl_SplitList", - NULL); + (char *)NULL); } return TCL_ERROR; } @@ -3698,7 +3698,7 @@ TclGetIntForIndex( bytes += 4; } TclCheckBadOctal(interp, bytes); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", (char *)NULL); } return TCL_ERROR; @@ -3822,7 +3822,7 @@ SetEndOffsetFromAny( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad index \"%s\": must be end?[+-]integer?", bytes)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", (char *)NULL); } return TCL_ERROR; } @@ -3858,7 +3858,7 @@ SetEndOffsetFromAny( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad index \"%s\": must be end?[+-]integer?", bytes)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", (char *)NULL); } return TCL_ERROR; } @@ -4701,7 +4701,7 @@ TclReToGlob( invalidGlob: if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj(msg, -1)); - Tcl_SetErrorCode(interp, "TCL", "RE2GLOB", code, NULL); + Tcl_SetErrorCode(interp, "TCL", "RE2GLOB", code, (char *)NULL); } Tcl_DStringFree(dsPtr); return TCL_ERROR; diff --git a/generic/tclVar.c b/generic/tclVar.c index 5cc1f3a..428cc0c 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -302,7 +302,7 @@ NotArrayError( Tcl_SetObjResult(interp, Tcl_ObjPrintf("\"%s\" isn't an array", nameStr)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", nameStr, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", nameStr, (char *)NULL); return TCL_ERROR; } @@ -611,7 +611,7 @@ TclObjLookupVarEx( if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg, NOSUCHVAR, -1); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "VARNAME", (char *)NULL); } return NULL; } @@ -647,7 +647,7 @@ TclObjLookupVarEx( TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg, NEEDARRAY, -1); Tcl_SetErrorCode(interp, "TCL", "VALUE", "VARNAME", - NULL); + (char *)NULL); } return NULL; } @@ -713,7 +713,7 @@ TclObjLookupVarEx( if ((errMsg != NULL) && (flags & TCL_LEAVE_ERR_MSG)) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg, errMsg, -1); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - TclGetString(part1Ptr), NULL); + TclGetString(part1Ptr), (char *)NULL); } if (newPart2) { Tcl_DecrRefCount(part2Ptr); @@ -1086,7 +1086,7 @@ TclLookupArrayElement( TclObjVarErrMsg(interp, arrayNamePtr, elNamePtr, msg, NOSUCHVAR, index); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - arrayNamePtr?TclGetString(arrayNamePtr):NULL, NULL); + arrayNamePtr?TclGetString(arrayNamePtr):NULL, (char *)NULL); } return NULL; } @@ -1101,7 +1101,7 @@ TclLookupArrayElement( TclObjVarErrMsg(interp, arrayNamePtr, elNamePtr, msg, DANGLINGVAR, index); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - arrayNamePtr?TclGetString(arrayNamePtr):NULL, NULL); + arrayNamePtr?TclGetString(arrayNamePtr):NULL, (char *)NULL); } return NULL; } @@ -1121,7 +1121,7 @@ TclLookupArrayElement( TclObjVarErrMsg(interp, arrayNamePtr, elNamePtr, msg, NEEDARRAY, index); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - arrayNamePtr?TclGetString(arrayNamePtr):NULL, NULL); + arrayNamePtr?TclGetString(arrayNamePtr):NULL, (char *)NULL); } return NULL; } @@ -1142,7 +1142,7 @@ TclLookupArrayElement( TclObjVarErrMsg(interp, arrayNamePtr, elNamePtr, msg, NOSUCHELEMENT, index); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ELEMENT", - TclGetString(elNamePtr), NULL); + TclGetString(elNamePtr), (char *)NULL); } } } @@ -1481,7 +1481,7 @@ TclPtrGetVarIdx( */ errorReturn: - Tcl_SetErrorCode(interp, "TCL", "READ", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "READ", "VARNAME", (char *)NULL); if (TclIsVarUndefined(varPtr)) { TclCleanupVar(varPtr, arrayPtr); } @@ -1884,11 +1884,11 @@ TclPtrSetVarIdx( if (TclIsVarArrayElement(varPtr)) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, "set", DANGLINGELEMENT, index); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ELEMENT", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ELEMENT", (char *)NULL); } else { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, "set", DANGLINGVAR, index); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", (char *)NULL); } } goto earlyError; @@ -1901,7 +1901,7 @@ TclPtrSetVarIdx( if (TclIsVarArray(varPtr)) { if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, "set", ISARRAY,index); - Tcl_SetErrorCode(interp, "TCL", "WRITE", "ARRAY", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRITE", "ARRAY", (char *)NULL); } goto earlyError; } @@ -2025,7 +2025,7 @@ TclPtrSetVarIdx( cleanup: if (resultPtr == NULL) { - Tcl_SetErrorCode(interp, "TCL", "WRITE", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRITE", "VARNAME", (char *)NULL); } if (TclIsVarUndefined(varPtr)) { TclCleanupVar(varPtr, arrayPtr); @@ -2498,7 +2498,7 @@ TclPtrUnsetVarIdx( if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, "unset", ((arrayPtr == NULL) ? NOSUCHVAR : NOSUCHELEMENT), index); - Tcl_SetErrorCode(interp, "TCL", "UNSET", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "UNSET", "VARNAME", (char *)NULL); } } @@ -3683,7 +3683,7 @@ ArraySetCmd( CleanupVar(varPtr, arrayPtr); TclObjVarErrMsg(interp, arrayNameObj, NULL, "set", NEEDARRAY, -1); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - TclGetString(arrayNameObj), NULL); + TclGetString(arrayNameObj), (char *)NULL); return TCL_ERROR; } @@ -3750,7 +3750,7 @@ ArraySetCmd( if (elemLen & 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "list must have an even number of elements", -1)); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "FORMAT", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "FORMAT", (char *)NULL); return TCL_ERROR; } if (elemLen == 0) { @@ -3801,7 +3801,7 @@ ArraySetCmd( TclObjVarErrMsg(interp, arrayNameObj, NULL, "array set", NEEDARRAY, -1); - Tcl_SetErrorCode(interp, "TCL", "WRITE", "ARRAY", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRITE", "ARRAY", (char *)NULL); return TCL_ERROR; } } @@ -4185,7 +4185,7 @@ ObjMakeUpvar( "bad variable name \"%s\": can't create namespace " "variable that refers to procedure variable", TclGetString(myNamePtr))); - Tcl_SetErrorCode(interp, "TCL", "UPVAR", "INVERTED", NULL); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "INVERTED", (char *)NULL); return TCL_ERROR; } } @@ -4301,7 +4301,7 @@ TclPtrObjMakeUpvarIdx( "bad variable name \"%s\": can't create a scalar " "variable that looks like an array element", myName)); Tcl_SetErrorCode(interp, "TCL", "UPVAR", "LOCAL_ELEMENT", - NULL); + (char *)NULL); return TCL_ERROR; } } @@ -4320,7 +4320,7 @@ TclPtrObjMakeUpvarIdx( if (varPtr == NULL) { TclObjVarErrMsg(interp, myNamePtr, NULL, "create", errMsg, -1); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - TclGetString(myNamePtr), NULL); + TclGetString(myNamePtr), (char *)NULL); return TCL_ERROR; } } @@ -4328,14 +4328,14 @@ TclPtrObjMakeUpvarIdx( if (varPtr == otherPtr) { Tcl_SetObjResult((Tcl_Interp *) iPtr, Tcl_NewStringObj( "can't upvar from variable to itself", -1)); - Tcl_SetErrorCode(interp, "TCL", "UPVAR", "SELF", NULL); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "SELF", (char *)NULL); return TCL_ERROR; } if (TclIsVarTraced(varPtr)) { Tcl_SetObjResult((Tcl_Interp *) iPtr, Tcl_ObjPrintf( "variable \"%s\" has traces: can't use for upvar", myName)); - Tcl_SetErrorCode(interp, "TCL", "UPVAR", "TRACED", NULL); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "TRACED", (char *)NULL); return TCL_ERROR; } else if (!TclIsVarUndefined(varPtr)) { Var *linkPtr; @@ -4350,7 +4350,7 @@ TclPtrObjMakeUpvarIdx( if (!TclIsVarLink(varPtr)) { Tcl_SetObjResult((Tcl_Interp *) iPtr, Tcl_ObjPrintf( "variable \"%s\" already exists", myName)); - Tcl_SetErrorCode(interp, "TCL", "UPVAR", "EXISTS", NULL); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "EXISTS", (char *)NULL); return TCL_ERROR; } @@ -4700,7 +4700,7 @@ Tcl_VariableObjCmd( TclObjVarErrMsg(interp, varNamePtr, NULL, "define", ISARRAYELEMENT, -1); - Tcl_SetErrorCode(interp, "TCL", "UPVAR", "LOCAL_ELEMENT", NULL); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "LOCAL_ELEMENT", (char *)NULL); return TCL_ERROR; } @@ -4851,7 +4851,7 @@ Tcl_UpvarObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad level \"%s\"", TclGetString(levelObj))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LEVEL", - TclGetString(levelObj), NULL); + TclGetString(levelObj), (char *)NULL); return TCL_ERROR; } @@ -4943,7 +4943,7 @@ SetArraySearchObj( syntax: Tcl_SetObjResult(interp, Tcl_ObjPrintf( "illegal search identifier \"%s\"", string)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAYSEARCH", string, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAYSEARCH", string, (char *)NULL); return TCL_ERROR; } @@ -5037,7 +5037,7 @@ ParseSearchId( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "couldn't find search \"%s\"", string)); badLookup: - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAYSEARCH", string, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAYSEARCH", string, (char *)NULL); return NULL; } @@ -5742,7 +5742,7 @@ ObjFindNamespaceVar( if ((varPtr == NULL) && (flags & TCL_LEAVE_ERR_MSG)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown variable \"%s\"", name)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARIABLE", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARIABLE", name, (char *)NULL); } return (Tcl_Var) varPtr; } |