removed compiler warnings
authorVince Darley <vincentdarley@sourceforge.net>
Fri, 17 Oct 2003 14:54:48 +0000 (14:54 +0000)
committerVince Darley <vincentdarley@sourceforge.net>
Fri, 17 Oct 2003 14:54:48 +0000 (14:54 +0000)
ChangeLog
generic/vfs.c

index 969a0ca6cfbea39a883cc68dc82042c4002fd449..31437bb19062a3c6982f390ba0bb582a64721d78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-10-17  Vince Darley <vincentdarley@sourceforge.net>
+
+       * generic/vfs.c: removed some compiler warnings on OS X.
+
 2003-10-13  Vince Darley <vincentdarley@sourceforge.net>
 
        * generic/vfs.c: added support for TCL_GLOB_TYPE_MOUNT flag to
index a20f5a3d17cb668ae787c74cd0c16b6a393bee37..ce7dd81727640b644a81ad8197935cc8c51b6dfd 100644 (file)
@@ -478,7 +478,7 @@ Vfs_AddMount(mountPoint, isVolume, interp, mountCmd)
        return TCL_ERROR;
     }
     strRep = Tcl_GetStringFromObj(mountPoint, &len);
-    newMount->mountPoint = (char*) ckalloc(1+len);
+    newMount->mountPoint = (char*) ckalloc(1+(unsigned)len);
     newMount->mountLen = len;
     
     if (newMount->mountPoint == NULL) {
@@ -631,7 +631,7 @@ Vfs_FindMount(pathMount, mountLen)
     mountIter = listOfMounts;
     while (mountIter != NULL) {
        if (mountIter->mountLen == mountLen && 
-         !strncmp(mountIter->mountPoint, mountStr, mountLen)) {
+         !strncmp(mountIter->mountPoint, mountStr, (size_t)mountLen)) {
            Vfs_InterpCmd *ret = &mountIter->interpCmd;
            Tcl_MutexUnlock(&vfsMountsMutex);
            return ret;
@@ -722,7 +722,6 @@ VfsFilesystemObjCmd(dummy, interp, objc, objv)
 
     switch ((enum options) index) {
        case VFS_INTERNAL_ERROR: {
-           int posixError = -1;
            if (objc > 3) {
                Tcl_WrongNumArgs(interp, 2, objv, "?script?");
                return TCL_ERROR;
@@ -737,11 +736,11 @@ VfsFilesystemObjCmd(dummy, interp, objc, objv)
            } else {
                /* Set the script */
                int len;
-               CONST char* str = Tcl_GetStringFromObj(objv[2],&len);
                Tcl_MutexLock(&internalErrorMutex);
                if (internalErrorScript != NULL) {
                    Tcl_DecrRefCount(internalErrorScript);
                }
+               Tcl_GetStringFromObj(objv[2], &len);
                if (len == 0) {
                    /* Clear our script */
                    internalErrorScript = NULL;
@@ -1478,7 +1477,7 @@ VfsMatchInDirectory(
        mountIter = listOfMounts;
        while (mountIter != NULL) {
            if (mountIter->mountLen > (len+1) 
-               && !strncmp(mountIter->mountPoint, prefix, len) 
+               && !strncmp(mountIter->mountPoint, prefix, (size_t)len) 
                && mountIter->mountPoint[len] == '/'
                && strchr(mountIter->mountPoint+len+1, '/') == NULL
                && Tcl_StringCaseMatch(mountIter->mountPoint+len+1,