summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-10-19 18:09:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-10-19 18:09:11 (GMT)
commitc90945e7f32fce45c4a00d249c7133156ee8a45b (patch)
treedbcf2d1dd6e3132462b67b2e72e93e9f5151f6c0 /generic/tclEncoding.c
parentfdb568c35f1cd6de7f1acd05fdbd4f8b6cf5aee1 (diff)
parent6def0d48c1fff35f9f5b3bfbe1ddbe6cedd2c247 (diff)
downloadtcl-c90945e7f32fce45c4a00d249c7133156ee8a45b.zip
tcl-c90945e7f32fce45c4a00d249c7133156ee8a45b.tar.gz
tcl-c90945e7f32fce45c4a00d249c7133156ee8a45b.tar.bz2
Fix [26870862f0]: Wrong sentinel in Tcl_SetErrorCode usage; Handle any C++-compiler as well
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c20
1 files changed, 10 insertions, 10 deletions
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;
}