diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-10-17 06:02:36 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-10-17 06:02:36 (GMT) |
commit | 6def0d48c1fff35f9f5b3bfbe1ddbe6cedd2c247 (patch) | |
tree | 764a634adc0ddab6d9a9456d74fc449175c34275 /generic | |
parent | fdb568c35f1cd6de7f1acd05fdbd4f8b6cf5aee1 (diff) | |
download | tcl-6def0d48c1fff35f9f5b3bfbe1ddbe6cedd2c247.zip tcl-6def0d48c1fff35f9f5b3bfbe1ddbe6cedd2c247.tar.gz tcl-6def0d48c1fff35f9f5b3bfbe1ddbe6cedd2c247.tar.bz2 |
Handle sentinels for any C++ compiler
Diffstat (limited to 'generic')
51 files changed, 580 insertions, 589 deletions
diff --git a/generic/tclArithSeries.c b/generic/tclArithSeries.c index 45a3481..34fd635 100755 --- a/generic/tclArithSeries.c +++ b/generic/tclArithSeries.c @@ -545,7 +545,7 @@ TclNewArithSeriesObj( Tcl_SetObjResult( interp, Tcl_NewStringObj("max length of a Tcl list exceeded", -1)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); return TCL_ERROR; } @@ -876,7 +876,7 @@ TclArithSeriesGetElements( Tcl_SetObjResult( interp, Tcl_NewStringObj("max length of a Tcl list exceeded", -1)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); } return TCL_ERROR; } @@ -899,7 +899,7 @@ TclArithSeriesGetElements( Tcl_SetObjResult( interp, Tcl_ObjPrintf("value is not an arithseries")); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "UNKNOWN", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "UNKNOWN", (void *)NULL); } return TCL_ERROR; } diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 53a5614..0120466 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -682,7 +682,7 @@ buildInfoObjCmd( if (p) { memcpy(buf, (char *)clientData, p - (char *)clientData); buf[p - (char *)clientData] = '\0'; - Tcl_AppendResult(interp, buf, NULL); + Tcl_AppendResult(interp, buf, (void *)NULL); } return TCL_OK; } else if (len == 10 && !strcmp(arg, "patchlevel")) { @@ -691,7 +691,7 @@ buildInfoObjCmd( if (p) { memcpy(buf, (char *)clientData, p - (char *)clientData); buf[p - (char *)clientData] = '\0'; - Tcl_AppendResult(interp, buf, NULL); + Tcl_AppendResult(interp, buf, (void *)NULL); } return TCL_OK; } else if (len == 6 && !strcmp(arg, "commit")) { @@ -701,9 +701,9 @@ buildInfoObjCmd( char buf[80]; memcpy(buf, p+1, q - p - 1); buf[q - p - 1] = '\0'; - Tcl_AppendResult(interp, buf, NULL); + Tcl_AppendResult(interp, buf, (void *)NULL); } else { - Tcl_AppendResult(interp, p+1, NULL); + Tcl_AppendResult(interp, p+1, (void *)NULL); } } return TCL_OK; @@ -717,29 +717,29 @@ buildInfoObjCmd( char buf[16]; memcpy(buf, p+1, q - p - 1); buf[q - p - 1] = '\0'; - Tcl_AppendResult(interp, buf, NULL); + Tcl_AppendResult(interp, buf, (void *)NULL); } else { - Tcl_AppendResult(interp, p+1, NULL); + Tcl_AppendResult(interp, p+1, (void *)NULL); } return TCL_OK; } p = strchr(p+1, '.'); } - Tcl_AppendResult(interp, "0", NULL); + Tcl_AppendResult(interp, "0", (void *)NULL); return TCL_OK; } const char *p = strchr((char *)clientData, '.'); while (p) { if (!strncmp(p+1, arg, len) && ((p[len+1] == '.') || (p[len+1] == '\0'))) { - Tcl_AppendResult(interp, "1", NULL); + Tcl_AppendResult(interp, "1", (void *)NULL); return TCL_OK; } p = strchr(p+1, '.'); } - Tcl_AppendResult(interp, "0", NULL); + Tcl_AppendResult(interp, "0", (void *)NULL); return TCL_OK; } - Tcl_AppendResult(interp, (char *)clientData, NULL); + Tcl_AppendResult(interp, (char *)clientData, (void *)NULL); return TCL_OK; } @@ -1522,7 +1522,7 @@ BadEnsembleSubcommand( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "not allowed to invoke subcommand %s of %s", infoPtr->commandName, infoPtr->ensembleNsName)); - Tcl_SetErrorCode(interp, "TCL", "SAFE", "SUBCOMMAND", NULL); + Tcl_SetErrorCode(interp, "TCL", "SAFE", "SUBCOMMAND", (void *)NULL); return TCL_ERROR; } @@ -2228,7 +2228,7 @@ Tcl_HideCommand( Tcl_SetObjResult(interp, Tcl_NewStringObj( "cannot use namespace qualifiers in hidden command" " token (rename)", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "HIDDENTOKEN", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "HIDDENTOKEN", (void *)NULL); return TCL_ERROR; } @@ -2253,7 +2253,7 @@ Tcl_HideCommand( Tcl_SetObjResult(interp, Tcl_NewStringObj( "can only hide global namespace commands (use rename then hide)", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "HIDE", "NON_GLOBAL", NULL); + Tcl_SetErrorCode(interp, "TCL", "HIDE", "NON_GLOBAL", (void *)NULL); return TCL_ERROR; } @@ -2279,7 +2279,7 @@ Tcl_HideCommand( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "hidden command named \"%s\" already exists", hiddenCmdToken)); - Tcl_SetErrorCode(interp, "TCL", "HIDE", "ALREADY_HIDDEN", NULL); + Tcl_SetErrorCode(interp, "TCL", "HIDE", "ALREADY_HIDDEN", (void *)NULL); return TCL_ERROR; } @@ -2383,7 +2383,7 @@ Tcl_ExposeCommand( Tcl_SetObjResult(interp, Tcl_NewStringObj( "cannot expose to a namespace (use expose to toplevel, then rename)", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "EXPOSE", "NON_GLOBAL", NULL); + Tcl_SetErrorCode(interp, "TCL", "EXPOSE", "NON_GLOBAL", (void *)NULL); return TCL_ERROR; } @@ -2400,7 +2400,7 @@ Tcl_ExposeCommand( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown hidden command \"%s\"", hiddenCmdToken)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "HIDDENTOKEN", - hiddenCmdToken, NULL); + hiddenCmdToken, (void *)NULL); return TCL_ERROR; } cmdPtr = (Command *)Tcl_GetHashValue(hPtr); @@ -2438,7 +2438,7 @@ Tcl_ExposeCommand( if (!isNew) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "exposed command \"%s\" already exists", cmdName)); - Tcl_SetErrorCode(interp, "TCL", "EXPOSE", "COMMAND_EXISTS", NULL); + Tcl_SetErrorCode(interp, "TCL", "EXPOSE", "COMMAND_EXISTS", (void *)NULL); return TCL_ERROR; } @@ -3118,7 +3118,7 @@ TclRenameCommand( "can't %s \"%s\": command doesn't exist", ((newName == NULL)||(*newName == '\0'))? "delete":"rename", oldName)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COMMAND", oldName, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COMMAND", oldName, (void *)NULL); return TCL_ERROR; } @@ -3149,7 +3149,7 @@ TclRenameCommand( if ((newNsPtr == NULL) || (newTail == NULL)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't rename to \"%s\": bad command name", newName)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "COMMAND", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "COMMAND", (void *)NULL); result = TCL_ERROR; goto done; } @@ -3157,7 +3157,7 @@ TclRenameCommand( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't rename to \"%s\": command already exists", newName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "RENAME", - "TARGET_EXISTS", NULL); + "TARGET_EXISTS", (void *)NULL); result = TCL_ERROR; goto done; } @@ -4274,7 +4274,7 @@ Tcl_GetMathFuncInfo( if (cmdPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown math function \"%s\"", name)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "MATHFUNC", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "MATHFUNC", name, (void *)NULL); *numArgsPtr = -1; *argTypesPtr = NULL; *procPtr = NULL; @@ -4393,7 +4393,7 @@ TclInterpReady( Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to call eval in deleted interpreter", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TCL", "IDELETE", - "attempt to call eval in deleted interpreter", NULL); + "attempt to call eval in deleted interpreter", (void *)NULL); return TCL_ERROR; } @@ -4421,7 +4421,7 @@ TclInterpReady( Tcl_SetObjResult(interp, Tcl_NewStringObj( "too many nested evaluations (infinite loop?)", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "LIMIT", "STACK", NULL); + Tcl_SetErrorCode(interp, "TCL", "LIMIT", "STACK", (void *)NULL); return TCL_ERROR; } @@ -4555,7 +4555,7 @@ Tcl_Canceled( } Tcl_SetObjResult(interp, Tcl_NewStringObj(message, TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "CANCEL", id, message, NULL); + Tcl_SetErrorCode(interp, "TCL", "CANCEL", id, message, (void *)NULL); } /* @@ -4845,7 +4845,7 @@ EvalObjvCore( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "attempt to invoke a deleted command")); - Tcl_SetErrorCode(interp, "TCL", "EVAL", "DELETEDCOMMAND", NULL); + Tcl_SetErrorCode(interp, "TCL", "EVAL", "DELETEDCOMMAND", (void *)NULL); return TCL_ERROR; } } @@ -5244,7 +5244,7 @@ TEOV_NotFound( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid command name \"%s\"", TclGetString(objv[0]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COMMAND", - TclGetString(objv[0]), NULL); + TclGetString(objv[0]), (void *)NULL); /* * Release any resources we locked and allocated during the handler @@ -6853,7 +6853,7 @@ ProcessUnexpectedResult( "command returned bad code: %d", returnCode)); } snprintf(buf, sizeof(buf), "%d", returnCode); - Tcl_SetErrorCode(interp, "TCL", "UNEXPECTED_RESULT_CODE", buf, NULL); + Tcl_SetErrorCode(interp, "TCL", "UNEXPECTED_RESULT_CODE", buf, (void *)NULL); } /* @@ -7201,7 +7201,7 @@ TclNRInvoke( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid hidden command name \"%s\"", cmdName)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "HIDDENTOKEN", cmdName, - NULL); + (void *)NULL); return TCL_ERROR; } cmdPtr = (Command *)Tcl_GetHashValue(hPtr); @@ -7408,7 +7408,7 @@ Tcl_AddObjErrorInfo( iPtr->errorInfo = iPtr->objResultPtr; Tcl_IncrRefCount(iPtr->errorInfo); if (!iPtr->errorCode) { - Tcl_SetErrorCode(interp, "NONE", NULL); + Tcl_SetErrorCode(interp, "NONE", (void *)NULL); } } @@ -7845,7 +7845,7 @@ ExprIsqrtFunc( Tcl_SetObjResult(interp, Tcl_NewStringObj( "square root of negative argument", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", - "domain error: argument not in valid range", NULL); + "domain error: argument not in valid range", (void *)NULL); return TCL_ERROR; } @@ -8954,7 +8954,7 @@ MathFuncWrongNumArgs( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%s arguments for math function \"%s\"", (found < expected ? "not enough" : "too many"), name)); - Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", (void *)NULL); } #ifdef USE_DTRACE @@ -9375,7 +9375,7 @@ TclNRTailcallObjCmd( if (!(iPtr->varFramePtr->isProcCallFrame & 1)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "tailcall can only be called from a proc, lambda or method", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", NULL); + Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", (void *)NULL); return TCL_ERROR; } @@ -9537,7 +9537,7 @@ TclNRYieldObjCmd( if (!corPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "yield can only be called in a coroutine", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ILLEGAL_YIELD", NULL); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ILLEGAL_YIELD", (void *)NULL); return TCL_ERROR; } @@ -9570,7 +9570,7 @@ TclNRYieldToObjCmd( if (!corPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "yieldto can only be called in a coroutine", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ILLEGAL_YIELD", NULL); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ILLEGAL_YIELD", (void *)NULL); return TCL_ERROR; } @@ -9578,7 +9578,7 @@ TclNRYieldToObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "yieldto called in deleted namespace", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "YIELDTO_IN_DELETED", - NULL); + (void *)NULL); return TCL_ERROR; } @@ -9814,7 +9814,7 @@ TclNRCoroutineActivateCallback( Tcl_SetObjResult(interp, Tcl_NewStringObj( "cannot yield: C stack busy", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "CANT_YIELD", - NULL); + (void *)NULL); return TCL_ERROR; } @@ -9903,7 +9903,7 @@ CoroTypeObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "can only get coroutine type of a coroutine", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COROUTINE", - TclGetString(objv[1]), NULL); + TclGetString(objv[1]), (void *)NULL); return TCL_ERROR; } @@ -9933,7 +9933,7 @@ CoroTypeObjCmd( default: Tcl_SetObjResult(interp, Tcl_NewStringObj( "unknown coroutine type", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "BAD_TYPE", NULL); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "BAD_TYPE", (void *)NULL); return TCL_ERROR; } } @@ -9963,7 +9963,7 @@ GetCoroutineFromObj( if ((!cmdPtr) || (cmdPtr->nreProc != TclNRInterpCoroutine)) { Tcl_SetObjResult(interp, Tcl_NewStringObj(errMsg, TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COROUTINE", - TclGetString(objPtr), NULL); + TclGetString(objPtr), (void *)NULL); return NULL; } return (CoroutineData *)cmdPtr->objClientData; @@ -9996,7 +9996,7 @@ TclNRCoroInjectObjCmd( if (!COR_IS_SUSPENDED(corPtr)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can only inject a command into a suspended coroutine", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ACTIVE", NULL); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ACTIVE", (void *)NULL); return TCL_ERROR; } @@ -10042,7 +10042,7 @@ TclNRCoroProbeObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "can only inject a probe command into a suspended coroutine", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ACTIVE", NULL); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ACTIVE", (void *)NULL); return TCL_ERROR; } @@ -10233,7 +10233,7 @@ NRInjectObjCmd( if (!COR_IS_SUSPENDED(corPtr)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can only inject a command into a suspended coroutine", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ACTIVE", NULL); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ACTIVE", (void *)NULL); return TCL_ERROR; } @@ -10263,7 +10263,7 @@ TclNRInterpCoroutine( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "coroutine \"%s\" is already running", TclGetString(objv[0]))); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "BUSY", NULL); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "BUSY", (void *)NULL); return TCL_ERROR; } @@ -10287,7 +10287,7 @@ TclNRInterpCoroutine( Tcl_SetObjResult(interp, Tcl_NewStringObj("wrong coro nargs; how did we get here? " "not implemented!", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", (void *)NULL); return TCL_ERROR; } /* fallthrough */ @@ -10341,14 +10341,14 @@ TclNRCoroutineObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't create procedure \"%s\": unknown namespace", procName)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "NAMESPACE", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "NAMESPACE", (void *)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", procName, NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "COMMAND", procName, (void *)NULL); return TCL_ERROR; } diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 9c47dd4..9b59ee7 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -440,7 +440,7 @@ Tcl_GetBytesFromObj( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected byte sequence but character %d " "was '%1s' (U+%06X)", baPtr->bad, nonbyte, ucs4)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "BYTES", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "BYTES", (void *)NULL); } return NULL; } @@ -2658,7 +2658,7 @@ BinaryDecodeHex( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid hexadecimal digit \"%c\" (U+%06X) at position %d", ucs4, ucs4, (int) (data - datastart - 1))); - Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "INVALID", NULL); + Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "INVALID", (void *)NULL); return TCL_ERROR; } @@ -2726,7 +2726,7 @@ BinaryEncode64( Tcl_SetObjResult(interp, Tcl_NewStringObj( "line length out of range", -1)); Tcl_SetErrorCode(interp, "TCL", "BINARY", "ENCODE", - "LINE_LENGTH", NULL); + "LINE_LENGTH", (void *)NULL); return TCL_ERROR; } break; @@ -2851,7 +2851,7 @@ BinaryEncodeUu( Tcl_SetObjResult(interp, Tcl_NewStringObj( "line length out of range", -1)); Tcl_SetErrorCode(interp, "TCL", "BINARY", "ENCODE", - "LINE_LENGTH", NULL); + "LINE_LENGTH", (void *)NULL); return TCL_ERROR; } lineLength = ((lineLength - 1) & -4) + 1; /* 5, 9, 13 ... */ @@ -2880,7 +2880,7 @@ BinaryEncodeUu( "invalid wrapchar; will defeat decoding", -1)); Tcl_SetErrorCode(interp, "TCL", "BINARY", - "ENCODE", "WRAPCHAR", NULL); + "ENCODE", "WRAPCHAR", (void *)NULL); return TCL_ERROR; } } @@ -3101,7 +3101,7 @@ BinaryDecodeUu( shortUu: Tcl_SetObjResult(interp, Tcl_ObjPrintf("short uuencode data")); - Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "SHORT", NULL); + Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "SHORT", (void *)NULL); TclDecrRefCount(resultObj); return TCL_ERROR; @@ -3114,7 +3114,7 @@ BinaryDecodeUu( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid uuencode character \"%c\" (U+%06X) at position %d", ucs4, ucs4, (int) (data - datastart - 1))); - Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "INVALID", NULL); + Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "INVALID", (void *)NULL); TclDecrRefCount(resultObj); return TCL_ERROR; } @@ -3289,7 +3289,7 @@ BinaryDecode64( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid base64 character \"%c\" (U+%06X) at position %d", ucs4, ucs4, (int) (data - datastart - 1))); - Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "INVALID", NULL); + Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "INVALID", (void *)NULL); TclDecrRefCount(resultObj); return TCL_ERROR; } diff --git a/generic/tclClock.c b/generic/tclClock.c index 15256e8..ab6d23f 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -1045,7 +1045,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", (void *)NULL); return TCL_ERROR; } TzsetIfNecessary(); @@ -1054,7 +1054,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", (void *)NULL); return TCL_ERROR; } @@ -1905,7 +1905,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", (void *)NULL); return TCL_ERROR; } @@ -1920,7 +1920,7 @@ ClockParseformatargsObjCmd( if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, &optionIndex) != TCL_OK) { Tcl_SetErrorCode(interp, "CLOCK", "badOption", - TclGetString(objv[i]), NULL); + TclGetString(objv[i]), (void *)NULL); return TCL_ERROR; } switch (optionIndex) { @@ -1952,7 +1952,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", (void *)NULL); return TCL_ERROR; } if (gmtFlag) { diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index c983109..12216d4 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -875,7 +875,7 @@ EncodingDirsObjCmd( "expected directory list but got \"%s\"", TclGetString(dirListObj))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "ENCODING", "BADPATH", - NULL); + (void *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, dirListObj); @@ -2068,7 +2068,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]), (void *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, fsInfo); @@ -2218,7 +2218,7 @@ PathSplitCmd( "could not read \"%s\": no such file or directory", TclGetString(objv[1]))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PATHSPLIT", "NONESUCH", - NULL); + (void *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, res); @@ -2320,7 +2320,7 @@ FilesystemSeparatorCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "unrecognised path", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "FILESYSTEM", - TclGetString(objv[1]), NULL); + TclGetString(objv[1]), (void *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, separatorObj); @@ -2961,7 +2961,7 @@ EachloopCmd( (statePtr->resultList != NULL ? "lmap" : "foreach"))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", (statePtr->resultList != NULL ? "LMAP" : "FOREACH"), - "NEEDVARS", NULL); + "NEEDVARS", (void *)NULL); result = TCL_ERROR; goto done; } diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 9f4587c..8f7cbe6 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -225,7 +225,7 @@ TclNRIfObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "wrong # args: no expression after \"%s\" argument", TclGetString(objv[0]))); - Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", (void *)NULL); return TCL_ERROR; } @@ -316,7 +316,7 @@ IfConditionCallback( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "wrong # args: no expression after \"%s\" argument", clause)); - Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", (void *)NULL); return TCL_ERROR; } if (!thenScriptIndex) { @@ -343,7 +343,7 @@ IfConditionCallback( Tcl_SetObjResult(interp, Tcl_NewStringObj( "wrong # args: extra words after \"else\" clause in \"if\" command", -1)); - Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", (void *)NULL); return TCL_ERROR; } if (thenScriptIndex) { @@ -360,7 +360,7 @@ IfConditionCallback( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "wrong # args: no script following \"%s\" argument", TclGetString(objv[i-1]))); - Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", (void *)NULL); return TCL_ERROR; } @@ -489,7 +489,7 @@ InfoArgsCmd( if (procPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "\"%s\" isn't a procedure", name)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", name, (void *)NULL); return TCL_ERROR; } @@ -551,7 +551,7 @@ InfoBodyCmd( if (procPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "\"%s\" isn't a procedure", name)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", name, (void *)NULL); return TCL_ERROR; } @@ -972,7 +972,7 @@ InfoDefaultCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "\"%s\" isn't a procedure", procName)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", procName, - NULL); + (void *)NULL); return TCL_ERROR; } @@ -1005,7 +1005,7 @@ InfoDefaultCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "procedure \"%s\" doesn't have an argument \"%s\"", procName, argName)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARGUMENT", argName, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARGUMENT", argName, (void *)NULL); return TCL_ERROR; } @@ -1188,7 +1188,7 @@ InfoFrameCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad level \"%s\"", TclGetString(objv[1]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LEVEL", - TclGetString(objv[1]), NULL); + TclGetString(objv[1]), (void *)NULL); code = TCL_ERROR; goto done; } @@ -1550,7 +1550,7 @@ InfoHostnameCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "unable to determine name of host", -1)); - Tcl_SetErrorCode(interp, "TCL", "OPERATION", "HOSTNAME", "UNKNOWN", NULL); + Tcl_SetErrorCode(interp, "TCL", "OPERATION", "HOSTNAME", "UNKNOWN", (void *)NULL); return TCL_ERROR; } @@ -1623,7 +1623,7 @@ InfoLevelCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad level \"%s\"", TclGetString(objv[1]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LEVEL", - TclGetString(objv[1]), NULL); + TclGetString(objv[1]), (void *)NULL); return TCL_ERROR; } @@ -1670,7 +1670,7 @@ InfoLibraryCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "no library has been specified for Tcl", -1)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARIABLE", "tcl_library",NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARIABLE", "tcl_library", (void *)NULL); return TCL_ERROR; } @@ -2168,7 +2168,7 @@ InfoCmdTypeCmd( if (Tcl_IsSafe(interp) && (((Command *) command)->objProc == TclAliasObjCmd)) { - Tcl_AppendResult(interp, "native", NULL); + Tcl_AppendResult(interp, "native", (void *)NULL); } else { Tcl_SetObjResult(interp, Tcl_NewStringObj(TclGetCommandTypeName(command), -1)); @@ -2663,7 +2663,7 @@ Tcl_LpopObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "index \"end\" out of range", -1)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX" - "OUTOFRANGE", NULL); + "OUTOFRANGE", (void *)NULL); return TCL_ERROR; } elemPtr = elemPtrs[listLen - 1]; @@ -2967,7 +2967,7 @@ Tcl_LrepeatObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad count \"%" TCL_LL_MODIFIER "d\": must be integer >= 0", elementCount)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LREPEAT", "NEGARG", - NULL); + (void *)NULL); return TCL_ERROR; } @@ -2983,7 +2983,7 @@ Tcl_LrepeatObjCmd( if (elementCount && objc > LIST_MAX/elementCount) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "max length of a Tcl list (%" TCL_SIZE_MODIFIER "d elements) exceeded", LIST_MAX)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); return TCL_ERROR; } totalElems = objc * elementCount; @@ -3401,7 +3401,7 @@ Tcl_LsearchObjCmd( if (i > objc-4) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "missing starting index", -1)); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", (void *)NULL); result = TCL_ERROR; goto done; } @@ -3425,7 +3425,7 @@ Tcl_LsearchObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-stride\" option must be " "followed by stride length", -1)); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", (void *)NULL); result = TCL_ERROR; goto done; } @@ -3437,7 +3437,7 @@ Tcl_LsearchObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "stride length must be between 1 and %d", LIST_MAX)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSEARCH", - "BADSTRIDE", NULL); + "BADSTRIDE", (void *)NULL); result = TCL_ERROR; goto done; } @@ -3456,7 +3456,7 @@ Tcl_LsearchObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-index\" option must be followed by list index", -1)); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", (void *)NULL); result = TCL_ERROR; goto done; } @@ -3504,7 +3504,7 @@ Tcl_LsearchObjCmd( "index \"%s\" out of range", TclGetString(indices[j]))); Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX" - "OUTOFRANGE", NULL); + "OUTOFRANGE", (void *)NULL); result = TCL_ERROR; } if (result == TCL_ERROR) { @@ -3527,7 +3527,7 @@ Tcl_LsearchObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "-subindices cannot be used without -index option", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSEARCH", - "BAD_OPTION_MIX", NULL); + "BAD_OPTION_MIX", (void *)NULL); result = TCL_ERROR; goto done; } @@ -3536,7 +3536,7 @@ Tcl_LsearchObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "-bisect is not compatible with -all or -not", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSEARCH", - "BAD_OPTION_MIX", NULL); + "BAD_OPTION_MIX", (void *)NULL); result = TCL_ERROR; goto done; } @@ -3590,7 +3590,7 @@ Tcl_LsearchObjCmd( "list size must be a multiple of the stride length", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSEARCH", "BADSTRIDE", - NULL); + (void *)NULL); result = TCL_ERROR; goto done; } @@ -3606,7 +3606,7 @@ Tcl_LsearchObjCmd( "when used with \"-stride\", the leading \"-index\"" " value must be within the group", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSEARCH", - "BADINDEX", NULL); + "BADINDEX", (void *)NULL); result = TCL_ERROR; goto done; } @@ -4575,7 +4575,7 @@ Tcl_LsortObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-command\" option must be followed " "by comparison command", -1)); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", (void *)NULL); sortInfo.resultCode = TCL_ERROR; goto done; } @@ -4600,7 +4600,7 @@ Tcl_LsortObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-index\" option must be followed by list index", -1)); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", (void *)NULL); sortInfo.resultCode = TCL_ERROR; goto done; } @@ -4628,7 +4628,7 @@ Tcl_LsortObjCmd( "index \"%s\" out of range", TclGetString(indexv[j]))); Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX" - "OUTOFRANGE", NULL); + "OUTOFRANGE", (void *)NULL); result = TCL_ERROR; } if (result == TCL_ERROR) { @@ -4662,7 +4662,7 @@ Tcl_LsortObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-stride\" option must be " "followed by stride length", -1)); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", (void *)NULL); sortInfo.resultCode = TCL_ERROR; goto done; } @@ -4674,7 +4674,7 @@ Tcl_LsortObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "stride length must be between 2 and %d", LIST_MAX)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSORT", - "BADSTRIDE", NULL); + "BADSTRIDE", (void *)NULL); sortInfo.resultCode = TCL_ERROR; goto done; } @@ -4780,7 +4780,7 @@ Tcl_LsortObjCmd( "list size must be a multiple of the stride length", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSORT", "BADSTRIDE", - NULL); + (void *)NULL); sortInfo.resultCode = TCL_ERROR; goto done; } @@ -4797,7 +4797,7 @@ Tcl_LsortObjCmd( "when used with \"-stride\", the leading \"-index\"" " value must be within the group", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSORT", - "BADINDEX", NULL); + "BADINDEX", (void *)NULL); sortInfo.resultCode = TCL_ERROR; goto done; } @@ -4859,7 +4859,7 @@ Tcl_LsortObjCmd( if (!elementArray) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "no enough memory to proccess sort of %d items", length)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); sortInfo.resultCode = TCL_ERROR; goto done; } @@ -5323,7 +5323,7 @@ SortCompare( Tcl_SetObjResult(infoPtr->interp, Tcl_NewStringObj( "-compare command returned non-integer result", -1)); Tcl_SetErrorCode(infoPtr->interp, "TCL", "OPERATION", "LSORT", - "COMPARISONFAILED", NULL); + "COMPARISONFAILED", (void *)NULL); infoPtr->resultCode = TCL_ERROR; return 0; } @@ -5539,7 +5539,7 @@ SelectObjFromSublist( index, TclGetString(objPtr))); } Tcl_SetErrorCode(infoPtr->interp, "TCL", "OPERATION", "LSORT", - "INDEXFAILED", NULL); + "INDEXFAILED", (void *)NULL); infoPtr->resultCode = TCL_ERROR; return NULL; } diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 32ed560..a2d7372 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -232,7 +232,7 @@ Tcl_RegexpObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "regexp match variables not allowed when using -inline", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "REGEXP", - "MIX_VAR_INLINE", NULL); + "MIX_VAR_INLINE", (void *)NULL); goto optionError; } @@ -687,7 +687,7 @@ Tcl_RegsubObjCmd( "command prefix must be a list of at least one element", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "REGSUB", - "CMDEMPTY", NULL); + "CMDEMPTY", (void *)NULL); return TCL_ERROR; } regExpr = Tcl_GetRegExpFromObj(interp, objv[0], cflags); @@ -1985,7 +1985,7 @@ StringMapCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad option \"%s\": must be -nocase", string)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", "option", - string, NULL); + string, (void *)NULL); return TCL_ERROR; } } @@ -2050,7 +2050,7 @@ StringMapCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj("char map list unbalanced", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "MAP", - "UNBALANCED", NULL); + "UNBALANCED", (void *)NULL); return TCL_ERROR; } } @@ -2255,7 +2255,7 @@ StringMatchCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad option \"%s\": must be -nocase", string)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", "option", - string, NULL); + string, (void *)NULL); return TCL_ERROR; } } @@ -2677,7 +2677,7 @@ StringEqualCmd( "bad option \"%s\": must be -nocase or -length", string2)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", "option", - string2, NULL); + string2, (void *)NULL); return TCL_ERROR; } } @@ -2782,7 +2782,7 @@ StringCmpOpts( "bad option \"%s\": must be -nocase or -length", string)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", "option", - string, NULL); + string, (void *)NULL); return TCL_ERROR; } } @@ -3554,7 +3554,7 @@ TclNRSwitchObjCmd( "bad option \"%s\": %s option already found", TclGetString(objv[i]), options[mode])); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SWITCH", - "DOUBLEOPT", NULL); + "DOUBLEOPT", (void *)NULL); return TCL_ERROR; } foundmode = 1; @@ -3573,7 +3573,7 @@ TclNRSwitchObjCmd( "missing variable name argument to %s option", "-indexvar")); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SWITCH", - "NOVAR", NULL); + "NOVAR", (void *)NULL); return TCL_ERROR; } indexVarObj = objv[i]; @@ -3586,7 +3586,7 @@ TclNRSwitchObjCmd( "missing variable name argument to %s option", "-matchvar")); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SWITCH", - "NOVAR", NULL); + "NOVAR", (void *)NULL); return TCL_ERROR; } matchVarObj = objv[i]; @@ -3605,14 +3605,14 @@ TclNRSwitchObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%s option requires -regexp option", "-indexvar")); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SWITCH", - "MODERESTRICTION", NULL); + "MODERESTRICTION", (void *)NULL); return TCL_ERROR; } if (matchVarObj != NULL && mode != OPT_REGEXP) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%s option requires -regexp option", "-matchvar")); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SWITCH", - "MODERESTRICTION", NULL); + "MODERESTRICTION", (void *)NULL); return TCL_ERROR; } @@ -3665,7 +3665,7 @@ TclNRSwitchObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "extra switch pattern with no body", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SWITCH", "BADARM", - NULL); + (void *)NULL); /* * Check if this can be due to a badly placed comment in the switch @@ -3683,7 +3683,7 @@ TclNRSwitchObjCmd( " placed outside of a switch body - see the" " \"switch\" documentation", -1); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SWITCH", - "BADARM", "COMMENT?", NULL); + "BADARM", "COMMENT?", (void *)NULL); break; } } @@ -3702,7 +3702,7 @@ TclNRSwitchObjCmd( "no body specified for pattern \"%s\"", TclGetString(objv[objc-2]))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SWITCH", "BADARM", - "FALLTHROUGH", NULL); + "FALLTHROUGH", (void *)NULL); return TCL_ERROR; } @@ -4033,7 +4033,7 @@ Tcl_ThrowObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "type must be non-empty list", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "THROW", "BADEXCEPTION", - NULL); + (void *)NULL); return TCL_ERROR; } @@ -4772,7 +4772,7 @@ TclNRTryObjCmd( "finally clause must be last", -1)); Tcl_DecrRefCount(handlersObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRY", "FINALLY", - "NONTERMINAL", NULL); + "NONTERMINAL", (void *)NULL); return TCL_ERROR; } else if (i == objc-1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( @@ -4780,7 +4780,7 @@ TclNRTryObjCmd( " \"... finally script\"", -1)); Tcl_DecrRefCount(handlersObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRY", "FINALLY", - "ARGUMENT", NULL); + "ARGUMENT", (void *)NULL); return TCL_ERROR; } finallyObj = objv[++i]; @@ -4793,7 +4793,7 @@ TclNRTryObjCmd( " variableList script\"", -1)); Tcl_DecrRefCount(handlersObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRY", "ON", - "ARGUMENT", NULL); + "ARGUMENT", (void *)NULL); return TCL_ERROR; } if (TclGetCompletionCodeFromObj(interp, objv[i+1], @@ -4812,7 +4812,7 @@ TclNRTryObjCmd( -1)); Tcl_DecrRefCount(handlersObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRY", "TRAP", - "ARGUMENT", NULL); + "ARGUMENT", (void *)NULL); return TCL_ERROR; } code = 1; @@ -4822,7 +4822,7 @@ TclNRTryObjCmd( TclGetString(objv[i+1]))); Tcl_DecrRefCount(handlersObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRY", "TRAP", - "EXNFORMAT", NULL); + "EXNFORMAT", (void *)NULL); return TCL_ERROR; } info[2] = objv[i+1]; @@ -4854,7 +4854,7 @@ TclNRTryObjCmd( "last non-finally clause must not have a body of \"-\"", -1)); Tcl_DecrRefCount(handlersObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRY", "BADFALLTHROUGH", - NULL); + (void *)NULL); return TCL_ERROR; } if (!haveHandlers) { diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 3a05621..e97c552 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -1479,7 +1479,7 @@ ParseExpr( parsePtr->string, (numBytes < limit) ? "" : "...")); if (errCode) { Tcl_SetErrorCode(interp, "TCL", "PARSE", "EXPR", errCode, - subErrCode, NULL); + subErrCode, (void *)NULL); } } diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 22bc2d3..7ca9e77 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -2178,7 +2178,7 @@ TclCompileScript( if (iPtr->numLevels / 5 > iPtr->maxNestingDepth / 4) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "too many nested compilations (infinite loop?)", -1)); - Tcl_SetErrorCode(interp, "TCL", "LIMIT", "STACK", NULL); + Tcl_SetErrorCode(interp, "TCL", "LIMIT", "STACK", (void *)NULL); TclCompileSyntaxError(interp, envPtr); return; } diff --git a/generic/tclConfig.c b/generic/tclConfig.c index 36d37ec..28853a1 100644 --- a/generic/tclConfig.c +++ b/generic/tclConfig.c @@ -229,7 +229,7 @@ QueryConfigObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj("package not known", -1)); Tcl_SetErrorCode(interp, "TCL", "FATAL", "PKGCFG_BASE", - TclGetString(pkgName), NULL); + TclGetString(pkgName), (void *)NULL); return TCL_ERROR; } @@ -244,7 +244,7 @@ QueryConfigObjCmd( || val == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("key not known", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CONFIG", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } @@ -277,7 +277,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", (void *)NULL); return TCL_ERROR; } diff --git a/generic/tclDate.c b/generic/tclDate.c index 674f4a0..44d45f9 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2794,12 +2794,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", (void *)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", (void *)NULL); return TCL_ERROR; } else if (status != 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj("Unknown status returned " @@ -2807,7 +2807,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", (void *)NULL); return TCL_ERROR; } Tcl_DecrRefCount(dateInfo.messages); @@ -2815,31 +2815,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", (void *)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", (void *)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", (void *)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", (void *)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", (void *)NULL); return TCL_ERROR; } diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 78eba87..4e42d31 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -106,7 +106,7 @@ EXTERN int Tcl_WaitForEvent(const Tcl_Time *timePtr); EXTERN int Tcl_AppendAllObjTypes(Tcl_Interp *interp, Tcl_Obj *objPtr); /* 15 */ -EXTERN void Tcl_AppendStringsToObj(Tcl_Obj *objPtr, ...); +EXTERN void Tcl_AppendStringsToObj(Tcl_Obj *objPtr, ...) __attribute__((sentinel)); /* 16 */ EXTERN void Tcl_AppendToObj(Tcl_Obj *objPtr, const char *bytes, Tcl_Size length); @@ -268,7 +268,7 @@ EXTERN void Tcl_AllowExceptions(Tcl_Interp *interp); EXTERN void Tcl_AppendElement(Tcl_Interp *interp, const char *element); /* 70 */ -EXTERN void Tcl_AppendResult(Tcl_Interp *interp, ...); +EXTERN void Tcl_AppendResult(Tcl_Interp *interp, ...) __attribute__((sentinel)); /* 71 */ EXTERN Tcl_AsyncHandler Tcl_AsyncCreate(Tcl_AsyncProc *proc, void *clientData); @@ -715,7 +715,7 @@ EXTERN int Tcl_SetCommandInfo(Tcl_Interp *interp, /* 227 */ EXTERN void Tcl_SetErrno(int err); /* 228 */ -EXTERN void Tcl_SetErrorCode(Tcl_Interp *interp, ...); +EXTERN void Tcl_SetErrorCode(Tcl_Interp *interp, ...) __attribute__((sentinel)); /* 229 */ EXTERN void Tcl_SetMaxBlockTime(const Tcl_Time *timePtr); /* 230 */ @@ -820,7 +820,7 @@ EXTERN int Tcl_UpVar2(Tcl_Interp *interp, const char *frameName, const char *part1, const char *part2, const char *localName, int flags); /* 260 */ -EXTERN int Tcl_VarEval(Tcl_Interp *interp, ...); +EXTERN int Tcl_VarEval(Tcl_Interp *interp, ...) __attribute__((sentinel)); /* 261 */ TCL_DEPRECATED("No longer in use, changed to macro") void * Tcl_VarTraceInfo(Tcl_Interp *interp, diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 44ee1a9..9e0baea 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -727,7 +727,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", (void *)NULL); } errorInFindDictElement: DeleteChainTable(dict); @@ -822,7 +822,7 @@ TclTraceDictPath( "key \"%s\" not known in dictionary", TclGetString(keyv[i]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "DICT", - TclGetString(keyv[i]), NULL); + TclGetString(keyv[i]), (void *)NULL); } return NULL; } @@ -1614,7 +1614,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]), (void *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, valuePtr); @@ -2491,7 +2491,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", (void *)NULL); return TCL_ERROR; } searchPtr = (Tcl_DictSearch *)TclStackAlloc(interp, sizeof(Tcl_DictSearch)); @@ -2686,7 +2686,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", (void *)NULL); return TCL_ERROR; } storagePtr = (DictMapStorage *)TclStackAlloc(interp, sizeof(DictMapStorage)); @@ -3126,7 +3126,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", (void *)NULL); return TCL_ERROR; } keyVarObj = varv[0]; diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c index 08f7888..cc13ce9 100644 --- a/generic/tclDisassemble.c +++ b/generic/tclDisassemble.c @@ -1344,7 +1344,7 @@ Tcl_DisassembleObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "\"%s\" isn't a procedure", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROC", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } @@ -1394,7 +1394,7 @@ Tcl_DisassembleObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "\"%s\" is not a class", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CLASS", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } @@ -1404,7 +1404,7 @@ Tcl_DisassembleObjCmd( "\"%s\" has no defined constructor", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "DISASSEMBLE", - "CONSRUCTOR", NULL); + "CONSRUCTOR", (void *)NULL); return TCL_ERROR; } procPtr = TclOOGetProcFromMethod(methodPtr); @@ -1412,7 +1412,7 @@ Tcl_DisassembleObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "body not available for this kind of constructor", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "DISASSEMBLE", - "METHODTYPE", NULL); + "METHODTYPE", (void *)NULL); return TCL_ERROR; } @@ -1459,7 +1459,7 @@ Tcl_DisassembleObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "\"%s\" is not a class", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CLASS", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } @@ -1469,7 +1469,7 @@ Tcl_DisassembleObjCmd( "\"%s\" has no defined destructor", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "DISASSEMBLE", - "DESRUCTOR", NULL); + "DESRUCTOR", (void *)NULL); return TCL_ERROR; } procPtr = TclOOGetProcFromMethod(methodPtr); @@ -1477,7 +1477,7 @@ Tcl_DisassembleObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "body not available for this kind of destructor", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "DISASSEMBLE", - "METHODTYPE", NULL); + "METHODTYPE", (void *)NULL); return TCL_ERROR; } @@ -1524,7 +1524,7 @@ Tcl_DisassembleObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "\"%s\" is not a class", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CLASS", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } hPtr = Tcl_FindHashEntry(&oPtr->classPtr->classMethods, @@ -1559,7 +1559,7 @@ Tcl_DisassembleObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown method \"%s\"", TclGetString(objv[3]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[3]), NULL); + TclGetString(objv[3]), (void *)NULL); return TCL_ERROR; } procPtr = TclOOGetProcFromMethod((Method *)Tcl_GetHashValue(hPtr)); @@ -1567,7 +1567,7 @@ Tcl_DisassembleObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "body not available for this kind of method", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "DISASSEMBLE", - "METHODTYPE", NULL); + "METHODTYPE", (void *)NULL); return TCL_ERROR; } if (!TclHasInternalRep(procPtr->bodyPtr, &tclByteCodeType)) { @@ -1604,7 +1604,7 @@ Tcl_DisassembleObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "may not disassemble prebuilt bytecode", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "DISASSEMBLE", - "BYTECODE", NULL); + "BYTECODE", (void *)NULL); return TCL_ERROR; } if (clientData) { diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 80a37d2..e461db2 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -1292,7 +1292,7 @@ Tcl_ExternalToUtfDStringEx( Tcl_NewStringObj( "Parameter error: TCL_ENCODING_{START,STOP} bits set in flags.", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "ENCODING", "ILLEGALFLAGS", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENCODING", "ILLEGALFLAGS", (void *)NULL); errno = EINVAL; return TCL_ERROR; } @@ -1345,7 +1345,7 @@ Tcl_ExternalToUtfDStringEx( nBytesProcessed, UCHAR(srcStart[nBytesProcessed]))); Tcl_SetErrorCode( - interp, "TCL", "ENCODING", "ILLEGALSEQUENCE", buf, NULL); + interp, "TCL", "ENCODING", "ILLEGALSEQUENCE", buf, (void *)NULL); } } if (result != TCL_OK) { @@ -1596,7 +1596,7 @@ Tcl_UtfToExternalDStringEx( Tcl_NewStringObj( "Parameter error: TCL_ENCODING_{START,STOP} bits set in flags.", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "ENCODING", "ILLEGALFLAGS", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENCODING", "ILLEGALFLAGS", (void *)NULL); errno = EINVAL; return TCL_ERROR; } @@ -1651,7 +1651,7 @@ Tcl_UtfToExternalDStringEx( pos, ucs4)); Tcl_SetErrorCode(interp, "TCL", "ENCODING", "ILLEGALSEQUENCE", - buf, NULL); + buf, (void *)NULL); } } if (result != TCL_OK) { @@ -1900,7 +1900,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, (void *)NULL); } Tcl_DecrRefCount(fileNameObj); Tcl_DecrRefCount(nameObj); @@ -1975,7 +1975,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, (void *)NULL); } Tcl_Close(NULL, chan); @@ -4451,14 +4451,14 @@ TclEncodingProfileNameToId( profileName); for (i = 0; i < (numProfiles - 1); ++i) { Tcl_AppendStringsToObj( - errorObj, " ", encodingProfiles[i].name, ",", NULL); + errorObj, " ", encodingProfiles[i].name, ",", (void *)NULL); } Tcl_AppendStringsToObj( - errorObj, " or ", encodingProfiles[numProfiles-1].name, NULL); + errorObj, " or ", encodingProfiles[numProfiles-1].name, (void *)NULL); Tcl_SetObjResult(interp, errorObj); Tcl_SetErrorCode( - interp, "TCL", "ENCODING", "PROFILE", profileName, NULL); + interp, "TCL", "ENCODING", "PROFILE", profileName, (void *)NULL); } return TCL_ERROR; } @@ -4497,7 +4497,7 @@ TclEncodingProfileIdToName( "Internal error. Bad profile id \"%d\".", profileValue)); Tcl_SetErrorCode( - interp, "TCL", "ENCODING", "PROFILEID", NULL); + interp, "TCL", "ENCODING", "PROFILEID", (void *)NULL); } return NULL; } diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 37531fc..cdc13af 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -171,7 +171,7 @@ TclNamespaceEnsembleCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "tried to manipulate ensemble of deleted namespace", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "DEAD", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "DEAD", (void *)NULL); } return TCL_ERROR; } @@ -289,7 +289,7 @@ TclNamespaceEnsembleCmd( "ensemble subcommand implementations " "must be non-empty lists", -1)); Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", - "EMPTY_TARGET", NULL); + "EMPTY_TARGET", (void *)NULL); Tcl_DictObjDone(&search); if (patchedDict) { Tcl_DecrRefCount(patchedDict); @@ -305,7 +305,7 @@ TclNamespaceEnsembleCmd( Tcl_Obj *newCmd = NewNsObj((Tcl_Namespace *) nsPtr); if (nsPtr->parentPtr) { - Tcl_AppendStringsToObj(newCmd, "::", NULL); + Tcl_AppendStringsToObj(newCmd, "::", (void *)NULL); } Tcl_AppendObjToObj(newCmd, listv[0]); Tcl_ListObjReplace(NULL, newList, 0, 1, 1, &newCmd); @@ -575,7 +575,7 @@ TclNamespaceEnsembleCmd( "ensemble subcommand implementations " "must be non-empty lists", -1)); Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", - "EMPTY_TARGET", NULL); + "EMPTY_TARGET", (void *)NULL); Tcl_DictObjDone(&search); if (patchedDict) { Tcl_DecrRefCount(patchedDict); @@ -596,7 +596,7 @@ TclNamespaceEnsembleCmd( Tcl_Obj *newCmd = NewNsObj((Tcl_Namespace*)nsPtr); if (nsPtr->parentPtr) { - Tcl_AppendStringsToObj(newCmd, "::", NULL); + Tcl_AppendStringsToObj(newCmd, "::", (void *)NULL); } Tcl_AppendObjToObj(newCmd, listv[0]); Tcl_ListObjReplace(NULL, newList, 0, 1, 1, @@ -623,7 +623,7 @@ TclNamespaceEnsembleCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "option -namespace is read-only", -1)); Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "READ_ONLY", - NULL); + (void *)NULL); goto freeMapAndError; case CONF_PREFIX: if (Tcl_GetBooleanFromObj(interp, objv[1], @@ -795,7 +795,7 @@ Tcl_SetEnsembleSubcommandList( if (cmdPtr->objProc != TclEnsembleImplementationCmd) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "command is not an ensemble", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", (void *)NULL); return TCL_ERROR; } if (subcmdList != NULL) { @@ -871,7 +871,7 @@ Tcl_SetEnsembleParameterList( if (cmdPtr->objProc != TclEnsembleImplementationCmd) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "command is not an ensemble", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", (void *)NULL); return TCL_ERROR; } if (paramList == NULL) { @@ -947,7 +947,7 @@ Tcl_SetEnsembleMappingDict( if (cmdPtr->objProc != TclEnsembleImplementationCmd) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "command is not an ensemble", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", (void *)NULL); return TCL_ERROR; } if (mapDict != NULL) { @@ -975,7 +975,7 @@ Tcl_SetEnsembleMappingDict( "ensemble target is not a fully-qualified command", -1)); Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", - "UNQUALIFIED_TARGET", NULL); + "UNQUALIFIED_TARGET", (void *)NULL); Tcl_DictObjDone(&search); return TCL_ERROR; } @@ -1047,7 +1047,7 @@ Tcl_SetEnsembleUnknownHandler( if (cmdPtr->objProc != TclEnsembleImplementationCmd) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "command is not an ensemble", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", (void *)NULL); return TCL_ERROR; } if (unknownList != NULL) { @@ -1113,7 +1113,7 @@ Tcl_SetEnsembleFlags( if (cmdPtr->objProc != TclEnsembleImplementationCmd) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "command is not an ensemble", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", (void *)NULL); return TCL_ERROR; } @@ -1190,7 +1190,7 @@ Tcl_GetEnsembleSubcommandList( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "command is not an ensemble", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", (void *)NULL); } return TCL_ERROR; } @@ -1232,7 +1232,7 @@ Tcl_GetEnsembleParameterList( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "command is not an ensemble", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", (void *)NULL); } return TCL_ERROR; } @@ -1274,7 +1274,7 @@ Tcl_GetEnsembleMappingDict( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "command is not an ensemble", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", (void *)NULL); } return TCL_ERROR; } @@ -1315,7 +1315,7 @@ Tcl_GetEnsembleUnknownHandler( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "command is not an ensemble", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", (void *)NULL); } return TCL_ERROR; } @@ -1356,7 +1356,7 @@ Tcl_GetEnsembleFlags( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "command is not an ensemble", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", (void *)NULL); } return TCL_ERROR; } @@ -1397,7 +1397,7 @@ Tcl_GetEnsembleNamespace( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "command is not an ensemble", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", (void *)NULL); } return TCL_ERROR; } @@ -1458,7 +1458,7 @@ Tcl_FindEnsemble( "\"%s\" is not an ensemble command", TclGetString(cmdNameObj))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ENSEMBLE", - TclGetString(cmdNameObj), NULL); + TclGetString(cmdNameObj), (void *)NULL); } return NULL; } @@ -1751,7 +1751,7 @@ NsEnsembleImplementationCmdNR( if (!Tcl_InterpDeleted(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "ensemble activated for deleted namespace", -1)); - Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "DEAD", NULL); + Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "DEAD", (void *)NULL); } return TCL_ERROR; } @@ -1964,7 +1964,7 @@ NsEnsembleImplementationCmdNR( Tcl_ResetResult(interp); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "SUBCOMMAND", - TclGetString(subObj), NULL); + TclGetString(subObj), (void *)NULL); if (ensemblePtr->subcommandTable.numEntries == 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown subcommand \"%s\": namespace %s does not" @@ -2324,7 +2324,7 @@ EnsembleUnknownCallback( Tcl_SetObjResult(interp, Tcl_NewStringObj( "unknown subcommand handler deleted its ensemble", -1)); Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "UNKNOWN_DELETED", - NULL); + (void *)NULL); } result = TCL_ERROR; } @@ -2388,7 +2388,7 @@ EnsembleUnknownCallback( "ensemble unknown subcommand handler: "); Tcl_AppendObjToErrorInfo(interp, unknownCmd); Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "UNKNOWN_RESULT", - NULL); + (void *)NULL); } else { Tcl_AddErrorInfo(interp, "\n (ensemble unknown subcommand handler)"); @@ -2722,7 +2722,7 @@ BuildEnsembleConfig( Tcl_AppendStringsToObj(cmdObj, ensemblePtr->nsPtr->fullName, (ensemblePtr->nsPtr->parentPtr ? "::" : ""), - nsCmdName, NULL); + nsCmdName, (void *)NULL); cmdPrefixObj = Tcl_NewListObj(1, &cmdObj); Tcl_SetHashValue(hPtr, cmdPrefixObj); Tcl_IncrRefCount(cmdPrefixObj); diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 0cf0df1..cd1b5da 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -361,7 +361,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", (void *)NULL); return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, valuePtr, &level) == TCL_ERROR) { @@ -374,7 +374,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", (void *)NULL); return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, valuePtr, &code) == TCL_ERROR) { @@ -1579,7 +1579,7 @@ Tcl_VwaitObjCmd( Tcl_ResetResult(interp); Tcl_SetObjResult(interp, Tcl_ObjPrintf( "argument required for \"%s\"", vWaitOptionStrings[index])); - Tcl_SetErrorCode(interp, "TCL", "EVENT", "ARGUMENT", NULL); + Tcl_SetErrorCode(interp, "TCL", "EVENT", "ARGUMENT", (void *)NULL); result = TCL_ERROR; goto done; } @@ -1591,7 +1591,7 @@ Tcl_VwaitObjCmd( Tcl_ResetResult(interp); Tcl_SetObjResult(interp, Tcl_NewStringObj( "timeout must be positive", -1)); - Tcl_SetErrorCode(interp, "TCL", "EVENT", "NEGTIME", NULL); + Tcl_SetErrorCode(interp, "TCL", "EVENT", "NEGTIME", (void *)NULL); result = TCL_ERROR; goto done; } @@ -1671,7 +1671,7 @@ Tcl_VwaitObjCmd( TCL_TIMER_EVENTS | TCL_WINDOW_EVENTS)) == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't wait: would block forever", -1)); - Tcl_SetErrorCode(interp, "TCL", "EVENT", "NO_SOURCES", NULL); + Tcl_SetErrorCode(interp, "TCL", "EVENT", "NO_SOURCES", (void *)NULL); result = TCL_ERROR; goto done; } @@ -1679,7 +1679,7 @@ Tcl_VwaitObjCmd( if ((timeout > 0) && ((mask & TCL_TIMER_EVENTS) == 0)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "timer events disabled with timeout specified", -1)); - Tcl_SetErrorCode(interp, "TCL", "EVENT", "NO_TIME", NULL); + Tcl_SetErrorCode(interp, "TCL", "EVENT", "NO_TIME", (void *)NULL); result = TCL_ERROR; goto done; } @@ -1707,7 +1707,7 @@ Tcl_VwaitObjCmd( if (vwaitItems[i].mask) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "file events disabled with channel(s) specified", -1)); - Tcl_SetErrorCode(interp, "TCL", "EVENT", "NO_FILE_EVENT", NULL); + Tcl_SetErrorCode(interp, "TCL", "EVENT", "NO_FILE_EVENT", (void *)NULL); result = TCL_ERROR; goto done; } @@ -1746,7 +1746,7 @@ Tcl_VwaitObjCmd( if (Tcl_LimitExceeded(interp)) { Tcl_ResetResult(interp); Tcl_SetObjResult(interp, Tcl_NewStringObj("limit exceeded", -1)); - Tcl_SetErrorCode(interp, "TCL", "EVENT", "LIMIT", NULL); + Tcl_SetErrorCode(interp, "TCL", "EVENT", "LIMIT", (void *)NULL); break; } if ((numItems == 0) && (timeout == 0)) { @@ -1766,7 +1766,7 @@ Tcl_VwaitObjCmd( "can't wait: would wait forever" : "can't wait for variable(s)/channel(s): would wait forever", -1)); - Tcl_SetErrorCode(interp, "TCL", "EVENT", "NO_SOURCES", NULL); + Tcl_SetErrorCode(interp, "TCL", "EVENT", "NO_SOURCES", (void *)NULL); result = TCL_ERROR; goto done; } diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 22dc200..fd955f5 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -2434,7 +2434,7 @@ TEBCresume( "yield can only be called in a coroutine", -1)); DECACHE_STACK_INFO(); Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ILLEGAL_YIELD", - NULL); + (void *)NULL); CACHE_STACK_INFO(); goto gotError; } @@ -2465,7 +2465,7 @@ TEBCresume( "yieldto can only be called in a coroutine", -1)); DECACHE_STACK_INFO(); Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ILLEGAL_YIELD", - NULL); + (void *)NULL); CACHE_STACK_INFO(); goto gotError; } @@ -2476,7 +2476,7 @@ TEBCresume( "yieldto called in deleted namespace", -1)); DECACHE_STACK_INFO(); Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "YIELDTO_IN_DELETED", - NULL); + (void *)NULL); CACHE_STACK_INFO(); goto gotError; } @@ -2538,7 +2538,7 @@ TEBCresume( Tcl_SetObjResult(interp, Tcl_NewStringObj( "tailcall can only be called from a proc or lambda", -1)); DECACHE_STACK_INFO(); - Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", NULL); + Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", (void *)NULL); CACHE_STACK_INFO(); goto gotError; } @@ -4155,7 +4155,7 @@ TEBCresume( TclObjVarErrMsg(interp, part1Ptr, NULL, "array set", "variable isn't array", opnd); DECACHE_STACK_INFO(); - Tcl_SetErrorCode(interp, "TCL", "WRITE", "ARRAY", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRITE", "ARRAY", (void *)NULL); CACHE_STACK_INFO(); TRACE_ERROR(interp); goto gotError; @@ -4501,7 +4501,7 @@ TEBCresume( TRACE_ERROR(interp); DECACHE_STACK_INFO(); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "STACK_LEVEL", - TclGetString(OBJ_AT_TOS), NULL); + TclGetString(OBJ_AT_TOS), (void *)NULL); CACHE_STACK_INFO(); goto gotError; } @@ -4541,7 +4541,7 @@ TEBCresume( "invalid command name \"%s\"", TclGetString(OBJ_AT_TOS))); DECACHE_STACK_INFO(); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COMMAND", - TclGetString(OBJ_AT_TOS), NULL); + TclGetString(OBJ_AT_TOS), (void *)NULL); CACHE_STACK_INFO(); TRACE_APPEND(("ERROR: not command\n")); goto gotError; @@ -4570,7 +4570,7 @@ TEBCresume( "self may only be called from inside a method", -1)); DECACHE_STACK_INFO(); - Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", (void *)NULL); CACHE_STACK_INFO(); goto gotError; } @@ -4598,7 +4598,7 @@ TEBCresume( "nextto may only be called from inside a method", -1)); DECACHE_STACK_INFO(); - Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", (void *)NULL); CACHE_STACK_INFO(); goto gotError; } @@ -4619,7 +4619,7 @@ TEBCresume( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "\"%s\" is not a class", TclGetString(valuePtr))); DECACHE_STACK_INFO(); - Tcl_SetErrorCode(interp, "TCL", "OO", "CLASS_REQUIRED", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CLASS_REQUIRED", (void *)NULL); CACHE_STACK_INFO(); goto gotError; } @@ -4671,7 +4671,7 @@ TEBCresume( methodType, TclGetString(valuePtr))); DECACHE_STACK_INFO(); Tcl_SetErrorCode(interp, "TCL", "OO", "CLASS_NOT_REACHABLE", - NULL); + (void *)NULL); CACHE_STACK_INFO(); goto gotError; } @@ -4679,7 +4679,7 @@ TEBCresume( "%s has no non-filter implementation by \"%s\"", methodType, TclGetString(valuePtr))); DECACHE_STACK_INFO(); - Tcl_SetErrorCode(interp, "TCL", "OO", "CLASS_NOT_THERE", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CLASS_NOT_THERE", (void *)NULL); CACHE_STACK_INFO(); goto gotError; } @@ -4697,7 +4697,7 @@ TEBCresume( "next may only be called from inside a method", -1)); DECACHE_STACK_INFO(); - Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", (void *)NULL); CACHE_STACK_INFO(); goto gotError; } @@ -4726,7 +4726,7 @@ TEBCresume( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "no next %s implementation", methodType)); DECACHE_STACK_INFO(); - Tcl_SetErrorCode(interp, "TCL", "OO", "NOTHING_NEXT", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "NOTHING_NEXT", (void *)NULL); CACHE_STACK_INFO(); goto gotError; #ifdef TCL_COMPILE_DEBUG @@ -6062,7 +6062,7 @@ TEBCresume( DECACHE_STACK_INFO(); Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", "domain error: argument not in valid range", - NULL); + (void *)NULL); CACHE_STACK_INFO(); #endif /* ERROR_CODE_FOR_EARLY_DETECTED_ARITH_ERROR */ goto gotError; @@ -6111,7 +6111,7 @@ TEBCresume( DECACHE_STACK_INFO(); Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", "domain error: argument not in valid range", - NULL); + (void *)NULL); CACHE_STACK_INFO(); #endif /* ERROR_CODE_FOR_EARLY_DETECTED_ARITH_ERROR */ goto gotError; @@ -6133,7 +6133,7 @@ TEBCresume( #ifdef ERROR_CODE_FOR_EARLY_DETECTED_ARITH_ERROR DECACHE_STACK_INFO(); Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", - "integer value too large to represent", NULL); + "integer value too large to represent", (void *)NULL); CACHE_STACK_INFO(); #endif /* ERROR_CODE_FOR_EARLY_DETECTED_ARITH_ERROR */ goto gotError; @@ -7126,7 +7126,7 @@ TEBCresume( TclGetString(OBJ_AT_TOS))); DECACHE_STACK_INFO(); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "DICT", - TclGetString(OBJ_AT_TOS), NULL); + TclGetString(OBJ_AT_TOS), (void *)NULL); CACHE_STACK_INFO(); TRACE_ERROR(interp); goto gotError; @@ -7831,14 +7831,14 @@ TEBCresume( divideByZero: Tcl_SetObjResult(interp, Tcl_NewStringObj("divide by zero", -1)); DECACHE_STACK_INFO(); - Tcl_SetErrorCode(interp, "ARITH", "DIVZERO", "divide by zero", NULL); + Tcl_SetErrorCode(interp, "ARITH", "DIVZERO", "divide by zero", (void *)NULL); CACHE_STACK_INFO(); goto gotError; outOfMemory: Tcl_SetObjResult(interp, Tcl_NewStringObj("out of memory", -1)); DECACHE_STACK_INFO(); - Tcl_SetErrorCode(interp, "ARITH", "OUTOFMEMORY", "out of memory", NULL); + Tcl_SetErrorCode(interp, "ARITH", "OUTOFMEMORY", "out of memory", (void *)NULL); CACHE_STACK_INFO(); goto gotError; @@ -7852,7 +7852,7 @@ TEBCresume( "exponentiation of zero by negative power", -1)); DECACHE_STACK_INFO(); Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", - "exponentiation of zero by negative power", NULL); + "exponentiation of zero by negative power", (void *)NULL); CACHE_STACK_INFO(); /* @@ -9405,7 +9405,7 @@ IllegalExprOperandType( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't use %s \"%s\" as operand of \"%s\"", description, TclGetString(opndPtr), op)); - Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", description, NULL); + Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", description, (void *)NULL); } /* @@ -9783,23 +9783,23 @@ TclExprFloatError( if ((errno == EDOM) || isnan(value)) { s = "domain error: argument not in valid range"; Tcl_SetObjResult(interp, Tcl_NewStringObj(s, -1)); - Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", s, NULL); + Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", s, (void *)NULL); } else if ((errno == ERANGE) || isinf(value)) { if (value == 0.0) { s = "floating-point value too small to represent"; Tcl_SetObjResult(interp, Tcl_NewStringObj(s, -1)); - Tcl_SetErrorCode(interp, "ARITH", "UNDERFLOW", s, NULL); + Tcl_SetErrorCode(interp, "ARITH", "UNDERFLOW", s, (void *)NULL); } else { s = "floating-point value too large to represent"; Tcl_SetObjResult(interp, Tcl_NewStringObj(s, -1)); - Tcl_SetErrorCode(interp, "ARITH", "OVERFLOW", s, NULL); + Tcl_SetErrorCode(interp, "ARITH", "OVERFLOW", s, (void *)NULL); } } else { Tcl_Obj *objPtr = Tcl_ObjPrintf( "unknown floating-point error, errno = %d", errno); Tcl_SetErrorCode(interp, "ARITH", "UNKNOWN", - TclGetString(objPtr), NULL); + TclGetString(objPtr), (void *)NULL); Tcl_SetObjResult(interp, objPtr); } } diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index 1ad7e1a..8ca0c88 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", (void *)NULL); goto end; } @@ -1104,7 +1104,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", (void *)NULL); goto end; } @@ -1117,7 +1117,7 @@ TclFileAttrsCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "value for \"%s\" missing", TclGetString(objv[i]))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FATTR", - "NOVALUE", NULL); + "NOVALUE", (void *)NULL); goto end; } if (Tcl_FSFileAttrsSet(interp, index, filePtr, diff --git a/generic/tclFileName.c b/generic/tclFileName.c index f23b468..92d325f 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -1172,7 +1172,7 @@ DoTildeSubst( Tcl_SetObjResult(interp, Tcl_NewStringObj( "couldn't find HOME environment " "variable to expand path", -1)); - Tcl_SetErrorCode(interp, "TCL", "FILENAME", "NO_HOME", NULL); + Tcl_SetErrorCode(interp, "TCL", "FILENAME", "NO_HOME", (void *)NULL); } return NULL; } @@ -1183,7 +1183,7 @@ DoTildeSubst( Tcl_ResetResult(interp); Tcl_SetObjResult(interp, Tcl_ObjPrintf( "user \"%s\" doesn't exist", user)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "USER", user, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "USER", user, (void *)NULL); } return NULL; } @@ -1265,7 +1265,7 @@ Tcl_GlobObjCmd( if (i == (objc-1)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "missing argument to \"-directory\"", -1)); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", (void *)NULL); return TCL_ERROR; } if (dir != PATH_NONE) { @@ -1275,7 +1275,7 @@ Tcl_GlobObjCmd( : "\"-directory\" cannot be used with \"-path\"", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "GLOB", - "BADOPTIONCOMBINATION", NULL); + "BADOPTIONCOMBINATION", (void *)NULL); return TCL_ERROR; } dir = PATH_DIR; @@ -1293,7 +1293,7 @@ Tcl_GlobObjCmd( if (i == (objc-1)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "missing argument to \"-path\"", -1)); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", (void *)NULL); return TCL_ERROR; } if (dir != PATH_NONE) { @@ -1303,7 +1303,7 @@ Tcl_GlobObjCmd( : "\"-path\" cannot be used with \"-dictionary\"", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "GLOB", - "BADOPTIONCOMBINATION", NULL); + "BADOPTIONCOMBINATION", (void *)NULL); return TCL_ERROR; } dir = PATH_GENERAL; @@ -1314,7 +1314,7 @@ Tcl_GlobObjCmd( if (i == (objc-1)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "missing argument to \"-types\"", -1)); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", (void *)NULL); return TCL_ERROR; } typePtr = objv[i+1]; @@ -1335,7 +1335,7 @@ Tcl_GlobObjCmd( "\"-tails\" must be used with either " "\"-directory\" or \"-path\"", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "GLOB", - "BADOPTIONCOMBINATION", NULL); + "BADOPTIONCOMBINATION", (void *)NULL); return TCL_ERROR; } @@ -1548,7 +1548,7 @@ Tcl_GlobObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad argument to \"-types\": %s", Tcl_GetString(look))); - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "BAD", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "BAD", (void *)NULL); result = TCL_ERROR; join = 0; goto endOfGlob; @@ -1558,7 +1558,7 @@ Tcl_GlobObjCmd( "only one MacOS type or creator argument" " to \"-types\" allowed", -1)); result = TCL_ERROR; - Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "BAD", NULL); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "BAD", (void *)NULL); join = 0; goto endOfGlob; } @@ -1650,7 +1650,7 @@ Tcl_GlobObjCmd( Tcl_AppendToObj(errorMsg, "\"", -1); Tcl_SetObjResult(interp, errorMsg); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "GLOB", "NOMATCH", - NULL); + (void *)NULL); result = TCL_ERROR; } } @@ -2218,14 +2218,14 @@ DoGlob( Tcl_SetObjResult(interp, Tcl_NewStringObj( "unmatched open-brace in file name", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "GLOB", "BALANCE", - NULL); + (void *)NULL); return TCL_ERROR; } else if (*p == '}') { Tcl_SetObjResult(interp, Tcl_NewStringObj( "unmatched close-brace in file name", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "GLOB", "BALANCE", - NULL); + (void *)NULL); return TCL_ERROR; } } diff --git a/generic/tclIO.c b/generic/tclIO.c index 2e25d2d..d79397b 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -1468,7 +1468,7 @@ Tcl_GetChannel( if (hPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can not find channel named \"%s\"", chanName)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CHANNEL", chanName, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CHANNEL", chanName, (void *)NULL); return NULL; } @@ -9881,12 +9881,12 @@ CopyData( if (interp) { TclNewObj(errObj); Tcl_AppendStringsToObj(errObj, "error reading \"", - Tcl_GetChannelName(inChan), "\": ", NULL); + Tcl_GetChannelName(inChan), "\": ", (void *)NULL); if (msg != NULL) { Tcl_AppendObjToObj(errObj, msg); } else { Tcl_AppendStringsToObj(errObj, Tcl_PosixError(interp), - NULL); + (void *)NULL); } } if (msg != NULL) { @@ -9962,12 +9962,12 @@ CopyData( if (interp) { TclNewObj(errObj); Tcl_AppendStringsToObj(errObj, "error writing \"", - Tcl_GetChannelName(outChan), "\": ", NULL); + Tcl_GetChannelName(outChan), "\": ", (void *)NULL); if (msg != NULL) { Tcl_AppendObjToObj(errObj, msg); } else { Tcl_AppendStringsToObj(errObj, Tcl_PosixError(interp), - NULL); + (void *)NULL); } } if (msg != NULL) { diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 5a0a8da..938fa01 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -446,7 +446,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", (void *)NULL); return TCL_ERROR; #if !defined(TCL_NO_DEPRECATED) } diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 629c8cc..e342126 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -881,7 +881,7 @@ TclChanPostEventObjCmd( if (hPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can not find reflected channel named \"%s\"", chanId)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CHANNEL", chanId, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CHANNEL", chanId, (void *)NULL); return TCL_ERROR; } diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 2986949..2cb22f5 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -2051,7 +2051,7 @@ Tcl_PosixError( msg = Tcl_ErrnoMsg(errno); id = Tcl_ErrnoId(); if (interp) { - Tcl_SetErrorCode(interp, "POSIX", id, msg, NULL); + Tcl_SetErrorCode(interp, "POSIX", id, msg, (void *)NULL); } return msg; } diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 537a600..efa29eb 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -399,29 +399,29 @@ Tcl_GetIndexFromObjStruct( } Tcl_AppendStringsToObj(resultPtr, (numAbbrev>1 && !(flags & TCL_EXACT) ? "ambiguous " : "bad "), - msg, " \"", key, NULL); + msg, " \"", key, (void *)NULL); if (*entryPtr == NULL) { - Tcl_AppendStringsToObj(resultPtr, "\": no valid options", NULL); + Tcl_AppendStringsToObj(resultPtr, "\": no valid options", (void *)NULL); } else { Tcl_AppendStringsToObj(resultPtr, "\": must be ", - *entryPtr, NULL); + *entryPtr, (void *)NULL); entryPtr = NEXT_ENTRY(entryPtr, offset); while (*entryPtr != NULL) { if ((*NEXT_ENTRY(entryPtr, offset) == NULL) && !(flags & TCL_NULL_OK)) { Tcl_AppendStringsToObj(resultPtr, (count > 0 ? "," : ""), - " or ", *entryPtr, NULL); + " or ", *entryPtr, (void *)NULL); } else if (**entryPtr) { - Tcl_AppendStringsToObj(resultPtr, ", ", *entryPtr, NULL); + Tcl_AppendStringsToObj(resultPtr, ", ", *entryPtr, (void *)NULL); count++; } entryPtr = NEXT_ENTRY(entryPtr, offset); } if ((flags & TCL_NULL_OK)) { - Tcl_AppendStringsToObj(resultPtr, ", or \"\"", NULL); + Tcl_AppendStringsToObj(resultPtr, ", or \"\"", (void *)NULL); } } Tcl_SetObjResult(interp, resultPtr); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", msg, key, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", msg, key, (void *)NULL); } return TCL_ERROR; } @@ -599,7 +599,7 @@ PrefixMatchObjCmd( if (i > objc-4) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "missing value for -message", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "OPERATION", "NOARG", NULL); + Tcl_SetErrorCode(interp, "TCL", "OPERATION", "NOARG", (void *)NULL); return TCL_ERROR; } i++; @@ -609,7 +609,7 @@ PrefixMatchObjCmd( if (i > objc-4) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "missing value for -error", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "OPERATION", "NOARG", NULL); + Tcl_SetErrorCode(interp, "TCL", "OPERATION", "NOARG", (void *)NULL); return TCL_ERROR; } i++; @@ -621,7 +621,7 @@ PrefixMatchObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "error options must have an even number of elements", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "DICTIONARY", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DICTIONARY", (void *)NULL); return TCL_ERROR; } errorPtr = objv[i]; @@ -980,7 +980,7 @@ Tcl_WrongNumArgs( */ if (i + 1 < toPrint || objc!=0 || message!=NULL) { - Tcl_AppendStringsToObj(objPtr, " ", NULL); + Tcl_AppendStringsToObj(objPtr, " ", (void *)NULL); } } } @@ -1002,7 +1002,7 @@ Tcl_WrongNumArgs( if ((irPtr = TclFetchInternalRep(objv[i], &tclIndexType))) { IndexRep *indexRep = (IndexRep *)irPtr->twoPtrValue.ptr1; - Tcl_AppendStringsToObj(objPtr, EXPAND_OF(indexRep), NULL); + Tcl_AppendStringsToObj(objPtr, EXPAND_OF(indexRep), (void *)NULL); } else { /* * Quote the argument if it contains spaces (Bug 942757). @@ -1032,7 +1032,7 @@ Tcl_WrongNumArgs( */ if (i + 1 < objc || message!=NULL) { - Tcl_AppendStringsToObj(objPtr, " ", NULL); + Tcl_AppendStringsToObj(objPtr, " ", (void *)NULL); } } @@ -1043,10 +1043,10 @@ Tcl_WrongNumArgs( */ if (message != NULL) { - Tcl_AppendStringsToObj(objPtr, message, NULL); + Tcl_AppendStringsToObj(objPtr, message, (void *)NULL); } - Tcl_AppendStringsToObj(objPtr, "\"", NULL); - Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + Tcl_AppendStringsToObj(objPtr, "\"", (void *)NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", (void *)NULL); Tcl_SetObjResult(interp, objPtr); #undef MAY_QUOTE_WORD #undef AFTER_FIRST_WORD @@ -1463,7 +1463,7 @@ TclGetCompletionCodeFromObj( "bad completion code \"%s\": must be" " ok, error, return, break, continue, or an integer", TclGetString(value))); - Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_CODE", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_CODE", (void *)NULL); } return TCL_ERROR; } diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 31ecea0..ed3c527 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -869,7 +869,7 @@ NRInterpCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "cannot delete the current interpreter", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", - "DELETESELF", NULL); + "DELETESELF", (void *)NULL); return TCL_ERROR; } iiPtr = (InterpInfo *) ((Interp *) childInterp)->interpInfo; @@ -1113,7 +1113,7 @@ NRInterpCmd( "alias \"%s\" in path \"%s\" not found", aliasName, TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ALIAS", aliasName, - NULL); + (void *)NULL); return TCL_ERROR; } aliasPtr = (Alias *)Tcl_GetHashValue(hPtr); @@ -1122,7 +1122,7 @@ NRInterpCmd( "target interpreter for alias \"%s\" in path \"%s\" is " "not my descendant", aliasName, Tcl_GetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", - "TARGETSHROUDED", NULL); + "TARGETSHROUDED", (void *)NULL); return TCL_ERROR; } return TCL_OK; @@ -1302,7 +1302,7 @@ Tcl_GetAlias( if (hPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "alias \"%s\" not found", aliasName)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ALIAS", aliasName, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ALIAS", aliasName, (void *)NULL); return TCL_ERROR; } aliasPtr = (Alias *)Tcl_GetHashValue(hPtr); @@ -1364,7 +1364,7 @@ Tcl_GetAliasObj( if (hPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "alias \"%s\" not found", aliasName)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ALIAS", aliasName, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ALIAS", aliasName, (void *)NULL); return TCL_ERROR; } aliasPtr = (Alias *)Tcl_GetHashValue(hPtr); @@ -1471,7 +1471,7 @@ TclPreventAliasLoop( "cannot define or rename alias \"%s\": would create a loop", Tcl_GetCommandName(cmdInterp, cmd))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", - "ALIASLOOP", NULL); + "ALIASLOOP", (void *)NULL); return TCL_ERROR; } @@ -1692,7 +1692,7 @@ AliasDelete( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "alias \"%s\" not found", TclGetString(namePtr))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ALIAS", - TclGetString(namePtr), NULL); + TclGetString(namePtr), (void *)NULL); return TCL_ERROR; } aliasPtr = (Alias *)Tcl_GetHashValue(hPtr); @@ -2344,7 +2344,7 @@ GetInterp( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "could not find interpreter \"%s\"", TclGetString(pathPtr))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INTERP", - TclGetString(pathPtr), NULL); + TclGetString(pathPtr), (void *)NULL); } return searchInterp; } @@ -2382,7 +2382,7 @@ ChildBgerror( Tcl_SetObjResult(interp, Tcl_NewStringObj( "cmdPrefix must be list of length >= 1", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", - "BGERRORFORMAT", NULL); + "BGERRORFORMAT", (void *)NULL); return TCL_ERROR; } TclSetBgErrorHandler(childInterp, objv[0]); @@ -2954,7 +2954,7 @@ ChildExpose( "permission denied: safe interpreter cannot expose commands", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "UNSAFE", - NULL); + (void *)NULL); return TCL_ERROR; } @@ -2999,7 +2999,7 @@ ChildRecursionLimit( Tcl_SetObjResult(interp, Tcl_NewStringObj("permission denied: " "safe interpreters cannot change recursion limit", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "UNSAFE", - NULL); + (void *)NULL); return TCL_ERROR; } if (TclGetIntFromObj(interp, objv[0], &limit) == TCL_ERROR) { @@ -3009,7 +3009,7 @@ ChildRecursionLimit( Tcl_SetObjResult(interp, Tcl_NewStringObj( "recursion limit must be > 0", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "BADLIMIT", - NULL); + (void *)NULL); return TCL_ERROR; } Tcl_SetRecursionLimit(childInterp, limit); @@ -3017,7 +3017,7 @@ ChildRecursionLimit( if (interp == childInterp && iPtr->numLevels > limit) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "falling back due to new recursion limit", -1)); - Tcl_SetErrorCode(interp, "TCL", "RECURSION", NULL); + Tcl_SetErrorCode(interp, "TCL", "RECURSION", (void *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, objv[0]); @@ -3060,7 +3060,7 @@ ChildHide( "permission denied: safe interpreter cannot hide commands", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "UNSAFE", - NULL); + (void *)NULL); return TCL_ERROR; } @@ -3145,7 +3145,7 @@ ChildInvokeHidden( "not allowed to invoke hidden commands from safe interpreter", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "UNSAFE", - NULL); + (void *)NULL); return TCL_ERROR; } @@ -3222,7 +3222,7 @@ ChildMarkTrusted( "permission denied: safe interpreter cannot mark trusted", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "UNSAFE", - NULL); + (void *)NULL); return TCL_ERROR; } ((Interp *) childInterp)->flags &= ~SAFE_INTERP; @@ -3476,7 +3476,7 @@ Tcl_LimitCheck( } else if (iPtr->limit.exceeded & TCL_LIMIT_COMMANDS) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "command count limit exceeded", -1)); - Tcl_SetErrorCode(interp, "TCL", "LIMIT", "COMMANDS", NULL); + Tcl_SetErrorCode(interp, "TCL", "LIMIT", "COMMANDS", (void *)NULL); Tcl_Release(interp); return TCL_ERROR; } @@ -3502,7 +3502,7 @@ Tcl_LimitCheck( } else if (iPtr->limit.exceeded & TCL_LIMIT_TIME) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "time limit exceeded", -1)); - Tcl_SetErrorCode(interp, "TCL", "LIMIT", "TIME", NULL); + Tcl_SetErrorCode(interp, "TCL", "LIMIT", "TIME", (void *)NULL); Tcl_Release(interp); return TCL_ERROR; } @@ -4514,7 +4514,7 @@ ChildCommandLimitCmd( if (interp == childInterp) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "limits on current interpreter inaccessible", -1)); - Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "SELF", NULL); + Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "SELF", (void *)NULL); return TCL_ERROR; } @@ -4614,7 +4614,7 @@ ChildCommandLimitCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "granularity must be at least 1", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", - "BADVALUE", NULL); + "BADVALUE", (void *)NULL); return TCL_ERROR; } break; @@ -4631,7 +4631,7 @@ ChildCommandLimitCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "command limit value must be at least 0", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", - "BADVALUE", NULL); + "BADVALUE", (void *)NULL); return TCL_ERROR; } break; @@ -4703,7 +4703,7 @@ ChildTimeLimitCmd( if (interp == childInterp) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "limits on current interpreter inaccessible", -1)); - Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "SELF", NULL); + Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "SELF", (void *)NULL); return TCL_ERROR; } @@ -4824,7 +4824,7 @@ ChildTimeLimitCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "granularity must be at least 1", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", - "BADVALUE", NULL); + "BADVALUE", (void *)NULL); return TCL_ERROR; } break; @@ -4841,7 +4841,7 @@ ChildTimeLimitCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "milliseconds must be between 0 and %ld", LONG_MAX)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", - "BADVALUE", NULL); + "BADVALUE", (void *)NULL); return TCL_ERROR; } limitMoment.usec = ((long)tmp)*1000; @@ -4859,7 +4859,7 @@ ChildTimeLimitCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "seconds must be between 0 and %ld", LONG_MAX)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", - "BADVALUE", NULL); + "BADVALUE", (void *)NULL); return TCL_ERROR; } limitMoment.sec = (long)tmp; @@ -4878,7 +4878,7 @@ ChildTimeLimitCmd( "may only set -milliseconds if -seconds is not " "also being reset", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", - "BADUSAGE", NULL); + "BADUSAGE", (void *)NULL); return TCL_ERROR; } if (milliLen == 0 && (secObj == NULL || secLen > 0)) { @@ -4886,7 +4886,7 @@ ChildTimeLimitCmd( "may only reset -milliseconds if -seconds is " "also being reset", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", - "BADUSAGE", NULL); + "BADUSAGE", (void *)NULL); return TCL_ERROR; } } diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 150de6d..d9f13d0 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -495,7 +495,7 @@ MemoryAllocationError( "list construction failed: unable to alloc %" TCL_LL_MODIFIER "u bytes", (Tcl_WideInt)size)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); } return TCL_ERROR; } @@ -522,7 +522,7 @@ ListLimitExceededError(Tcl_Interp *interp) Tcl_SetObjResult( interp, Tcl_NewStringObj("max length of a Tcl list exceeded", -1)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); } return TCL_ERROR; } @@ -2948,7 +2948,7 @@ TclLsetFlat( "VALUE", "INDEX" "OUTOFRANGE", - NULL); + (void *)NULL); } result = TCL_ERROR; break; @@ -3138,7 +3138,7 @@ TclListObjSetElement( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "index \"%" TCL_SIZE_MODIFIER "u\" out of range", index)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", - "OUTOFRANGE", NULL); + "OUTOFRANGE", (void *)NULL); } return TCL_ERROR; } diff --git a/generic/tclLoad.c b/generic/tclLoad.c index ee1862d..05883ba 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -198,7 +198,7 @@ Tcl_LoadObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "must specify either file name or prefix", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "NOLIBRARY", - NULL); + (void *)NULL); code = TCL_ERROR; goto done; } @@ -266,7 +266,7 @@ Tcl_LoadObjCmd( "file \"%s\" is already loaded for prefix \"%s\"", fullFileName, libraryPtr->prefix)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", - "SPLITPERSONALITY", NULL); + "SPLITPERSONALITY", (void *)NULL); code = TCL_ERROR; Tcl_MutexUnlock(&libraryMutex); goto done; @@ -303,7 +303,7 @@ Tcl_LoadObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "no library with prefix \"%s\" is loaded statically", prefix)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "NOTSTATIC", - NULL); + (void *)NULL); code = TCL_ERROR; goto done; } @@ -366,7 +366,7 @@ Tcl_LoadObjCmd( "couldn't figure out prefix for %s", fullFileName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", - "WHATLIBRARY", NULL); + "WHATLIBRARY", (void *)NULL); code = TCL_ERROR; goto done; } @@ -462,7 +462,7 @@ Tcl_LoadObjCmd( "can't use library in a safe interpreter: no" " %s_SafeInit procedure", libraryPtr->prefix)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "UNSAFE", - NULL); + (void *)NULL); code = TCL_ERROR; goto done; } @@ -473,7 +473,7 @@ Tcl_LoadObjCmd( "can't attach library to interpreter: no %s_Init procedure", libraryPtr->prefix)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "ENTRYPOINT", - NULL); + (void *)NULL); code = TCL_ERROR; goto done; } @@ -635,7 +635,7 @@ Tcl_UnloadObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "must specify either file name or prefix", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "NOLIBRARY", - NULL); + (void *)NULL); code = TCL_ERROR; goto done; } @@ -705,7 +705,7 @@ Tcl_UnloadObjCmd( "library with prefix \"%s\" is loaded statically and cannot be unloaded", prefix)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "STATIC", - NULL); + (void *)NULL); code = TCL_ERROR; goto done; } @@ -717,7 +717,7 @@ Tcl_UnloadObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "file \"%s\" has never been loaded", fullFileName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "NEVERLOADED", - NULL); + (void *)NULL); code = TCL_ERROR; goto done; } @@ -747,7 +747,7 @@ Tcl_UnloadObjCmd( "file \"%s\" has never been loaded in this interpreter", fullFileName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "NEVERLOADED", - NULL); + (void *)NULL); code = TCL_ERROR; goto done; } @@ -810,7 +810,7 @@ UnloadLibrary( "file \"%s\" cannot be unloaded under a safe interpreter", fullFileName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "CANNOT", - NULL); + (void *)NULL); code = TCL_ERROR; goto done; } @@ -823,7 +823,7 @@ UnloadLibrary( "file \"%s\" cannot be unloaded under a trusted interpreter", fullFileName)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "UNLOAD", "CANNOT", - NULL); + (void *)NULL); code = TCL_ERROR; goto done; } diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index aea397e..24d9646 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -720,7 +720,7 @@ Tcl_CreateNamespace( Tcl_SetObjResult(interp, Tcl_NewStringObj("can't create namespace" " \"\": only global namespace can have empty name", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "NAMESPACE", - "CREATEGLOBAL", NULL); + "CREATEGLOBAL", (void *)NULL); Tcl_DStringFree(&tmpBuffer); return NULL; } @@ -759,7 +759,7 @@ Tcl_CreateNamespace( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't create namespace \"%s\": already exists", name)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "NAMESPACE", - "CREATEEXISTING", NULL); + "CREATEEXISTING", (void *)NULL); Tcl_DStringFree(&tmpBuffer); return NULL; } @@ -1439,7 +1439,7 @@ Tcl_Export( if ((exportNsPtr != nsPtr) || (strcmp(pattern, simplePattern) != 0)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid export pattern" " \"%s\": pattern can't specify a namespace", pattern)); - Tcl_SetErrorCode(interp, "TCL", "EXPORT", "INVALID", NULL); + Tcl_SetErrorCode(interp, "TCL", "EXPORT", "INVALID", (void *)NULL); return TCL_ERROR; } @@ -1645,7 +1645,7 @@ Tcl_Import( if (strlen(pattern) == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj("empty import pattern",-1)); - Tcl_SetErrorCode(interp, "TCL", "IMPORT", "EMPTY", NULL); + Tcl_SetErrorCode(interp, "TCL", "IMPORT", "EMPTY", (void *)NULL); return TCL_ERROR; } TclGetNamespaceForQualName(interp, pattern, nsPtr, TCL_NAMESPACE_ONLY, @@ -1654,7 +1654,7 @@ Tcl_Import( if (importNsPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown namespace in import pattern \"%s\"", pattern)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "NAMESPACE", pattern, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "NAMESPACE", pattern, (void *)NULL); return TCL_ERROR; } if (importNsPtr == nsPtr) { @@ -1662,12 +1662,12 @@ Tcl_Import( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "no namespace specified in import pattern \"%s\"", pattern)); - Tcl_SetErrorCode(interp, "TCL", "IMPORT", "ORIGIN", NULL); + Tcl_SetErrorCode(interp, "TCL", "IMPORT", "ORIGIN", (void *)NULL); } else { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "import pattern \"%s\" tries to import from namespace" " \"%s\" into itself", pattern, importNsPtr->name)); - Tcl_SetErrorCode(interp, "TCL", "IMPORT", "SELF", NULL); + Tcl_SetErrorCode(interp, "TCL", "IMPORT", "SELF", (void *)NULL); } return TCL_ERROR; } @@ -1790,7 +1790,7 @@ DoImport( " containing command \"%s\"", pattern, Tcl_DStringValue(&ds))); Tcl_DStringFree(&ds); - Tcl_SetErrorCode(interp, "TCL", "IMPORT", "LOOP", NULL); + Tcl_SetErrorCode(interp, "TCL", "IMPORT", "LOOP", (void *)NULL); return TCL_ERROR; } } @@ -1832,7 +1832,7 @@ DoImport( } Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't import command \"%s\": already exists", cmdName)); - Tcl_SetErrorCode(interp, "TCL", "IMPORT", "OVERWRITE", NULL); + Tcl_SetErrorCode(interp, "TCL", "IMPORT", "OVERWRITE", (void *)NULL); return TCL_ERROR; } return TCL_OK; @@ -1902,7 +1902,7 @@ Tcl_ForgetImport( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown namespace in namespace forget pattern \"%s\"", pattern)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "NAMESPACE", pattern, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "NAMESPACE", pattern, (void *)NULL); return TCL_ERROR; } @@ -2537,7 +2537,7 @@ Tcl_FindNamespace( if (flags & TCL_LEAVE_ERR_MSG) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown namespace \"%s\"", name)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "NAMESPACE", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "NAMESPACE", name, (void *)NULL); } return NULL; } @@ -2727,7 +2727,7 @@ Tcl_FindCommand( if (flags & TCL_LEAVE_ERR_MSG) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown command \"%s\"", name)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COMMAND", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COMMAND", name, (void *)NULL); } return NULL; } @@ -2921,7 +2921,7 @@ TclGetNamespaceFromObj( "namespace \"%s\" not found in \"%s\"", name, Tcl_GetStringResult(interp))); } - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "NAMESPACE", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "NAMESPACE", name, (void *)NULL); return TCL_ERROR; } return TCL_OK; @@ -3313,7 +3313,7 @@ NamespaceDeleteCmd( "unknown namespace \"%s\" in namespace delete command", TclGetString(objv[i]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "NAMESPACE", - TclGetString(objv[i]), NULL); + TclGetString(objv[i]), (void *)NULL); return TCL_ERROR; } } @@ -3947,7 +3947,7 @@ NamespaceOriginCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid command name \"%s\"", TclGetString(objv[1]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COMMAND", - TclGetString(objv[1]), NULL); + TclGetString(objv[1]), (void *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, resultPtr); diff --git a/generic/tclOO.c b/generic/tclOO.c index 624ea8f..a65dc8f 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -1865,7 +1865,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", (void *)NULL); return NULL; } } @@ -1919,7 +1919,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", (void *)NULL); result = TCL_ERROR; } if (result != TCL_OK) { @@ -1990,7 +1990,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", (void *)NULL); return NULL; } @@ -2755,7 +2755,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), (void *)NULL); return TCL_ERROR; } } else { @@ -2772,7 +2772,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), (void *)NULL); return TCL_ERROR; } } @@ -2799,7 +2799,7 @@ TclOOObjectCmdCore( Tcl_SetObjResult(interp, Tcl_NewStringObj( "no valid method implementation", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(methodNamePtr), NULL); + TclGetString(methodNamePtr), (void *)NULL); TclOODeleteContext(contextPtr); return TCL_ERROR; } @@ -2880,7 +2880,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", (void *)NULL); return TCL_ERROR; } @@ -2949,7 +2949,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", (void *)NULL); return TCL_ERROR; } @@ -3028,7 +3028,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); + (void *)NULL); return NULL; } diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 9b72060..82aad22 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -195,7 +195,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", (void *)NULL); return TCL_ERROR; } @@ -213,7 +213,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", (void *)NULL); return TCL_ERROR; } @@ -260,7 +260,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", (void *)NULL); return TCL_ERROR; } @@ -278,7 +278,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", (void *)NULL); return TCL_ERROR; } nsName = TclGetStringFromObj( @@ -286,7 +286,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", (void *)NULL); return TCL_ERROR; } @@ -331,7 +331,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", (void *)NULL); return TCL_ERROR; } @@ -589,7 +589,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]), (void *)NULL); return TCL_ERROR; } @@ -608,7 +608,7 @@ TclOO_Object_Unknown( ckfree(methodNames); Tcl_SetObjResult(interp, errorMsg); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[skip]), NULL); + TclGetString(objv[skip]), (void *)NULL); return TCL_ERROR; } @@ -665,7 +665,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", (void *)NULL); return TCL_ERROR; } @@ -694,7 +694,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", (void *)NULL); return TCL_ERROR; } @@ -822,7 +822,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, (void *)NULL); return TCL_ERROR; } @@ -883,7 +883,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", (void *)NULL); return TCL_ERROR; } context = (Tcl_ObjectContext)framePtr->clientData; @@ -923,7 +923,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", (void *)NULL); return TCL_ERROR; } contextPtr = (CallContext *)framePtr->clientData; @@ -944,7 +944,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", (void *)NULL); return TCL_ERROR; } @@ -993,14 +993,14 @@ TclOONextToObjCmd( "%s implementation by \"%s\" not reachable from here", methodType, TclGetString(objv[1]))); Tcl_SetErrorCode(interp, "TCL", "OO", "CLASS_NOT_REACHABLE", - NULL); + (void *)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", (void *)NULL); return TCL_ERROR; } @@ -1063,7 +1063,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", (void *)NULL); return TCL_ERROR; } @@ -1098,7 +1098,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", (void *)NULL); return TCL_ERROR; } @@ -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", (void *)NULL); return TCL_ERROR; } else { struct MInvoke *miPtr = &CurrentlyInvoked(contextPtr); @@ -1145,7 +1145,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", (void *)NULL); return TCL_ERROR; } else { CallContext *callerPtr = (CallContext *)framePtr->callerVarPtr->clientData; @@ -1213,7 +1213,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", (void *)NULL); return TCL_ERROR; } else { Method *mPtr; diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index 3b849ea..034c877 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -635,7 +635,7 @@ RenameDeleteMethod( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "method %s does not exist", TclGetString(fromPtr))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(fromPtr), NULL); + TclGetString(fromPtr), (void *)NULL); return TCL_ERROR; } hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char *) fromPtr); @@ -649,14 +649,14 @@ RenameDeleteMethod( renameToSelf: Tcl_SetObjResult(interp, Tcl_NewStringObj( "cannot rename method to itself", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "RENAME_TO_SELF", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "RENAME_TO_SELF", (void *)NULL); return TCL_ERROR; } else if (!isNew) { renameToExisting: Tcl_SetObjResult(interp, Tcl_ObjPrintf( "method called %s already exists", TclGetString(toPtr))); - Tcl_SetErrorCode(interp, "TCL", "OO", "RENAME_OVER", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "RENAME_OVER", (void *)NULL); return TCL_ERROR; } } @@ -726,7 +726,7 @@ TclOOUnknownDefinition( if (objc < 2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "bad call of unknown handler", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_UNKNOWN", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_UNKNOWN", (void *)NULL); return TCL_ERROR; } if (TclOOGetDefineCmdContext(interp) == NULL) { @@ -773,7 +773,7 @@ TclOOUnknownDefinition( noMatch: Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid command name \"%s\"", soughtStr)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COMMAND", soughtStr, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COMMAND", soughtStr, (void *)NULL); return TCL_ERROR; } @@ -863,7 +863,7 @@ InitDefineContext( if (namespacePtr == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "no definition namespace available", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -904,7 +904,7 @@ TclOOGetDefineCmdContext( Tcl_SetObjResult(interp, Tcl_NewStringObj( "this command may only be called from within the context of" " an ::oo::define or ::oo::objdefine command", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return NULL; } object = (Tcl_Object)iPtr->varFramePtr->clientData; @@ -912,7 +912,7 @@ TclOOGetDefineCmdContext( Tcl_SetObjResult(interp, Tcl_NewStringObj( "this command cannot be called when the object has been" " deleted", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return NULL; } return object; @@ -956,7 +956,7 @@ GetClassInOuterContext( if (oPtr->classPtr == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj(errMsg, -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CLASS", - TclGetString(className), NULL); + TclGetString(className), (void *)NULL); return NULL; } return oPtr->classPtr; @@ -1131,7 +1131,7 @@ TclOODefineObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%s does not refer to a class", TclGetString(objv[1]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CLASS", - TclGetString(objv[1]), NULL); + TclGetString(objv[1]), (void *)NULL); return TCL_ERROR; } @@ -1453,13 +1453,13 @@ TclOODefineClassObjCmd( if (oPtr->flags & ROOT_OBJECT) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "may not modify the class of the root object class", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } if (oPtr->flags & ROOT_CLASS) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "may not modify the class of the class of classes", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -1479,7 +1479,7 @@ TclOODefineClassObjCmd( if (oPtr == clsPtr->thisPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "may not change classes into an instance of themselves", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -1632,14 +1632,14 @@ TclOODefineDefnNsObjCmd( if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } if (oPtr->flags & (ROOT_OBJECT | ROOT_CLASS)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "may not modify the definition namespace of the root classes", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -1716,7 +1716,7 @@ TclOODefineDeleteMethodObjCmd( if (!isInstanceDeleteMethod && !oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -1842,7 +1842,7 @@ TclOODefineExportObjCmd( if (!isInstanceExport && !clsPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -1936,7 +1936,7 @@ TclOODefineForwardObjCmd( if (!isInstanceForward && !oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } isPublic = Tcl_StringMatch(TclGetString(objv[1]), PUBLIC_PATTERN) @@ -2014,7 +2014,7 @@ TclOODefineMethodObjCmd( if (!isInstanceMethod && !oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } if (objc == 5) { @@ -2093,7 +2093,7 @@ TclOODefineRenameMethodObjCmd( if (!isInstanceRenameMethod && !oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -2155,7 +2155,7 @@ TclOODefineUnexportObjCmd( if (!isInstanceUnexport && !clsPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -2351,7 +2351,7 @@ ClassFilterGet( } else if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -2387,7 +2387,7 @@ ClassFilterSet( } else if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } else if (TclListObjGetElementsM(interp, objv[0], &filterc, &filterv) != TCL_OK) { @@ -2432,7 +2432,7 @@ ClassMixinGet( } else if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -2471,7 +2471,7 @@ ClassMixinSet( } else if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } else if (TclListObjGetElementsM(interp, objv[0], &mixinc, &mixinv) != TCL_OK) { @@ -2490,7 +2490,7 @@ ClassMixinSet( if (TclOOIsReachable(oPtr->classPtr, mixins[i])) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "may not mix a class into itself", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "SELF_MIXIN", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "SELF_MIXIN", (void *)NULL); goto freeAndError; } } @@ -2538,7 +2538,7 @@ ClassSuperGet( } else if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -2576,12 +2576,12 @@ ClassSuperSet( } else if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } else if (oPtr == oPtr->fPtr->objectCls->thisPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "may not modify the superclass of the root object", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } else if (TclListObjGetElementsM(interp, objv[0], &superc, &superv) != TCL_OK) { @@ -2622,14 +2622,14 @@ ClassSuperSet( Tcl_SetObjResult(interp, Tcl_NewStringObj( "class should only be a direct superclass once", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "REPETITIOUS",NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "REPETITIOUS",(void *)NULL); goto failedAfterAlloc; } } if (TclOOIsReachable(oPtr->classPtr, superclasses[i])) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to form circular dependency graph", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "CIRCULARITY", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CIRCULARITY", (void *)NULL); failedAfterAlloc: for (; i-- > 0 ;) { TclOODecrRefCount(superclasses[i]->thisPtr); @@ -2704,7 +2704,7 @@ ClassVarsGet( } else if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -2751,7 +2751,7 @@ ClassVarsSet( } else if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } else if (TclListObjGetElementsM(interp, objv[0], &varc, &varv) != TCL_OK) { @@ -2765,14 +2765,14 @@ ClassVarsSet( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid declared variable name \"%s\": must not %s", varName, "contain namespace separators")); - Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_DECLVAR", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_DECLVAR", (void *)NULL); return TCL_ERROR; } if (Tcl_StringMatch(varName, "*(*)")) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid declared variable name \"%s\": must not %s", varName, "refer to an array element")); - Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_DECLVAR", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_DECLVAR", (void *)NULL); return TCL_ERROR; } } @@ -3021,14 +3021,14 @@ ObjVarsSet( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid declared variable name \"%s\": must not %s", varName, "contain namespace separators")); - Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_DECLVAR", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_DECLVAR", (void *)NULL); return TCL_ERROR; } if (Tcl_StringMatch(varName, "*(*)")) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid declared variable name \"%s\": must not %s", varName, "refer to an array element")); - Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_DECLVAR", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_DECLVAR", (void *)NULL); return TCL_ERROR; } } @@ -3185,7 +3185,7 @@ ClassRPropsGet( } else if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -3221,7 +3221,7 @@ ClassRPropsSet( } else if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } else if (Tcl_ListObjGetElements(interp, objv[0], &varc, &varv) != TCL_OK) { @@ -3382,7 +3382,7 @@ ClassWPropsGet( } else if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } @@ -3418,7 +3418,7 @@ ClassWPropsSet( } else if (!oPtr->classPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "attempt to misuse API", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", (void *)NULL); return TCL_ERROR; } else if (Tcl_ListObjGetElements(interp, objv[0], &varc, &varv) != TCL_OK) { diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index e0594e5..6aa3214 100644 --- a/generic/tclOOInfo.c +++ b/generic/tclOOInfo.c @@ -158,7 +158,7 @@ GetClassFromObj( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "\"%s\" is not a class", TclGetString(objPtr))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CLASS", - TclGetString(objPtr), NULL); + TclGetString(objPtr), (void *)NULL); return NULL; } return oPtr->classPtr; @@ -263,7 +263,7 @@ InfoObjectDefnCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown method \"%s\"", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } procPtr = TclOOGetProcFromMethod((Method *)Tcl_GetHashValue(hPtr)); @@ -271,7 +271,7 @@ InfoObjectDefnCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "definition not available for this kind of method", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } @@ -374,7 +374,7 @@ InfoObjectForwardCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown method \"%s\"", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } prefixObj = TclOOGetFwdFromMethod((Method *)Tcl_GetHashValue(hPtr)); @@ -383,7 +383,7 @@ InfoObjectForwardCmd( "prefix argument list not available for this kind of method", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } @@ -577,7 +577,7 @@ InfoObjectMethodsCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "missing option for -scope")); Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", - NULL); + (void *)NULL); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[i], scopes, "scope", 0, @@ -670,7 +670,7 @@ InfoObjectMethodTypeCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown method \"%s\"", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } mPtr = (Method *)Tcl_GetHashValue(hPtr); @@ -947,7 +947,7 @@ InfoClassConstrCmd( if (procPtr == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "definition not available for this kind of method", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "METHOD_TYPE", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "METHOD_TYPE", (void *)NULL); return TCL_ERROR; } @@ -1007,7 +1007,7 @@ InfoClassDefnCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown method \"%s\"", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } procPtr = TclOOGetProcFromMethod((Method *)Tcl_GetHashValue(hPtr)); @@ -1015,7 +1015,7 @@ InfoClassDefnCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "definition not available for this kind of method", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } @@ -1125,7 +1125,7 @@ InfoClassDestrCmd( if (procPtr == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "definition not available for this kind of method", -1)); - Tcl_SetErrorCode(interp, "TCL", "OO", "METHOD_TYPE", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "METHOD_TYPE", (void *)NULL); return TCL_ERROR; } @@ -1205,7 +1205,7 @@ InfoClassForwardCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown method \"%s\"", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } prefixObj = TclOOGetFwdFromMethod((Method *)Tcl_GetHashValue(hPtr)); @@ -1214,7 +1214,7 @@ InfoClassForwardCmd( "prefix argument list not available for this kind of method", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } @@ -1335,7 +1335,7 @@ InfoClassMethodsCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "missing option for -scope")); Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", - NULL); + (void *)NULL); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[i], scopes, "scope", 0, @@ -1422,7 +1422,7 @@ InfoClassMethodTypeCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown method \"%s\"", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", - TclGetString(objv[2]), NULL); + TclGetString(objv[2]), (void *)NULL); return TCL_ERROR; } mPtr = (Method *)Tcl_GetHashValue(hPtr); diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index feaeb23..893c05e 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -1395,7 +1395,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", (void *)NULL); return NULL; } @@ -1434,7 +1434,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", (void *)NULL); return NULL; } diff --git a/generic/tclObj.c b/generic/tclObj.c index 321b100..7f41765 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -973,7 +973,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", (void *)NULL); } return TCL_ERROR; } @@ -2268,7 +2268,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", (void *)NULL); } return TCL_ERROR; } @@ -2557,7 +2557,7 @@ Tcl_GetDoubleFromObj( Tcl_SetObjResult(interp, Tcl_NewStringObj( "floating point value is Not a Number", -1)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "DOUBLE", "NAN", - NULL); + (void *)NULL); } return TCL_ERROR; } @@ -2773,7 +2773,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, (void *)NULL); } return TCL_ERROR; } @@ -3070,7 +3070,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", (void *)NULL); } return TCL_ERROR; } @@ -3114,7 +3114,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, (void *)NULL); } return TCL_ERROR; } @@ -3311,7 +3311,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", (void *)NULL); } return TCL_ERROR; } @@ -3349,7 +3349,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, (void *)NULL); } return TCL_ERROR; } @@ -3394,7 +3394,7 @@ Tcl_GetWideUIntFromObj( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected unsigned integer but got \"%s\"", TclGetString(objPtr))); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", (void *)NULL); } return TCL_ERROR; } @@ -3433,7 +3433,7 @@ Tcl_GetWideUIntFromObj( Tcl_Obj *msg = Tcl_NewStringObj(s, -1); Tcl_SetObjResult(interp, msg); - Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, NULL); + Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, (void *)NULL); } return TCL_ERROR; } @@ -3480,7 +3480,7 @@ TclGetWideBitsFromObj( 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", (void *)NULL); } return TCL_ERROR; } @@ -3770,7 +3770,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", (void *)NULL); } return TCL_ERROR; } diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 0095469..7282709 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -2286,7 +2286,7 @@ SetFsPathFromAny( "couldn't find HOME environment variable to" " expand path", -1)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "PATH", - "HOMELESS", NULL); + "HOMELESS", (void *)NULL); } return TCL_ERROR; } @@ -2311,7 +2311,7 @@ SetFsPathFromAny( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "user \"%s\" doesn't exist", expandedUser)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "PATH", "NOUSER", - NULL); + (void *)NULL); } Tcl_DStringFree(&userName); Tcl_DStringFree(&temp); @@ -2630,7 +2630,7 @@ MakeTildeRelativePath( "couldn't find HOME environment variable to" " expand path", -1)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "PATH", - "HOMELESS", NULL); + "HOMELESS", (void *)NULL); } return TCL_ERROR; } @@ -2642,7 +2642,7 @@ MakeTildeRelativePath( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "user \"%s\" doesn't exist", user)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "PATH", "NOUSER", - NULL); + (void *)NULL); } return TCL_ERROR; } diff --git a/generic/tclPipe.c b/generic/tclPipe.c index 830f3f6..8b6eb11 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -111,7 +111,7 @@ FileForRedirect( Tcl_GetChannelName(chan), ((writing) ? "writing" : "reading"))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "EXEC", - "BADCHAN", NULL); + "BADCHAN", (void *)NULL); } return NULL; } @@ -155,7 +155,7 @@ FileForRedirect( badLastArg: Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't specify \"%s\" as last word in command", arg)); - Tcl_SetErrorCode(interp, "TCL", "OPERATION", "EXEC", "SYNTAX", NULL); + Tcl_SetErrorCode(interp, "TCL", "OPERATION", "EXEC", "SYNTAX", (void *)NULL); return NULL; } @@ -513,7 +513,7 @@ TclCreatePipeline( Tcl_SetObjResult(interp, Tcl_NewStringObj( "illegal use of | or |& in command", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "EXEC", - "PIPESYNTAX", NULL); + "PIPESYNTAX", (void *)NULL); goto error; } } @@ -542,7 +542,7 @@ TclCreatePipeline( "can't specify \"%s\" as last word in command", argv[i])); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "EXEC", - "PIPESYNTAX", NULL); + "PIPESYNTAX", (void *)NULL); goto error; } skip = 2; @@ -659,7 +659,7 @@ TclCreatePipeline( "must specify \"%s\" as last word in command", argv[i])); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "EXEC", - "PIPESYNTAX", NULL); + "PIPESYNTAX", (void *)NULL); goto error; } errorFile = outputFile; @@ -701,7 +701,7 @@ TclCreatePipeline( Tcl_SetObjResult(interp, Tcl_NewStringObj( "illegal use of | or |& in command", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "EXEC", "PIPESYNTAX", - NULL); + (void *)NULL); goto error; } @@ -1055,7 +1055,7 @@ Tcl_OpenCommandChannel( "can't read output from command:" " standard output was redirected", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "EXEC", - "BADREDIRECT", NULL); + "BADREDIRECT", (void *)NULL); goto error; } if ((flags & TCL_STDIN) && (inPipe == NULL)) { @@ -1063,7 +1063,7 @@ Tcl_OpenCommandChannel( "can't write input to command:" " standard input was redirected", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "EXEC", - "BADREDIRECT", NULL); + "BADREDIRECT", (void *)NULL); goto error; } } @@ -1074,7 +1074,7 @@ Tcl_OpenCommandChannel( if (channel == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "pipe for command could not be created", -1)); - Tcl_SetErrorCode(interp, "TCL", "OPERATION", "EXEC", "NOPIPE", NULL); + Tcl_SetErrorCode(interp, "TCL", "OPERATION", "EXEC", "NOPIPE", (void *)NULL); goto error; } return channel; diff --git a/generic/tclPkg.c b/generic/tclPkg.c index c5b2d38..b5b5582 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -192,7 +192,7 @@ Tcl_PkgProvideEx( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "conflicting versions provided for package \"%s\": %s, then %s", name, Tcl_GetString(pkgPtr->version), version)); - Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "VERSIONCONFLICT", NULL); + Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "VERSIONCONFLICT", (void *)NULL); return TCL_ERROR; } @@ -389,7 +389,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", (void *)NULL); return NULL; } @@ -409,7 +409,7 @@ Tcl_PkgRequireEx( } ov = Tcl_NewStringObj(version, -1); if (exact) { - Tcl_AppendStringsToObj(ov, "-", version, NULL); + Tcl_AppendStringsToObj(ov, "-", version, (void *)NULL); } Tcl_IncrRefCount(ov); if (Tcl_PkgRequireProc(interp, name, 1, &ov, clientDataPtr) == TCL_OK) { @@ -559,7 +559,7 @@ PkgRequireCoreStep2( 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", (void *)NULL); result = TCL_ERROR; } if (result == TCL_ERROR) { @@ -596,7 +596,7 @@ PkgRequireCoreFinal( 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", (void *)NULL); AddRequirementsToResult(interp, reqc, reqv); return TCL_ERROR; } @@ -617,7 +617,7 @@ PkgRequireCoreFinal( "version conflict for package \"%s\": have %s, need", name, Tcl_GetString(reqPtr->pkgPtr->version))); Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "VERSIONCONFLICT", - NULL); + (void *)NULL); AddRequirementsToResult(interp, reqc, reqv); return TCL_ERROR; } @@ -670,7 +670,7 @@ SelectPackage( " 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", (void *)NULL); return TCL_ERROR; } @@ -876,7 +876,7 @@ SelectPackageFinal( " no version of package %s provided", name, versionToProvide, name)); Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "UNPROVIDED", - NULL); + (void *)NULL); } else { char *pvi, *vi; @@ -900,7 +900,7 @@ SelectPackageFinal( name, versionToProvide, name, Tcl_GetString(reqPtr->pkgPtr->version))); Tcl_SetErrorCode(interp, "TCL", "PACKAGE", - "WRONGPROVIDE", NULL); + "WRONGPROVIDE", (void *)NULL); } } } @@ -912,7 +912,7 @@ SelectPackageFinal( "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", (void *)NULL); TclDecrRefCount(codePtr); result = TCL_ERROR; } @@ -1018,7 +1018,7 @@ Tcl_PkgPresentEx( if (foundVersion == NULL) { Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PACKAGE", name, - NULL); + (void *)NULL); } return foundVersion; } @@ -1031,7 +1031,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, (void *)NULL); return NULL; } @@ -1351,7 +1351,7 @@ TclNRPackageObjCmd( */ ov = Tcl_NewStringObj(version, -1); - Tcl_AppendStringsToObj(ov, "-", version, NULL); + Tcl_AppendStringsToObj(ov, "-", version, (void *)NULL); version = NULL; argv3 = TclGetString(objv[3]); Tcl_IncrRefCount(objv[3]); @@ -1753,7 +1753,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", (void *)NULL); return TCL_ERROR; } @@ -2016,7 +2016,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", (void *)NULL); return TCL_ERROR; } diff --git a/generic/tclProc.c b/generic/tclProc.c index 2800c20..adb69ba 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -182,14 +182,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", (void *)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", (void *)NULL); return TCL_ERROR; } @@ -497,7 +497,7 @@ TclCreateProc( "precompiled header expects %" TCL_SIZE_MODIFIER "u", procName, numArgs, procPtr->numArgs)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "BYTECODELIES", NULL); + "BYTECODELIES", (void *)NULL); goto procError; } localPtr = procPtr->firstLocalPtr; @@ -527,14 +527,14 @@ TclCreateProc( Tcl_AppendToObj(errorObj, "\"", -1); Tcl_SetObjResult(interp, errorObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "FORMALARGUMENTFORMAT", NULL); + "FORMALARGUMENTFORMAT", (void *)NULL); goto procError; } if ((fieldCount == 0) || (TclGetCharLength(fieldValues[0]) == 0)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "argument with no name", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "FORMALARGUMENTFORMAT", NULL); + "FORMALARGUMENTFORMAT", (void *)NULL); goto procError; } @@ -553,7 +553,7 @@ TclCreateProc( "formal parameter \"%s\" is an array element", Tcl_GetString(fieldValues[0]))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "FORMALARGUMENTFORMAT", NULL); + "FORMALARGUMENTFORMAT", (void *)NULL); goto procError; } } else if (*argnamei == ':' && *(argnamei+1) == ':') { @@ -563,7 +563,7 @@ TclCreateProc( Tcl_AppendToObj(errorObj, "\" is not a simple name", -1); Tcl_SetObjResult(interp, errorObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "FORMALARGUMENTFORMAT", NULL); + "FORMALARGUMENTFORMAT", (void *)NULL); goto procError; } argnamei++; @@ -591,7 +591,7 @@ TclCreateProc( "procedure \"%s\": formal parameter %" TCL_SIZE_MODIFIER "u is " "inconsistent with precompiled body", procName, i)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "BYTECODELIES", NULL); + "BYTECODELIES", (void *)NULL); goto procError; } @@ -614,7 +614,7 @@ TclCreateProc( "default value inconsistent with precompiled body", -1); Tcl_SetObjResult(interp, errorObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "BYTECODELIES", NULL); + "BYTECODELIES", (void *)NULL); goto procError; } } @@ -842,7 +842,7 @@ badLevel: name = objPtr ? TclGetString(objPtr) : "1" ; } Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad level \"%s\"", name)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LEVEL", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LEVEL", name, (void *)NULL); return -1; } @@ -1097,7 +1097,7 @@ ProcWrongNumArgs( if (defPtr->value.objPtr != NULL) { TclNewObj(argObj); - Tcl_AppendStringsToObj(argObj, "?", TclGetString(namePtr), "?", NULL); + Tcl_AppendStringsToObj(argObj, "?", TclGetString(namePtr), "?", (void *)NULL); } else if (defPtr->flags & VAR_IS_ARGS) { numArgs--; final = "?arg ...?"; @@ -1874,7 +1874,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", (void *)NULL); result = TCL_ERROR; /* FALLTHRU */ @@ -1958,7 +1958,7 @@ TclProcCompileProc( Tcl_SetObjResult(interp, Tcl_NewStringObj( "a precompiled script jumped interps", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PROC", - "CROSSINTERPBYTECODE", NULL); + "CROSSINTERPBYTECODE", (void *)NULL); return TCL_ERROR; } codePtr->compileEpoch = iPtr->compileEpoch; @@ -1983,7 +1983,7 @@ TclProcCompileProc( TclNewLiteralStringObj(message, "Compiling "); Tcl_IncrRefCount(message); - Tcl_AppendStringsToObj(message, description, " \"", NULL); + Tcl_AppendStringsToObj(message, description, " \"", (void *)NULL); Tcl_AppendLimitedToObj(message, procName, TCL_INDEX_NONE, 50, NULL); fprintf(stdout, "%s\"\n", TclGetString(message)); Tcl_DecrRefCount(message); @@ -2470,7 +2470,7 @@ SetLambdaFromAny( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't interpret \"%s\" as a lambda expression", Tcl_GetString(objPtr))); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "LAMBDA", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "LAMBDA", (void *)NULL); return TCL_ERROR; } result = TclListObjGetElementsM(NULL, objPtr, &objc, &objv); @@ -2478,7 +2478,7 @@ SetLambdaFromAny( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't interpret \"%s\" as a lambda expression", Tcl_GetString(objPtr))); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "LAMBDA", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "LAMBDA", (void *)NULL); return TCL_ERROR; } diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index 558355f..a823af5 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -731,7 +731,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, (void *)NULL); } /* diff --git a/generic/tclResult.c b/generic/tclResult.c index f639c08..91ddc6e 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -1347,7 +1347,7 @@ TclProcessReturn( if (valuePtr != NULL) { Tcl_SetObjErrorCode(interp, valuePtr); } else { - Tcl_SetErrorCode(interp, "NONE", NULL); + Tcl_SetErrorCode(interp, "NONE", (void *)NULL); } Tcl_DictObjGet(NULL, iPtr->returnOpts, keys[KEY_ERRORLINE], @@ -1427,7 +1427,7 @@ TclMergeReturnOptions( "bad %s value: expected dictionary but got \"%s\"", compare, TclGetString(objv[1]))); Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_OPTIONS", - NULL); + (void *)NULL); goto error; } @@ -1476,7 +1476,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", (void *)NULL); goto error; } Tcl_DictObjRemove(NULL, returnOpts, keys[KEY_LEVEL]); @@ -1499,7 +1499,7 @@ TclMergeReturnOptions( "bad -errorcode value: expected a list but got \"%s\"", TclGetString(valuePtr))); Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_ERRORCODE", - NULL); + (void *)NULL); goto error; } } @@ -1521,7 +1521,7 @@ TclMergeReturnOptions( "bad -errorstack value: expected a list but got \"%s\"", TclGetString(valuePtr))); Tcl_SetErrorCode(interp, "TCL", "RESULT", "NONLIST_ERRORSTACK", - NULL); + (void *)NULL); goto error; } if (length % 2) { @@ -1533,7 +1533,7 @@ TclMergeReturnOptions( "forbidden odd-sized list for -errorstack: \"%s\"", TclGetString(valuePtr))); Tcl_SetErrorCode(interp, "TCL", "RESULT", - "ODDSIZEDLIST_ERRORSTACK", NULL); + "ODDSIZEDLIST_ERRORSTACK", (void *)NULL); goto error; } } @@ -1686,7 +1686,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", (void *)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 b8c29fa..4c141ab 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -341,7 +341,7 @@ ValidateFormat( Tcl_SetObjResult(interp, Tcl_NewStringObj( "cannot mix \"%\" and \"%n$\" conversion specifiers", -1)); - Tcl_SetErrorCode(interp, "TCL", "FORMAT", "MIXEDSPECTYPES", NULL); + Tcl_SetErrorCode(interp, "TCL", "FORMAT", "MIXEDSPECTYPES", (void *)NULL); goto error; } @@ -390,7 +390,7 @@ ValidateFormat( Tcl_SetObjResult(interp, Tcl_NewStringObj( "field width may not be specified in %c conversion", -1)); - Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADWIDTH", NULL); + Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADWIDTH", (void *)NULL); goto error; } /* FALLTHRU */ @@ -404,7 +404,7 @@ ValidateFormat( Tcl_AppendToObj(errorMsg, buf, -1); Tcl_AppendToObj(errorMsg, " conversion", -1); Tcl_SetObjResult(interp, errorMsg); - Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADSIZE", NULL); + Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADSIZE", (void *)NULL); goto error; } /* @@ -456,7 +456,7 @@ ValidateFormat( badSet: Tcl_SetObjResult(interp, Tcl_NewStringObj( "unmatched [ in format string", -1)); - Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BRACKET", NULL); + Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BRACKET", (void *)NULL); goto error; default: buf[Tcl_UniCharToUtf(ch, buf)] = '\0'; @@ -465,7 +465,7 @@ ValidateFormat( Tcl_AppendToObj(errorMsg, buf, -1); Tcl_AppendToObj(errorMsg, "\"", -1); Tcl_SetObjResult(interp, errorMsg); - Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADTYPE", NULL); + Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADTYPE", (void *)NULL); goto error; } if (!(flags & SCAN_SUPPRESS)) { @@ -512,7 +512,7 @@ ValidateFormat( Tcl_SetObjResult(interp, Tcl_NewStringObj( "variable is assigned by multiple \"%n$\" conversion specifiers", -1)); - Tcl_SetErrorCode(interp, "TCL", "FORMAT", "POLYASSIGNED", NULL); + Tcl_SetErrorCode(interp, "TCL", "FORMAT", "POLYASSIGNED", (void *)NULL); goto error; } else if (!xpgSize && (nassign[i] == 0)) { /* @@ -523,7 +523,7 @@ ValidateFormat( Tcl_SetObjResult(interp, Tcl_NewStringObj( "variable is not assigned by any conversion specifiers", -1)); - Tcl_SetErrorCode(interp, "TCL", "FORMAT", "UNASSIGNED", NULL); + Tcl_SetErrorCode(interp, "TCL", "FORMAT", "UNASSIGNED", (void *)NULL); goto error; } } @@ -535,12 +535,12 @@ ValidateFormat( if (gotXpg) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"%n$\" argument index out of range", -1)); - Tcl_SetErrorCode(interp, "TCL", "FORMAT", "INDEXRANGE", NULL); + Tcl_SetErrorCode(interp, "TCL", "FORMAT", "INDEXRANGE", (void *)NULL); } else { Tcl_SetObjResult(interp, Tcl_NewStringObj( "different numbers of variable names and field specifiers", -1)); - Tcl_SetErrorCode(interp, "TCL", "FORMAT", "FIELDVARMISMATCH", NULL); + Tcl_SetErrorCode(interp, "TCL", "FORMAT", "FIELDVARMISMATCH", (void *)NULL); } error: @@ -930,7 +930,7 @@ Tcl_ScanObjCmd( if (mp_init_u64(&big, (Tcl_WideUInt)wideValue) != MP_OKAY) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "insufficient memory to create bignum", -1)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); return TCL_ERROR; } else { Tcl_SetBignumObj(objPtr, &big); @@ -958,7 +958,7 @@ Tcl_ScanObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "unsigned bignum scans are invalid", -1)); Tcl_SetErrorCode(interp, "TCL", "FORMAT", - "BADUNSIGNED",NULL); + "BADUNSIGNED", (void *)NULL); return TCL_ERROR; } } @@ -976,7 +976,7 @@ Tcl_ScanObjCmd( if (mp_init_u64(&big, (unsigned long)value) != MP_OKAY) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "insufficient memory to create bignum", -1)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); return TCL_ERROR; } else { Tcl_SetBignumObj(objPtr, &big); diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 78ab911..f23b23b 100644 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -1595,7 +1595,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", (void *)NULL); } } @@ -4328,7 +4328,7 @@ StrictBignumConversion( * string. */ - mp_clear_multi(&b, &S, &dig, NULL); + mp_clear_multi(&b, &S, &dig, (void *)NULL); *s = '\0'; *decpt = k; if (endPtr) { @@ -4859,7 +4859,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, (void *)NULL); } return TCL_ERROR; } diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 2b6d7c2..b307cd6 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -2872,7 +2872,7 @@ Tcl_AppendFormatToObj( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad field specifier \"%c\"", ch)); - Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADTYPE", NULL); + Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADTYPE", (void *)NULL); } goto error; } @@ -2932,7 +2932,7 @@ Tcl_AppendFormatToObj( errorMsg: if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj(msg, -1)); - Tcl_SetErrorCode(interp, "TCL", "FORMAT", errCode, NULL); + Tcl_SetErrorCode(interp, "TCL", "FORMAT", errCode, (void *)NULL); } error: Tcl_SetObjLength(appendObj, originalLength); @@ -3325,7 +3325,7 @@ TclStringRepeat( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "max size for a Tcl value (%" TCL_SIZE_MODIFIER "d bytes) exceeded", TCL_SIZE_MAX)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); } return NULL; } @@ -3362,7 +3362,7 @@ TclStringRepeat( "string size overflow: unable to alloc %" TCL_Z_MODIFIER "u bytes", UNICHAR_STRING_SIZE(count*length))); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); } return NULL; } @@ -3389,7 +3389,7 @@ TclStringRepeat( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "string size overflow: unable to alloc %" TCL_SIZE_MODIFIER "d bytes", count*length)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); } return NULL; } @@ -3696,7 +3696,7 @@ TclStringCat( "concatenation failed: unable to alloc %" TCL_Z_MODIFIER "u bytes", UNICHAR_STRING_SIZE(length))); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); } return NULL; } @@ -3713,7 +3713,7 @@ TclStringCat( "concatenation failed: unable to alloc %" TCL_Z_MODIFIER "u bytes", UNICHAR_STRING_SIZE(length))); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); } return NULL; } @@ -3744,7 +3744,7 @@ TclStringCat( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "concatenation failed: unable to alloc %" TCL_SIZE_MODIFIER "d bytes", length)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); } return NULL; } @@ -3760,7 +3760,7 @@ TclStringCat( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "concatenation failed: unable to alloc %" TCL_SIZE_MODIFIER "d bytes", length)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); } return NULL; } @@ -3786,7 +3786,7 @@ TclStringCat( if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "max size for a Tcl value (%" TCL_SIZE_MODIFIER "d bytes) exceeded", TCL_SIZE_MAX)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); } return NULL; } @@ -4427,7 +4427,7 @@ TclStringReplace( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "max size for a Tcl value (%" TCL_SIZE_MODIFIER "d bytes) exceeded", TCL_SIZE_MAX)); - Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", (void *)NULL); } return NULL; } diff --git a/generic/tclTimer.c b/generic/tclTimer.c index e986db7..954e38f 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -826,7 +826,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, (void *)NULL); return TCL_ERROR; } } @@ -965,7 +965,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, (void *)NULL); return TCL_ERROR; } else { Tcl_Obj *resultListPtr; diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index b4ab607..41c9c10 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -220,7 +220,7 @@ EXTERN void TclBN_mp_clamp(mp_int *a); /* 6 */ EXTERN void TclBN_mp_clear(mp_int *a); /* 7 */ -EXTERN void TclBN_mp_clear_multi(mp_int *a, ...); +EXTERN void TclBN_mp_clear_multi(mp_int *a, ...) __attribute__((sentinel)); /* 8 */ EXTERN mp_ord TclBN_mp_cmp(const mp_int *a, const mp_int *b) MP_WUR; /* 9 */ @@ -258,7 +258,7 @@ EXTERN mp_err TclBN_mp_init(mp_int *a) MP_WUR; /* 22 */ EXTERN mp_err TclBN_mp_init_copy(mp_int *a, const mp_int *b) MP_WUR; /* 23 */ -EXTERN mp_err TclBN_mp_init_multi(mp_int *a, ...) MP_WUR; +EXTERN mp_err TclBN_mp_init_multi(mp_int *a, ...) __attribute__((sentinel)) MP_WUR; /* 24 */ EXTERN mp_err TclBN_mp_init_set(mp_int *a, unsigned int b) MP_WUR; /* 25 */ diff --git a/generic/tclTrace.c b/generic/tclTrace.c index 797714d..6adc724 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -384,7 +384,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", (void *)NULL); return TCL_ERROR; #endif } @@ -452,7 +452,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); + (void *)NULL); return TCL_ERROR; } result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs); @@ -699,7 +699,7 @@ TraceCommandObjCmd( "bad operation list \"\": must be one or more of" " delete or rename", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRACE", "NOOPS", - NULL); + (void *)NULL); return TCL_ERROR; } result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs); @@ -903,7 +903,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); + (void *)NULL); return TCL_ERROR; } result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs); diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 3ab741a..30fb89d 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -656,7 +656,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); + (void *)NULL); } return TCL_ERROR; } @@ -708,7 +708,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); + (void *)NULL); } return TCL_ERROR; } @@ -741,7 +741,7 @@ FindElement( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unmatched open brace in %s", typeStr)); Tcl_SetErrorCode(interp, "TCL", "VALUE", typeCode, "BRACE", - NULL); + (void *)NULL); } return TCL_ERROR; } else if (inQuotes) { @@ -749,7 +749,7 @@ FindElement( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unmatched open quote in %s", typeStr)); Tcl_SetErrorCode(interp, "TCL", "VALUE", typeCode, "QUOTE", - NULL); + (void *)NULL); } return TCL_ERROR; } @@ -900,7 +900,7 @@ Tcl_SplitList( Tcl_SetObjResult(interp, Tcl_NewStringObj( "internal error in Tcl_SplitList", -1)); Tcl_SetErrorCode(interp, "TCL", "INTERNAL", "Tcl_SplitList", - NULL); + (void *)NULL); } return TCL_ERROR; } @@ -3997,7 +3997,7 @@ GetEndOffsetFromObj( bytes += 4; } TclCheckBadOctal(interp, bytes); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", (void *)NULL); } return TCL_ERROR; @@ -4807,7 +4807,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, (void *)NULL); } Tcl_DStringFree(dsPtr); return TCL_ERROR; diff --git a/generic/tclVar.c b/generic/tclVar.c index 4110d81..3007296 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -341,7 +341,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, (void *)NULL); return TCL_ERROR; } @@ -645,7 +645,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", (void *)NULL); } return NULL; } @@ -671,7 +671,7 @@ TclObjLookupVarEx( TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg, NEEDARRAY, -1); Tcl_SetErrorCode(interp, "TCL", "VALUE", "VARNAME", - NULL); + (void *)NULL); } return NULL; } @@ -699,7 +699,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), (void *)NULL); } return NULL; } @@ -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, (void *)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, (void *)NULL); } return NULL; } @@ -1112,7 +1112,7 @@ TclLookupArrayElement( TclObjVarErrMsg(interp, arrayNamePtr, elNamePtr, msg, NEEDARRAY, index); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - arrayNamePtr?TclGetString(arrayNamePtr):NULL, NULL); + arrayNamePtr?TclGetString(arrayNamePtr):NULL, (void *)NULL); } return NULL; } @@ -1133,7 +1133,7 @@ TclLookupArrayElement( TclObjVarErrMsg(interp, arrayNamePtr, elNamePtr, msg, NOSUCHELEMENT, index); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ELEMENT", - TclGetString(elNamePtr), NULL); + TclGetString(elNamePtr), (void *)NULL); } } } @@ -1496,7 +1496,7 @@ TclPtrGetVarIdx( */ errorReturn: - Tcl_SetErrorCode(interp, "TCL", "READ", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "READ", "VARNAME", (void *)NULL); if (TclIsVarUndefined(varPtr)) { TclCleanupVar(varPtr, arrayPtr); } @@ -2021,11 +2021,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", (void *)NULL); } else { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, "set", DANGLINGVAR, index); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", (void *)NULL); } } goto earlyError; @@ -2038,7 +2038,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", (void *)NULL); } goto earlyError; } @@ -2131,7 +2131,7 @@ TclPtrSetVarIdx( cleanup: if (resultPtr == NULL) { - Tcl_SetErrorCode(interp, "TCL", "WRITE", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRITE", "VARNAME", (void *)NULL); } if (TclIsVarUndefined(varPtr)) { TclCleanupVar(varPtr, arrayPtr); @@ -2606,7 +2606,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", (void *)NULL); } } @@ -3195,7 +3195,7 @@ ArrayForNRCmd( if (numVars != 2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "must have two variable names", -1)); - Tcl_SetErrorCode(interp, "TCL", "SYNTAX", "array", "for", NULL); + Tcl_SetErrorCode(interp, "TCL", "SYNTAX", "array", "for", (void *)NULL); return TCL_ERROR; } @@ -3297,7 +3297,7 @@ ArrayForLoopCallback( if (done == TCL_ERROR) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "array changed during iteration", -1)); - Tcl_SetErrorCode(interp, "TCL", "READ", "array", "for", NULL); + Tcl_SetErrorCode(interp, "TCL", "READ", "array", "for", (void *)NULL); varPtr->flags |= TCL_LEAVE_ERR_MSG; result = done; } @@ -4112,7 +4112,7 @@ ArraySetCmd( CleanupVar(varPtr, arrayPtr); TclObjVarErrMsg(interp, arrayNameObj, NULL, "set", NEEDARRAY, -1); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - TclGetString(arrayNameObj), NULL); + TclGetString(arrayNameObj), (void *)NULL); return TCL_ERROR; } @@ -4179,7 +4179,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", (void *)NULL); return TCL_ERROR; } if (elemLen == 0) { @@ -4238,7 +4238,7 @@ ArraySetCmd( TclObjVarErrMsg(interp, arrayNameObj, NULL, "array set", NEEDARRAY, -1); - Tcl_SetErrorCode(interp, "TCL", "WRITE", "ARRAY", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRITE", "ARRAY", (void *)NULL); return TCL_ERROR; } } @@ -4622,7 +4622,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", (void *)NULL); return TCL_ERROR; } } @@ -4738,7 +4738,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); + (void *)NULL); return TCL_ERROR; } } @@ -4757,7 +4757,7 @@ TclPtrObjMakeUpvarIdx( if (varPtr == NULL) { TclObjVarErrMsg(interp, myNamePtr, NULL, "create", errMsg, -1); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - TclGetString(myNamePtr), NULL); + TclGetString(myNamePtr), (void *)NULL); return TCL_ERROR; } } @@ -4765,14 +4765,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", (void *)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", (void *)NULL); return TCL_ERROR; } else if (!TclIsVarUndefined(varPtr)) { Var *linkPtr; @@ -4787,7 +4787,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", (void *)NULL); return TCL_ERROR; } @@ -5139,7 +5139,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", (void *)NULL); return TCL_ERROR; } @@ -5290,7 +5290,7 @@ Tcl_UpvarObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad level \"%s\"", TclGetString(levelObj))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LEVEL", - TclGetString(levelObj), NULL); + TclGetString(levelObj), (void *)NULL); return TCL_ERROR; } @@ -5381,7 +5381,7 @@ ParseSearchId( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "couldn't find search \"%s\"", handle)); } - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAYSEARCH", handle, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAYSEARCH", handle, (void *)NULL); return NULL; } @@ -6021,7 +6021,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, (void *)NULL); } return (Tcl_Var) varPtr; } @@ -6687,7 +6687,7 @@ ArrayDefaultCmd( /* Array default must exist. */ Tcl_SetObjResult(interp, Tcl_NewStringObj( "array has no default value", -1)); - Tcl_SetErrorCode(interp, "TCL", "READ", "ARRAY", "DEFAULT", NULL); + Tcl_SetErrorCode(interp, "TCL", "READ", "ARRAY", "DEFAULT", (void *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, defaultValueObj); @@ -6717,7 +6717,7 @@ ArrayDefaultCmd( TclObjVarErrMsg(interp, arrayNameObj, NULL, "array default set", NEEDARRAY, -1); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - TclGetString(arrayNameObj), NULL); + TclGetString(arrayNameObj), (void *)NULL); return TCL_ERROR; } if (!TclIsVarArray(varPtr) && !TclIsVarUndefined(varPtr)) { @@ -6727,7 +6727,7 @@ ArrayDefaultCmd( TclObjVarErrMsg(interp, arrayNameObj, NULL, "array default set", NEEDARRAY, -1); - Tcl_SetErrorCode(interp, "TCL", "WRITE", "ARRAY", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRITE", "ARRAY", (void *)NULL); return TCL_ERROR; } diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 8ce17eb..f625150 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -56,7 +56,7 @@ if (interp) { \ Tcl_SetObjResult(interp, Tcl_NewStringObj( \ "out of memory", -1)); \ - Tcl_SetErrorCode(interp, "TCL", "MALLOC", NULL); \ + Tcl_SetErrorCode(interp, "TCL", "MALLOC", (void *)NULL); \ } \ } while (0) #define ZIPFS_POSIX_ERROR(interp,errstr) \ @@ -69,7 +69,7 @@ #define ZIPFS_ERROR_CODE(interp,errcode) \ do { \ if (interp) { \ - Tcl_SetErrorCode(interp, "TCL", "ZIPFS", errcode, NULL); \ + Tcl_SetErrorCode(interp, "TCL", "ZIPFS", errcode, (void *)NULL); \ } \ } while (0) @@ -167,15 +167,6 @@ static const z_crc_t* crc32tab; #define DEFAULT_WRITE_MAX_SIZE ZIP_MAX_FILE_SIZE /* - * Windows drive letters. - */ - -#ifdef _WIN32 -static const char drvletters[] = - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; -#endif /* _WIN32 */ - -/* * Mutex to protect localtime(3) when no reentrant version available. */ @@ -2370,7 +2361,7 @@ TclZipfs_Mount( Tcl_SetObjResult( interp, Tcl_ObjPrintf("could not normalize zip filename \"%s\"", zipname)); - Tcl_SetErrorCode(interp, "TCL", "OPERATION", "NORMALIZE", NULL); + Tcl_SetErrorCode(interp, "TCL", "OPERATION", "NORMALIZE", (void *)NULL); ret = TCL_ERROR; } else { Tcl_IncrRefCount(normZipPathObj); diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 1810ba1..e951060 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -320,7 +320,7 @@ ConvertError( * type is known). */ - Tcl_SetErrorCode(interp, "TCL", "ZLIB", codeStr, codeStr2, NULL); + Tcl_SetErrorCode(interp, "TCL", "ZLIB", codeStr, codeStr2, (void *)NULL); } static Tcl_Obj * @@ -452,9 +452,9 @@ GenerateHeader( if (interp) { if (result == TCL_CONVERT_UNKNOWN) { Tcl_AppendResult( - interp, "Comment contains characters > 0xFF", NULL); + interp, "Comment contains characters > 0xFF", (void *)NULL); } else { - Tcl_AppendResult(interp, "Comment too large for zip", NULL); + Tcl_AppendResult(interp, "Comment too large for zip", (void *)NULL); } } result = TCL_ERROR; /* TCL_CONVERT_* -> TCL_ERROR*/ @@ -487,10 +487,10 @@ GenerateHeader( if (interp) { if (result == TCL_CONVERT_UNKNOWN) { Tcl_AppendResult( - interp, "Filename contains characters > 0xFF", NULL); + interp, "Filename contains characters > 0xFF", (void *)NULL); } else { Tcl_AppendResult( - interp, "Filename too large for zip", NULL); + interp, "Filename too large for zip", (void *)NULL); } } result = TCL_ERROR; /* TCL_CONVERT_* -> TCL_ERROR*/ @@ -843,7 +843,7 @@ Tcl_ZlibStreamInit( NULL, 0) != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "BUG: Stream command name already exists", -1)); - Tcl_SetErrorCode(interp, "TCL", "BUG", "EXISTING_CMD", NULL); + Tcl_SetErrorCode(interp, "TCL", "BUG", "EXISTING_CMD", (void *)NULL); Tcl_DStringFree(&cmdname); goto error; } @@ -1234,7 +1234,7 @@ Tcl_ZlibStreamPut( if (zshPtr->interp) { Tcl_SetObjResult(zshPtr->interp, Tcl_NewStringObj( "already past compressed stream end", -1)); - Tcl_SetErrorCode(zshPtr->interp, "TCL", "ZIP", "CLOSED", NULL); + Tcl_SetErrorCode(zshPtr->interp, "TCL", "ZIP", "CLOSED", (void *)NULL); } return TCL_ERROR; } @@ -1466,7 +1466,7 @@ Tcl_ZlibStreamGet( "unexpected zlib internal state during" " decompression", -1)); Tcl_SetErrorCode(zshPtr->interp, "TCL", "ZIP", "STATE", - NULL); + (void *)NULL); } Tcl_SetByteArrayLength(data, existing); return TCL_ERROR; @@ -2226,7 +2226,7 @@ ZlibCmd( badLevel: Tcl_SetObjResult(interp, Tcl_NewStringObj("level must be 0 to 9", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "COMPRESSIONLEVEL", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "COMPRESSIONLEVEL", (void *)NULL); if (extraInfoStr) { Tcl_AddErrorInfo(interp, extraInfoStr); } @@ -2235,7 +2235,7 @@ ZlibCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "buffer size must be %d to %d", MIN_NONSTREAM_BUFFER_SIZE, MAX_BUFFER_SIZE)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "BUFFERSIZE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "BUFFERSIZE", (void *)NULL); return TCL_ERROR; } @@ -2370,7 +2370,7 @@ ZlibStreamSubcmd( return TCL_ERROR; } else if (level < 0 || level > 9) { Tcl_SetObjResult(interp, Tcl_NewStringObj("level must be 0 to 9",-1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "COMPRESSIONLEVEL", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "COMPRESSIONLEVEL", (void *)NULL); Tcl_AddErrorInfo(interp, "\n (in -level option)"); return TCL_ERROR; } @@ -2489,13 +2489,13 @@ ZlibPushSubcmd( if (mode == TCL_ZLIB_STREAM_DEFLATE && !(chanMode & TCL_WRITABLE)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "compression may only be applied to writable channels", -1)); - Tcl_SetErrorCode(interp, "TCL", "ZIP", "UNWRITABLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ZIP", "UNWRITABLE", (void *)NULL); return TCL_ERROR; } if (mode == TCL_ZLIB_STREAM_INFLATE && !(chanMode & TCL_READABLE)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "decompression may only be applied to readable channels", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "ZIP", "UNREADABLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ZIP", "UNREADABLE", (void *)NULL); return TCL_ERROR; } @@ -2512,7 +2512,7 @@ ZlibPushSubcmd( if (++i > objc-1) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "value missing for %s option", pushOptions[option])); - Tcl_SetErrorCode(interp, "TCL", "ZIP", "NOVAL", NULL); + Tcl_SetErrorCode(interp, "TCL", "ZIP", "NOVAL", (void *)NULL); return TCL_ERROR; } switch ((enum pushOptionsEnum) option) { @@ -2530,7 +2530,7 @@ ZlibPushSubcmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "level must be 0 to 9", -1)); Tcl_SetErrorCode(interp, "TCL", "VALUE", "COMPRESSIONLEVEL", - NULL); + (void *)NULL); goto genericOptionError; } break; @@ -2542,7 +2542,7 @@ ZlibPushSubcmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "read ahead limit must be 1 to %d", MAX_BUFFER_SIZE)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "BUFFERSIZE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "BUFFERSIZE", (void *)NULL); goto genericOptionError; } break; @@ -2551,7 +2551,7 @@ ZlibPushSubcmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "a compression dictionary may not be set in the " "gzip format", -1)); - Tcl_SetErrorCode(interp, "TCL", "ZIP", "BADOPT", NULL); + Tcl_SetErrorCode(interp, "TCL", "ZIP", "BADOPT", (void *)NULL); goto genericOptionError; } compDictObj = objv[i]; @@ -2763,7 +2763,7 @@ ZlibStreamAddCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-buffer\" option must be followed by integer " "decompression buffersize", -1)); - Tcl_SetErrorCode(interp, "TCL", "ZIP", "NOVAL", NULL); + Tcl_SetErrorCode(interp, "TCL", "ZIP", "NOVAL", (void *)NULL); return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, objv[++i], &buffersize) != TCL_OK) { @@ -2773,7 +2773,7 @@ ZlibStreamAddCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "buffer size must be 1 to %d", MAX_BUFFER_SIZE)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "BUFFERSIZE", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "BUFFERSIZE", (void *)NULL); return TCL_ERROR; } break; @@ -2782,7 +2782,7 @@ ZlibStreamAddCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-dictionary\" option must be followed by" " compression dictionary bytes", -1)); - Tcl_SetErrorCode(interp, "TCL", "ZIP", "NOVAL", NULL); + Tcl_SetErrorCode(interp, "TCL", "ZIP", "NOVAL", (void *)NULL); return TCL_ERROR; } compDictObj = objv[++i]; @@ -2793,7 +2793,7 @@ ZlibStreamAddCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-flush\", \"-fullflush\" and \"-finalize\" options" " are mutually exclusive", -1)); - Tcl_SetErrorCode(interp, "TCL", "ZIP", "EXCLUSIVE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ZIP", "EXCLUSIVE", (void *)NULL); return TCL_ERROR; } } @@ -2890,7 +2890,7 @@ ZlibStreamPutCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-dictionary\" option must be followed by" " compression dictionary bytes", -1)); - Tcl_SetErrorCode(interp, "TCL", "ZIP", "NOVAL", NULL); + Tcl_SetErrorCode(interp, "TCL", "ZIP", "NOVAL", (void *)NULL); return TCL_ERROR; } compDictObj = objv[++i]; @@ -2900,7 +2900,7 @@ ZlibStreamPutCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-flush\", \"-fullflush\" and \"-finalize\" options" " are mutually exclusive", -1)); - Tcl_SetErrorCode(interp, "TCL", "ZIP", "EXCLUSIVE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ZIP", "EXCLUSIVE", (void *)NULL); return TCL_ERROR; } } @@ -2948,7 +2948,7 @@ ZlibStreamHeaderCmd( || zshPtr->format != TCL_ZLIB_FORMAT_GZIP) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "only gunzip streams can produce header information", -1)); - Tcl_SetErrorCode(interp, "TCL", "ZIP", "BADOP", NULL); + Tcl_SetErrorCode(interp, "TCL", "ZIP", "BADOP", (void *)NULL); return TCL_ERROR; } @@ -3391,7 +3391,7 @@ ZlibTransformSetOption( /* not used */ Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown -flush type \"%s\": must be full or sync", value)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "FLUSH", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "FLUSH", (void *)NULL); return TCL_ERROR; } @@ -3410,7 +3410,7 @@ ZlibTransformSetOption( /* not used */ } else if (newLimit < 1 || newLimit > MAX_BUFFER_SIZE) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "-limit must be between 1 and 65536", -1)); - Tcl_SetErrorCode(interp, "TCL", "VALUE", "READLIMIT", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "READLIMIT", (void *)NULL); return TCL_ERROR; } } |