summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-28 12:46:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-28 12:46:42 (GMT)
commit4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f (patch)
treed5db4ca8a1fecbd63d9e72730fad2f404367daff /generic/tclPathObj.c
parent63994a73e3f641451b26f48f697b6a069863751c (diff)
parent52e543c5691a60c3ef802fecf1ae08e7efcf19b7 (diff)
downloadtcl-4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f.zip
tcl-4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f.tar.gz
tcl-4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r--generic/tclPathObj.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index dd78362..578c6ff 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -1272,7 +1272,7 @@ TclNewFSPathObj(
}
pathPtr = Tcl_NewObj();
- fsPathPtr = Tcl_Alloc(sizeof(FsPath));
+ fsPathPtr = (FsPath *)Tcl_Alloc(sizeof(FsPath));
/*
* Set up the path.
@@ -1384,13 +1384,14 @@ AppendPath(
Tcl_Obj *
TclFSMakePathRelative(
- Tcl_Interp *interp, /* Used for error reporting if not NULL. */
+ Tcl_Interp *dummy, /* Used for error reporting if not NULL. */
Tcl_Obj *pathPtr, /* The path we have. */
Tcl_Obj *cwdPtr) /* Make it relative to this. */
{
size_t cwdLen, len;
const char *tempStr;
Tcl_ObjIntRep *irPtr = TclFetchIntRep(pathPtr, &fsPathType);
+ (void)dummy;
if (irPtr) {
FsPath *fsPathPtr = PATHOBJ(pathPtr);
@@ -1455,16 +1456,17 @@ TclFSMakePathRelative(
static int
MakePathFromNormalized(
- Tcl_Interp *interp, /* Used for error reporting if not NULL. */
+ Tcl_Interp *dummy, /* Not used. */
Tcl_Obj *pathPtr) /* The object to convert. */
{
FsPath *fsPathPtr;
+ (void)dummy;
if (TclHasIntRep(pathPtr, &fsPathType)) {
return TCL_OK;
}
- fsPathPtr = Tcl_Alloc(sizeof(FsPath));
+ fsPathPtr = (FsPath *)Tcl_Alloc(sizeof(FsPath));
/*
* It's a pure normalized absolute path.
@@ -1532,7 +1534,7 @@ Tcl_FSNewNativePath(
*/
Tcl_StoreIntRep(pathPtr, &fsPathType, NULL);
- fsPathPtr = Tcl_Alloc(sizeof(FsPath));
+ fsPathPtr = (FsPath *)Tcl_Alloc(sizeof(FsPath));
fsPathPtr->translatedPathPtr = NULL;
@@ -1658,7 +1660,7 @@ Tcl_FSGetTranslatedStringPath(
if (transPtr != NULL) {
size_t len;
const char *orig = TclGetStringFromObj(transPtr, &len);
- char *result = Tcl_Alloc(len+1);
+ char *result = (char *)Tcl_Alloc(len+1);
memcpy(result, orig, len+1);
TclDecrRefCount(transPtr);
@@ -2014,7 +2016,7 @@ Tcl_FSGetInternalRep(
return NULL;
}
- nativePathPtr = proc(pathPtr);
+ nativePathPtr = (char *)proc(pathPtr);
srcFsPathPtr = PATHOBJ(pathPtr);
srcFsPathPtr->nativePathPtr = nativePathPtr;
srcFsPathPtr->filesystemEpoch = TclFSEpoch();
@@ -2348,7 +2350,7 @@ SetFsPathFromAny(
* slashes on Windows, and will not contain any ~user sequences.
*/
- fsPathPtr = Tcl_Alloc(sizeof(FsPath));
+ fsPathPtr = (FsPath *)Tcl_Alloc(sizeof(FsPath));
if (transPtr == pathPtr) {
transPtr = Tcl_DuplicateObj(pathPtr);
@@ -2408,7 +2410,7 @@ DupFsPathInternalRep(
Tcl_Obj *copyPtr) /* Path obj with internal rep to set. */
{
FsPath *srcFsPathPtr = PATHOBJ(srcPtr);
- FsPath *copyFsPathPtr = Tcl_Alloc(sizeof(FsPath));
+ FsPath *copyFsPathPtr = (FsPath *)Tcl_Alloc(sizeof(FsPath));
SETPATHOBJ(copyPtr, copyFsPathPtr);
@@ -2512,8 +2514,9 @@ UpdateStringOfFsPath(
int
TclNativePathInFilesystem(
Tcl_Obj *pathPtr,
- ClientData *clientDataPtr)
+ ClientData *dummy)
{
+ (void)dummy;
/*
* A special case is required to handle the empty path "". This is a valid
* path (i.e. the user should be able to do 'file exists ""' without