From 14ab5ccf54dac59237afc1a65d09a4a4860f197b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 27 Oct 2023 17:13:59 +0000 Subject: [26870862f0] follow-up: of course it was not complete yet --- generic/tclTest.c | 28 ++++++++++++++-------------- generic/tclTestObj.c | 10 +++++----- generic/tclTestProcBodyObj.c | 6 +++--- generic/tclThreadTest.c | 2 +- win/tclWinDde.c | 18 +++++++++--------- win/tclWinReg.c | 6 +++--- 6 files changed, 35 insertions(+), 35 deletions(-) diff --git a/generic/tclTest.c b/generic/tclTest.c index 8159e19..6a90b67 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -1155,10 +1155,10 @@ TestcmdinfoObjCmd( } if (info.deleteProc == CmdDelProc1) { Tcl_AppendResult(interp, " CmdDelProc1", " ", - (char *) info.deleteData, NULL); + (char *) info.deleteData, (void *)NULL); } else if (info.deleteProc == CmdDelProc2) { Tcl_AppendResult(interp, " CmdDelProc2", " ", - (char *) info.deleteData, NULL); + (char *) info.deleteData, (void *)NULL); } else { Tcl_AppendResult(interp, " unknown", (void *)NULL); } @@ -1313,7 +1313,7 @@ TestcmdtokenCmd( refPtr->nextPtr = firstCommandTokenRef; firstCommandTokenRef = refPtr; snprintf(buf, sizeof(buf), "%d", refPtr->id); - Tcl_AppendResult(interp, buf, NULL); + Tcl_AppendResult(interp, buf, (void *)NULL); } else { if (sscanf(argv[2], "%d", &id) != 1) { Tcl_AppendResult(interp, "bad command token \"", argv[2], @@ -1608,7 +1608,7 @@ CreatedCommandProc( &info); if (!found) { Tcl_AppendResult(interp, "CreatedCommandProc could not get command info for test_ns_basic::createdcommand", - NULL); + (void *)NULL); return TCL_ERROR; } Tcl_AppendResult(interp, "CreatedCommandProc in ", @@ -2835,7 +2835,7 @@ TestexprlongCmd( " expression\"", (void *)NULL); return TCL_ERROR; } - Tcl_AppendResult(interp, "This is a result", NULL); + Tcl_AppendResult(interp, "This is a result", (void *)NULL); result = Tcl_ExprLong(interp, argv[1], &exprResult); if (result != TCL_OK) { return result; @@ -5045,23 +5045,23 @@ TestseterrorcodeCmd( } switch (argc) { case 1: - Tcl_SetErrorCode(interp, "NONE", NULL); + Tcl_SetErrorCode(interp, "NONE", (void *)NULL); break; case 2: - Tcl_SetErrorCode(interp, argv[1], NULL); + Tcl_SetErrorCode(interp, argv[1], (void *)NULL); break; case 3: - Tcl_SetErrorCode(interp, argv[1], argv[2], NULL); + Tcl_SetErrorCode(interp, argv[1], argv[2], (void *)NULL); break; case 4: - Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], NULL); + Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], (void *)NULL); break; case 5: - Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], argv[4], NULL); + Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], argv[4], (void *)NULL); break; case 6: Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], argv[4], - argv[5], NULL); + argv[5], (void *)NULL); } return TCL_ERROR; } @@ -6517,7 +6517,7 @@ TestChannelCmd( } Tcl_AppendResult(interp, - (statePtr->flags & INPUT_SAW_CR) ? "1" : "0", NULL); + (statePtr->flags & INPUT_SAW_CR) ? "1" : "0", (void *)NULL); return TCL_OK; } @@ -6607,7 +6607,7 @@ TestChannelCmd( } if (strcmp(argv[3], "-command") != 0) { Tcl_AppendResult(interp, "bad argument \"", argv[3], - "\": should be \"-command\"", NULL); + "\": should be \"-command\"", (void *)NULL); return TCL_ERROR; } @@ -8291,7 +8291,7 @@ TestconcatobjCmd( Tcl_DecrRefCount(tmpPtr); break; default: - Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); + Tcl_AppendResult(interp, "(more than one refCount added!)", (void *)NULL); Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); } tmpPtr = Tcl_DuplicateObj(list1Ptr); diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index b4d70f0..3b958dd 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -420,7 +420,7 @@ TestbooleanobjCmd( } else { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "bad option \"", Tcl_GetString(objv[1]), - "\": must be set, get, or not", NULL); + "\": must be set, get, or not", (void *)NULL); return TCL_ERROR; } return TCL_OK; @@ -537,7 +537,7 @@ TestdoubleobjCmd( } else { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "bad option \"", Tcl_GetString(objv[1]), - "\": must be set, get, mult10, or div10", NULL); + "\": must be set, get, mult10, or div10", (void *)NULL); return TCL_ERROR; } return TCL_OK; @@ -826,7 +826,7 @@ TestintobjCmd( } else { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "bad option \"", Tcl_GetString(objv[1]), - "\": must be set, get, get2, mult10, or div10", NULL); + "\": must be set, get, get2, mult10, or div10", (void *)NULL); return TCL_ERROR; } return TCL_OK; @@ -1199,7 +1199,7 @@ TestobjCmd( } if ((targetType = Tcl_GetObjType(Tcl_GetString(objv[3]))) == NULL) { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "no type ", Tcl_GetString(objv[3]), " found", NULL); + "no type ", Tcl_GetString(objv[3]), " found", (void *)NULL); return TCL_ERROR; } if (Tcl_ConvertToType(interp, varPtr[varIndex], targetType) @@ -1356,7 +1356,7 @@ TeststringobjCmd( Tcl_AppendStringsToObj(varPtr[varIndex], strings[0], strings[1], strings[2], strings[3], strings[4], strings[5], strings[6], strings[7], strings[8], strings[9], - strings[10], strings[11]); + strings[10], strings[11], (void *)NULL); Tcl_SetObjResult(interp, varPtr[varIndex]); break; case 2: /* get */ diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index 07800ca..2139b81 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -263,7 +263,7 @@ ProcBodyTestProcObjCmd( if (cmdPtr->objClientData != TclIsProc(cmdPtr)) { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "command \"", fullName, "\" is not a Tcl procedure", NULL); + "command \"", fullName, "\" is not a Tcl procedure", (void *)NULL); return TCL_ERROR; } @@ -274,7 +274,7 @@ ProcBodyTestProcObjCmd( procPtr = (Proc *) cmdPtr->objClientData; if (procPtr == NULL) { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "procedure \"", - fullName, "\" does not have a Proc struct!", NULL); + fullName, "\" does not have a Proc struct!", (void *)NULL); return TCL_ERROR; } @@ -286,7 +286,7 @@ ProcBodyTestProcObjCmd( if (bodyObjPtr == NULL) { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "failed to create a procbody object for procedure \"", - fullName, "\"", NULL); + fullName, "\"", (void *)NULL); return TCL_ERROR; } Tcl_IncrRefCount(bodyObjPtr); diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 7b158b4..cd74071 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -913,7 +913,7 @@ ThreadSend( if (resultPtr->code != TCL_OK) { if (resultPtr->errorCode) { - Tcl_SetErrorCode(interp, resultPtr->errorCode, NULL); + Tcl_SetErrorCode(interp, resultPtr->errorCode, (void *)NULL); ckfree(resultPtr->errorCode); } if (resultPtr->errorInfo) { diff --git a/win/tclWinDde.c b/win/tclWinDde.c index d01e7ae..7db5312 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -574,7 +574,7 @@ ExecuteRemoteObject( Tcl_SetObjResult(riPtr->interp, Tcl_NewStringObj("permission denied: " "a handler procedure must be defined for use in a safe " "interp", TCL_INDEX_NONE)); - Tcl_SetErrorCode(riPtr->interp, "TCL", "DDE", "SECURITY_CHECK", NULL); + Tcl_SetErrorCode(riPtr->interp, "TCL", "DDE", "SECURITY_CHECK", (void *)NULL); result = TCL_ERROR; } @@ -1046,7 +1046,7 @@ MakeDdeConnection( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "no registered server named \"%s\"", Tcl_DStringValue(&dString))); Tcl_DStringFree(&dString); - Tcl_SetErrorCode(interp, "TCL", "DDE", "NO_SERVER", NULL); + Tcl_SetErrorCode(interp, "TCL", "DDE", "NO_SERVER", (void *)NULL); } return TCL_ERROR; } @@ -1277,7 +1277,7 @@ SetDdeError( } Tcl_SetObjResult(interp, Tcl_NewStringObj(errorMessage, TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "DDE", errorCode, NULL); + Tcl_SetErrorCode(interp, "TCL", "DDE", errorCode, (void *)NULL); } /* @@ -1564,7 +1564,7 @@ DdeObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj("cannot execute null data", TCL_INDEX_NONE)); Tcl_DStringFree(&dsBuf); - Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", NULL); + Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", (void *)NULL); result = TCL_ERROR; break; } @@ -1614,7 +1614,7 @@ DdeObjCmd( if (length == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj("cannot request value of null data", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", NULL); + Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", (void *)NULL); result = TCL_ERROR; goto cleanup; } @@ -1680,7 +1680,7 @@ DdeObjCmd( if (length == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj("cannot have a null item", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", NULL); + Tcl_SetErrorCode(interp, "TCL", "DDE", "NULL", (void *)NULL); result = TCL_ERROR; goto cleanup; } @@ -1734,7 +1734,7 @@ DdeObjCmd( if (serviceName == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("invalid service name \"\"", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "DDE", "NO_SERVER", NULL); + Tcl_SetErrorCode(interp, "TCL", "DDE", "NO_SERVER", (void *)NULL); result = TCL_ERROR; goto cleanup; } @@ -1783,7 +1783,7 @@ DdeObjCmd( "permission denied: a handler procedure must be" " defined for use in a safe interp", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TCL", "DDE", "SECURITY_CHECK", - NULL); + (void *)NULL); result = TCL_ERROR; } @@ -1848,7 +1848,7 @@ DdeObjCmd( invalidServerResponse: Tcl_SetObjResult(interp, Tcl_NewStringObj("invalid data returned from server", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TCL", "DDE", "BAD_RESPONSE", NULL); + Tcl_SetErrorCode(interp, "TCL", "DDE", "BAD_RESPONSE", (void *)NULL); result = TCL_ERROR; goto cleanup; } diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 1ccb105..4157380 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -462,7 +462,7 @@ DeleteKey( if (*keyName == '\0') { Tcl_SetObjResult(interp, Tcl_NewStringObj("bad key: cannot delete root keys", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "WIN_REG", "DEL_ROOT_KEY", NULL); + Tcl_SetErrorCode(interp, "WIN_REG", "DEL_ROOT_KEY", (void *)NULL); Tcl_Free(buffer); return TCL_ERROR; } @@ -1143,7 +1143,7 @@ ParseKeyName( if (!rootName) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad key \"%s\": must start with a valid root", name)); - Tcl_SetErrorCode(interp, "WIN_REG", "NO_ROOT_KEY", NULL); + Tcl_SetErrorCode(interp, "WIN_REG", "NO_ROOT_KEY", (void *)NULL); return TCL_ERROR; } @@ -1535,7 +1535,7 @@ AppendSystemError( } snprintf(id, sizeof(id), "%ld", error); - Tcl_SetErrorCode(interp, "WINDOWS", id, msg, NULL); + Tcl_SetErrorCode(interp, "WINDOWS", id, msg, (void *)NULL); Tcl_AppendToObj(resultPtr, msg, length); Tcl_SetObjResult(interp, resultPtr); -- cgit v0.12