Tcl Source Code

Check-in [cf865c6e2b]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Eliminate many (mostly harmless) MSVC warning messages. Tcl 9 compiles warning-free now on MSVC.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: cf865c6e2b5055b17d7454062aa1a72d24a3c34a9a44003324629ac06451e39a
User & Date: jan.nijtmans 2019-03-13 20:44:29
Context
2019-03-14
20:03
merge-mark check-in: 80c345bf67 user: jan.nijtmans tags: trunk
2019-03-13
20:44
Eliminate many (mostly harmless) MSVC warning messages. Tcl 9 compiles warning-free now on MSVC. check-in: cf865c6e2b user: jan.nijtmans tags: trunk
20:43
Make "struct regmatch_t" match "Tcl_RegExpIndices" (again). Win64 build was broken because of this. ... check-in: c38fd94d09 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to generic/tclBinary.c.

   636    636       size_t length;
   637    637       ByteArray *srcArrayPtr, *copyArrayPtr;
   638    638       Tcl_ObjIntRep ir;
   639    639   
   640    640       srcArrayPtr = GET_BYTEARRAY(TclFetchIntRep(srcPtr, &tclByteArrayType));
   641    641       length = srcArrayPtr->used;
   642    642   
   643         -    copyArrayPtr = ckalloc(BYTEARRAY_SIZE(length));
          643  +    copyArrayPtr = Tcl_Alloc(BYTEARRAY_SIZE(length));
   644    644       copyArrayPtr->used = length;
   645    645       copyArrayPtr->allocated = length;
   646    646       memcpy(copyArrayPtr->bytes, srcArrayPtr->bytes, length);
   647    647   
   648    648       SET_BYTEARRAY(&ir, copyArrayPtr);
   649    649       Tcl_StoreIntRep(copyPtr, &tclByteArrayType, &ir);
   650    650   }

Changes to generic/tclCompCmds.c.

  1562   1562       if (Tcl_SplitList(NULL, Tcl_DStringValue(&buffer), &numVars,
  1563   1563   	    &argv) != TCL_OK) {
  1564   1564   	Tcl_DStringFree(&buffer);
  1565   1565   	return TclCompileBasic3ArgCmd(interp, parsePtr, cmdPtr, envPtr);
  1566   1566       }
  1567   1567       Tcl_DStringFree(&buffer);
  1568   1568       if (numVars != 2) {
  1569         -	Tcl_Free(argv);
         1569  +	Tcl_Free((void *)argv);
  1570   1570   	return TclCompileBasic3ArgCmd(interp, parsePtr, cmdPtr, envPtr);
  1571   1571       }
  1572   1572   
  1573   1573       nameChars = strlen(argv[0]);
  1574   1574       keyVarIndex = LocalScalar(argv[0], nameChars, envPtr);
  1575   1575       nameChars = strlen(argv[1]);
  1576   1576       valueVarIndex = LocalScalar(argv[1], nameChars, envPtr);
  1577         -    Tcl_Free(argv);
         1577  +    Tcl_Free((void *)argv);
  1578   1578   
  1579   1579       if ((keyVarIndex < 0) || (valueVarIndex < 0)) {
  1580   1580   	return TclCompileBasic3ArgCmd(interp, parsePtr, cmdPtr, envPtr);
  1581   1581       }
  1582   1582   
  1583   1583       /*
  1584   1584        * Allocate a temporary variable to store the iterator reference. The

Changes to generic/tclEncoding.c.

  1999   1999   		   Tcl_FreeEncoding((Tcl_Encoding) e);
  2000   2000   		   e = NULL;
  2001   2001   		}
  2002   2002   		est.encodingPtr = e;
  2003   2003   		Tcl_DStringAppend(&escapeData, (char *) &est, sizeof(est));
  2004   2004   	    }
  2005   2005   	}
  2006         -	Tcl_Free(argv);
         2006  +	Tcl_Free((void *)argv);
  2007   2007   	Tcl_DStringFree(&lineString);
  2008   2008       }
  2009   2009   
  2010   2010       size = sizeof(EscapeEncodingData) - sizeof(EscapeSubTable)
  2011   2011   	    + Tcl_DStringLength(&escapeData);
  2012   2012       dataPtr = Tcl_Alloc(size);
  2013   2013       dataPtr->initLen = strlen(init);

Changes to generic/tclEnsemble.c.

  1641   1641   	}
  1642   1642   	Tcl_SetEnsembleMappingDict(interp, ensemble, mapDict);
  1643   1643       }
  1644   1644   
  1645   1645       Tcl_DStringFree(&buf);
  1646   1646       Tcl_DStringFree(&hiddenBuf);
  1647   1647       if (nameParts != NULL) {
  1648         -	Tcl_Free(nameParts);
         1648  +	Tcl_Free((void *)nameParts);
  1649   1649       }
  1650   1650       return ensemble;
  1651   1651   }
  1652   1652   
  1653   1653   /*
  1654   1654    *----------------------------------------------------------------------
  1655   1655    *

Changes to generic/tclIO.c.

  4404   4404   	     * When translating from UTF-8 to external encoding, we allowed
  4405   4405   	     * the translation to produce a character that crossed the end of
  4406   4406   	     * the output buffer, so that we would get a completely full
  4407   4407   	     * buffer before flushing it. The extra bytes will be moved to the
  4408   4408   	     * beginning of the next buffer.
  4409   4409   	     */
  4410   4410   
  4411         -	    saved = -SpaceLeft(bufPtr);
         4411  +	    saved = 1 + ~SpaceLeft(bufPtr);
  4412   4412   	    memcpy(safe, dst + dstLen, saved);
  4413   4413   	    bufPtr->nextAdded = bufPtr->bufLength;
  4414   4414   	}
  4415   4415   
  4416   4416   	if ((srcLen + saved == 0) && (result == TCL_OK)) {
  4417   4417   	    endEncoding = 0;
  4418   4418   	}
................................................................................
  7668   7668   	argc--;
  7669   7669   	for (i = 0; i < argc; i++) {
  7670   7670   	    Tcl_AppendPrintfToObj(errObj, "-%s, ", argv[i]);
  7671   7671   	}
  7672   7672   	Tcl_AppendPrintfToObj(errObj, "or -%s", argv[i]);
  7673   7673           Tcl_SetObjResult(interp, errObj);
  7674   7674   	Tcl_DStringFree(&ds);
  7675         -	Tcl_Free(argv);
         7675  +	Tcl_Free((void *)argv);
  7676   7676       }
  7677   7677       Tcl_SetErrno(EINVAL);
  7678   7678       return TCL_ERROR;
  7679   7679   }
  7680   7680   
  7681   7681   /*
  7682   7682    *----------------------------------------------------------------------
................................................................................
  8059   8059   
  8060   8060   	    if (inValue & 0x80 || outValue & 0x80) {
  8061   8061   		if (interp) {
  8062   8062   		    Tcl_SetObjResult(interp, Tcl_NewStringObj(
  8063   8063                               "bad value for -eofchar: must be non-NUL ASCII"
  8064   8064                               " character", -1));
  8065   8065   		}
  8066         -		Tcl_Free(argv);
         8066  +		Tcl_Free((void *)argv);
  8067   8067   		return TCL_ERROR;
  8068   8068   	    }
  8069   8069   	    if (GotFlag(statePtr, TCL_READABLE)) {
  8070   8070   		statePtr->inEofChar = inValue;
  8071   8071   	    }
  8072   8072   	    if (GotFlag(statePtr, TCL_WRITABLE)) {
  8073   8073   		statePtr->outEofChar = outValue;
................................................................................
  8074   8074   	    }
  8075   8075   	} else {
  8076   8076   	    if (interp) {
  8077   8077   		Tcl_SetObjResult(interp, Tcl_NewStringObj(
  8078   8078   			"bad value for -eofchar: should be a list of zero,"
  8079   8079   			" one, or two elements", -1));
  8080   8080   	    }
  8081         -	    Tcl_Free(argv);
         8081  +	    Tcl_Free((void *)argv);
  8082   8082   	    return TCL_ERROR;
  8083   8083   	}
  8084   8084   	if (argv != NULL) {
  8085         -	    Tcl_Free(argv);
         8085  +	    Tcl_Free((void *)argv);
  8086   8086   	}
  8087   8087   
  8088   8088   	/*
  8089   8089   	 * [Bug 930851] Reset EOF and BLOCKED flags. Changing the character
  8090   8090   	 * which signals eof can transform a current eof condition into a 'go
  8091   8091   	 * ahead'. Ditto for blocked.
  8092   8092   	 */
................................................................................
  8112   8112   	    writeMode = GotFlag(statePtr, TCL_WRITABLE) ? argv[1] : NULL;
  8113   8113   	} else {
  8114   8114   	    if (interp) {
  8115   8115   		Tcl_SetObjResult(interp, Tcl_NewStringObj(
  8116   8116   			"bad value for -translation: must be a one or two"
  8117   8117   			" element list", -1));
  8118   8118   	    }
  8119         -	    Tcl_Free(argv);
         8119  +	    Tcl_Free((void *)argv);
  8120   8120   	    return TCL_ERROR;
  8121   8121   	}
  8122   8122   
  8123   8123   	if (readMode) {
  8124   8124   	    TclEolTranslation translation;
  8125   8125   
  8126   8126   	    if (*readMode == '\0') {
................................................................................
  8142   8142   		translation = TCL_PLATFORM_TRANSLATION;
  8143   8143   	    } else {
  8144   8144   		if (interp) {
  8145   8145   		    Tcl_SetObjResult(interp, Tcl_NewStringObj(
  8146   8146   			    "bad value for -translation: must be one of "
  8147   8147                               "auto, binary, cr, lf, crlf, or platform", -1));
  8148   8148   		}
  8149         -		Tcl_Free(argv);
         8149  +		Tcl_Free((void *)argv);
  8150   8150   		return TCL_ERROR;
  8151   8151   	    }
  8152   8152   
  8153   8153   	    /*
  8154   8154   	     * Reset the EOL flags since we need to look at any buffered data
  8155   8155   	     * to see if the new translation mode allows us to complete the
  8156   8156   	     * line.
................................................................................
  8192   8192   		statePtr->outputTranslation = TCL_PLATFORM_TRANSLATION;
  8193   8193   	    } else {
  8194   8194   		if (interp) {
  8195   8195   		    Tcl_SetObjResult(interp, Tcl_NewStringObj(
  8196   8196   			    "bad value for -translation: must be one of "
  8197   8197                               "auto, binary, cr, lf, crlf, or platform", -1));
  8198   8198   		}
  8199         -		Tcl_Free(argv);
         8199  +		Tcl_Free((void *)argv);
  8200   8200   		return TCL_ERROR;
  8201   8201   	    }
  8202   8202   	}
  8203         -	Tcl_Free(argv);
         8203  +	Tcl_Free((void *)argv);
  8204   8204   	return TCL_OK;
  8205   8205       } else if (chanPtr->typePtr->setOptionProc != NULL) {
  8206   8206   	return chanPtr->typePtr->setOptionProc(chanPtr->instanceData, interp,
  8207   8207   		optionName, newValue);
  8208   8208       } else {
  8209   8209   	return Tcl_BadChannelOption(interp, optionName, NULL);
  8210   8210       }

Changes to generic/tclIOCmd.c.

  1161   1161   		break;
  1162   1162   	    }
  1163   1163   	    chan = Tcl_OpenCommandChannel(interp, cmdObjc, cmdArgv, flags);
  1164   1164   	    if (binary && chan) {
  1165   1165   		Tcl_SetChannelOption(interp, chan, "-translation", "binary");
  1166   1166   	    }
  1167   1167   	}
  1168         -	Tcl_Free(cmdArgv);
         1168  +	Tcl_Free((void *)cmdArgv);
  1169   1169       }
  1170   1170       if (chan == NULL) {
  1171   1171   	return TCL_ERROR;
  1172   1172       }
  1173   1173       Tcl_RegisterChannel(interp, chan);
  1174   1174       Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_GetChannelName(chan), -1));
  1175   1175       return TCL_OK;

Changes to generic/tclIORChan.c.

  1255   1255       ClientData clientData,
  1256   1256       char *buf,
  1257   1257       int toRead,
  1258   1258       int *errorCodePtr)
  1259   1259   {
  1260   1260       ReflectedChannel *rcPtr = clientData;
  1261   1261       Tcl_Obj *toReadObj;
  1262         -    size_t bytec;			/* Number of returned bytes */
         1262  +    size_t bytec = 0;		/* Number of returned bytes */
  1263   1263       unsigned char *bytev;	/* Array of returned bytes */
  1264   1264       Tcl_Obj *resObj;		/* Result data for 'read' */
  1265   1265   
  1266   1266       /*
  1267   1267        * Are we in the correct thread?
  1268   1268        */
  1269   1269   

Changes to generic/tclIOUtil.c.

  1663   1663   	    mode |= O_NOCTTY;
  1664   1664   #else
  1665   1665   	    if (interp != NULL) {
  1666   1666   		Tcl_SetObjResult(interp, Tcl_ObjPrintf(
  1667   1667   			"access mode \"%s\" not supported by this system",
  1668   1668   			flag));
  1669   1669   	    }
  1670         -	    Tcl_Free(modeArgv);
         1670  +	    Tcl_Free((void *)modeArgv);
  1671   1671   	    return -1;
  1672   1672   #endif
  1673   1673   
  1674   1674   	} else if ((c == 'N') && (strcmp(flag, "NONBLOCK") == 0)) {
  1675   1675   #ifdef O_NONBLOCK
  1676   1676   	    mode |= O_NONBLOCK;
  1677   1677   #else
  1678   1678   	    if (interp != NULL) {
  1679   1679   		Tcl_SetObjResult(interp, Tcl_ObjPrintf(
  1680   1680   			"access mode \"%s\" not supported by this system",
  1681   1681   			flag));
  1682   1682   	    }
  1683         -	    Tcl_Free(modeArgv);
         1683  +	    Tcl_Free((void *)modeArgv);
  1684   1684   	    return -1;
  1685   1685   #endif
  1686   1686   
  1687   1687   	} else if ((c == 'T') && (strcmp(flag, "TRUNC") == 0)) {
  1688   1688   	    mode |= O_TRUNC;
  1689   1689   	} else if ((c == 'B') && (strcmp(flag, "BINARY") == 0)) {
  1690   1690   	    *binaryPtr = 1;
................................................................................
  1692   1692   
  1693   1693   	    if (interp != NULL) {
  1694   1694   		Tcl_SetObjResult(interp, Tcl_ObjPrintf(
  1695   1695   			"invalid access mode \"%s\": must be RDONLY, WRONLY, "
  1696   1696   			"RDWR, APPEND, BINARY, CREAT, EXCL, NOCTTY, NONBLOCK,"
  1697   1697   			" or TRUNC", flag));
  1698   1698   	    }
  1699         -	    Tcl_Free(modeArgv);
         1699  +	    Tcl_Free((void *)modeArgv);
  1700   1700   	    return -1;
  1701   1701   	}
  1702   1702       }
  1703   1703   
  1704         -    Tcl_Free(modeArgv);
         1704  +    Tcl_Free((void *)modeArgv);
  1705   1705   
  1706   1706       if (!gotRW) {
  1707   1707   	if (interp != NULL) {
  1708   1708   	    Tcl_SetObjResult(interp, Tcl_NewStringObj(
  1709   1709   		    "access mode must include either RDONLY, WRONLY, or RDWR",
  1710   1710   		    -1));
  1711   1711   	}

Changes to generic/tclIndexObj.c.

   134    134       tablePtr = Tcl_Alloc((objc + 1) * sizeof(char *));
   135    135       for (t = 0; t < objc; t++) {
   136    136   	if (objv[t] == objPtr) {
   137    137   	    /*
   138    138   	     * An exact match is always chosen, so we can stop here.
   139    139   	     */
   140    140   
   141         -	    Tcl_Free(tablePtr);
          141  +	    Tcl_Free((void *)tablePtr);
   142    142   	    *indexPtr = t;
   143    143   	    return TCL_OK;
   144    144   	}
   145    145   
   146    146   	tablePtr[t] = TclGetString(objv[t]);
   147    147       }
   148    148       tablePtr[objc] = NULL;
   149    149   
   150    150       result = Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr,
   151    151   	    sizeof(char *), msg, flags | INDEX_TEMP_TABLE, indexPtr);
   152    152   
   153         -    Tcl_Free(tablePtr);
          153  +    Tcl_Free((void *)tablePtr);
   154    154   
   155    155       return result;
   156    156   }
   157    157   
   158    158   /*
   159    159    *----------------------------------------------------------------------
   160    160    *

Changes to generic/tclInt.h.

  4405   4405      }
  4406   4406   #else
  4407   4407   #define TclGetStringFromObj(objPtr, lenPtr) \
  4408   4408       (((objPtr)->bytes \
  4409   4409   	    ? NULL : Tcl_GetString((objPtr)), \
  4410   4410   	    *(lenPtr) = (objPtr)->length, (objPtr)->bytes))
  4411   4411   #define TclGetUnicodeFromObj(objPtr, lenPtr) \
  4412         -    (Tcl_GetUnicodeFromObj(objPtr, NULL), \
         4412  +    (Tcl_GetUnicodeFromObj((objPtr), NULL), \
  4413   4413   	    *(lenPtr) = *((size_t *) (objPtr)->internalRep.twoPtrValue.ptr1), \
  4414         -	    Tcl_GetUnicodeFromObj(objPtr, NULL))
         4414  +	    Tcl_GetUnicodeFromObj((objPtr), NULL))
  4415   4415   #define TclGetByteArrayFromObj(objPtr, lenPtr) \
  4416         -    (Tcl_GetByteArrayFromObj(objPtr, NULL) ? \
         4416  +    (Tcl_GetByteArrayFromObj((objPtr), NULL) ? \
  4417   4417   	(*(lenPtr) = *((size_t *) (objPtr)->internalRep.twoPtrValue.ptr1), \
  4418         -	(unsigned char *)(((size_t *) (objPtr)->internalRep.twoPtrValue.ptr1) + 2)) : (*(lenPtr) = 0, NULL))
         4418  +	(unsigned char *)(((size_t *) (objPtr)->internalRep.twoPtrValue.ptr1) + 2)) : NULL)
  4419   4419   #endif
  4420   4420   
  4421   4421   /*
  4422   4422    *----------------------------------------------------------------
  4423   4423    * Macro used by the Tcl core to clean out an object's internal
  4424   4424    * representation. Does not actually reset the rep's bytes. The ANSI C
  4425   4425    * "prototype" for this macro is:

Changes to generic/tclOOBasic.c.

   601    601   	}
   602    602   	Tcl_AppendToObj(errorMsg, methodNames[i], -1);
   603    603       }
   604    604       if (i) {
   605    605   	Tcl_AppendToObj(errorMsg, " or ", -1);
   606    606       }
   607    607       Tcl_AppendToObj(errorMsg, methodNames[i], -1);
   608         -    Tcl_Free(methodNames);
          608  +    Tcl_Free((void *)methodNames);
   609    609       Tcl_SetObjResult(interp, errorMsg);
   610    610       Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD",
   611    611   	    TclGetString(objv[skip]), NULL);
   612    612       return TCL_ERROR;
   613    613   }
   614    614   
   615    615   /*

Changes to generic/tclOOCall.c.

   631    631   
   632    632       if (i > 0) {
   633    633   	if (i > 1) {
   634    634   	    qsort((void *) strings, i, sizeof(char *), CmpStr);
   635    635   	}
   636    636   	*stringsPtr = strings;
   637    637       } else {
   638         -	Tcl_Free(strings);
          638  +	Tcl_Free((void *)strings);
   639    639   	*stringsPtr = NULL;
   640    640       }
   641    641       return i;
   642    642   }
   643    643   
   644    644   /* Comparator for SortMethodNames */
   645    645   static int

Changes to generic/tclOOInfo.c.

   608    608   		&names);
   609    609   
   610    610   	for (i=0 ; i<numNames ; i++) {
   611    611   	    Tcl_ListObjAppendElement(NULL, resultObj,
   612    612   		    Tcl_NewStringObj(names[i], -1));
   613    613   	}
   614    614   	if (numNames > 0) {
   615         -	    Tcl_Free(names);
          615  +	    Tcl_Free((void *)names);
   616    616   	}
   617    617       } else if (oPtr->methodsPtr) {
   618    618   	FOREACH_HASH(namePtr, mPtr, oPtr->methodsPtr) {
   619    619   	    if (mPtr->typePtr && (mPtr->flags & SCOPE_FLAGS) == flag) {
   620    620   		Tcl_ListObjAppendElement(NULL, resultObj, namePtr);
   621    621   	    }
   622    622   	}
................................................................................
  1362   1362   	int i, numNames = TclOOGetSortedClassMethodList(clsPtr, flag, &names);
  1363   1363   
  1364   1364   	for (i=0 ; i<numNames ; i++) {
  1365   1365   	    Tcl_ListObjAppendElement(NULL, resultObj,
  1366   1366   		    Tcl_NewStringObj(names[i], -1));
  1367   1367   	}
  1368   1368   	if (numNames > 0) {
  1369         -	    Tcl_Free(names);
         1369  +	    Tcl_Free((void *)names);
  1370   1370   	}
  1371   1371       } else {
  1372   1372   	FOREACH_HASH_DECLS;
  1373   1373   
  1374   1374   	FOREACH_HASH(namePtr, mPtr, &clsPtr->classMethods) {
  1375   1375   	    if (mPtr->typePtr && (mPtr->flags & SCOPE_FLAGS) == flag) {
  1376   1376   		Tcl_ListObjAppendElement(NULL, resultObj, namePtr);

Changes to generic/tclTestObj.c.

   621    621   	argv[i-4] = Tcl_GetString(objv[i]);
   622    622       }
   623    623       argv[objc-4] = NULL;
   624    624   
   625    625       result = Tcl_GetIndexFromObj((setError? interp : NULL), objv[3],
   626    626   	    argv, "token", INDEX_TEMP_TABLE|(allowAbbrev? 0 : TCL_EXACT),
   627    627   	    &index);
   628         -    Tcl_Free(argv);
          628  +    Tcl_Free((void *)argv);
   629    629       if (result == TCL_OK) {
   630    630   	Tcl_SetIntObj(Tcl_GetObjResult(interp), index);
   631    631       }
   632    632       return result;
   633    633   }
   634    634   
   635    635   /*

Changes to generic/tclThreadAlloc.c.

  1078   1078   {
  1079   1079       unsigned int i;
  1080   1080   
  1081   1081       listLockPtr = TclpNewAllocMutex();
  1082   1082       objLockPtr = TclpNewAllocMutex();
  1083   1083       for (i = 0; i < NBUCKETS; ++i) {
  1084   1084   	bucketInfo[i].blockSize = MINALLOC << i;
  1085         -	bucketInfo[i].maxBlocks = 1 << (NBUCKETS - 1 - i);
         1085  +	bucketInfo[i].maxBlocks = ((size_t)1) << (NBUCKETS - 1 - i);
  1086   1086   	bucketInfo[i].numMove = i < NBUCKETS - 1 ?
  1087   1087   		1 << (NBUCKETS - 2 - i) : 1;
  1088   1088   	bucketInfo[i].lockPtr = TclpNewAllocMutex();
  1089   1089       }
  1090   1090       TclpInitAllocCache();
  1091   1091   }
  1092   1092   

Changes to generic/tclUtil.c.

   877    877   	const char *prevList = list;
   878    878   	int literal;
   879    879   
   880    880   	result = TclFindElement(interp, list, length, &element, &list,
   881    881   		&elSize, &literal);
   882    882   	length -= (list - prevList);
   883    883   	if (result != TCL_OK) {
   884         -	    Tcl_Free(argv);
          884  +	    Tcl_Free((void *)argv);
   885    885   	    return result;
   886    886   	}
   887    887   	if (*element == 0) {
   888    888   	    break;
   889    889   	}
   890    890   	if (i >= size) {
   891         -	    Tcl_Free(argv);
          891  +	    Tcl_Free((void *)argv);
   892    892   	    if (interp != NULL) {
   893    893   		Tcl_SetObjResult(interp, Tcl_NewStringObj(
   894    894   			"internal error in Tcl_SplitList", -1));
   895    895   		Tcl_SetErrorCode(interp, "TCL", "INTERNAL", "Tcl_SplitList",
   896    896   			NULL);
   897    897   	    }
   898    898   	    return TCL_ERROR;

Changes to generic/tclZipfs.c.

  1899   1899       void *clientData,	/* Not used. */
  1900   1900       Tcl_Interp *interp,		/* Current interpreter. */
  1901   1901       int objc,			/* Number of arguments. */
  1902   1902       Tcl_Obj *const objv[])	/* Argument objects. */
  1903   1903   {
  1904   1904       const char *mountPoint;	/* Mount point path. */
  1905   1905       unsigned char *data;
  1906         -    size_t length;
         1906  +    size_t length = 0;
  1907   1907   
  1908   1908       if (objc > 4) {
  1909   1909   	Tcl_WrongNumArgs(interp, 1, objv, "?mountpoint? ?data?");
  1910   1910   	return TCL_ERROR;
  1911   1911       }
  1912   1912       if (objc < 2) {
  1913   1913   	int ret;

Changes to win/tclWinFCmd.c.

   372    372   		 * The MoveFile system call already handles the case of moving
   373    373   		 * a file between filesystems.
   374    374   		 */
   375    375   
   376    376   		Tcl_SetErrno(EXDEV);
   377    377   	    }
   378    378   
   379         -	    Tcl_Free(srcArgv);
   380         -	    Tcl_Free(dstArgv);
          379  +	    Tcl_Free((void *)srcArgv);
          380  +	    Tcl_Free((void *)dstArgv);
   381    381   	}
   382    382   
   383    383   	/*
   384    384   	 * Other types of access failure is that dst is a read-only
   385    385   	 * filesystem, that an open file referred to src or dest, or that src
   386    386   	 * or dest specified the current working directory on the current
   387    387   	 * filesystem. EACCES is returned for those cases.

Changes to win/tclWinInit.c.

   313    313   	    Tcl_DStringInit(&ds);
   314    314   	    (void) Tcl_JoinPath(pathc, pathv, &ds);
   315    315   	    objPtr = TclDStringToObj(&ds);
   316    316   	} else {
   317    317   	    objPtr = Tcl_NewStringObj(buf, -1);
   318    318   	}
   319    319   	Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
   320         -	Tcl_Free(pathv);
          320  +	Tcl_Free((void *)pathv);
   321    321       }
   322    322   }
   323    323   
   324    324   /*
   325    325    *---------------------------------------------------------------------------
   326    326    *
   327    327    * InitializeDefaultLibraryDir --

Changes to win/tclWinSerial.c.

  1717   1717   	badXchar:
  1718   1718   	    if (interp != NULL) {
  1719   1719   		Tcl_SetObjResult(interp, Tcl_NewStringObj(
  1720   1720   			"bad value for -xchar: should be a list of"
  1721   1721   			" two elements with each a single 8-bit character", -1));
  1722   1722   		Tcl_SetErrorCode(interp, "TCL", "VALUE", "XCHAR", NULL);
  1723   1723   	    }
  1724         -	    Tcl_Free(argv);
         1724  +	    Tcl_Free((void *)argv);
  1725   1725   	    return TCL_ERROR;
  1726   1726   	}
  1727   1727   
  1728   1728   	/*
  1729   1729   	 * These dereferences are safe, even in the zero-length string cases,
  1730   1730   	 * because that just makes the xon/xoff character into NUL. When the
  1731   1731   	 * character looks like it is UTF-8 encoded, decode it before casting
................................................................................
  1748   1748   	    dcb.XonChar = (char) character;
  1749   1749   	    charLen = Tcl_UtfToUniChar(argv[1], &character);
  1750   1750   	    if ((character > 0xFF) || argv[1][charLen]) {
  1751   1751   		goto badXchar;
  1752   1752   	    }
  1753   1753   	    dcb.XoffChar = (char) character;
  1754   1754   	}
  1755         -	Tcl_Free(argv);
         1755  +	Tcl_Free((void *)argv);
  1756   1756   
  1757   1757   	if (!SetCommState(infoPtr->handle, &dcb)) {
  1758   1758   	    goto setStateFailed;
  1759   1759   	}
  1760   1760   	return TCL_OK;
  1761   1761       }
  1762   1762   
................................................................................
  1773   1773   	if ((argc % 2) == 1) {
  1774   1774   	    if (interp != NULL) {
  1775   1775   		Tcl_SetObjResult(interp, Tcl_ObjPrintf(
  1776   1776   			"bad value \"%s\" for -ttycontrol: should be "
  1777   1777   			"a list of signal,value pairs", value));
  1778   1778   		Tcl_SetErrorCode(interp, "TCL", "VALUE", "TTYCONTROL", NULL);
  1779   1779   	    }
  1780         -	    Tcl_Free(argv);
         1780  +	    Tcl_Free((void *)argv);
  1781   1781   	    return TCL_ERROR;
  1782   1782   	}
  1783   1783   
  1784   1784   	for (i = 0; i < argc - 1; i += 2) {
  1785   1785   	    if (Tcl_GetBoolean(interp, argv[i+1], &flag) == TCL_ERROR) {
  1786   1786   		result = TCL_ERROR;
  1787   1787   		break;
................................................................................
  1831   1831   			    NULL);
  1832   1832   		}
  1833   1833   		result = TCL_ERROR;
  1834   1834   		break;
  1835   1835   	    }
  1836   1836   	}
  1837   1837   
  1838         -	Tcl_Free(argv);
         1838  +	Tcl_Free((void *)argv);
  1839   1839   	return result;
  1840   1840       }
  1841   1841   
  1842   1842       /*
  1843   1843        * Option -sysbuffer {read_size write_size}
  1844   1844        * Option -sysbuffer read_size
  1845   1845        */
................................................................................
  1857   1857   	if (argc == 1) {
  1858   1858   	    inSize = atoi(argv[0]);
  1859   1859   	    outSize = infoPtr->sysBufWrite;
  1860   1860   	} else if (argc == 2) {
  1861   1861   	    inSize  = atoi(argv[0]);
  1862   1862   	    outSize = atoi(argv[1]);
  1863   1863   	}
  1864         -	Tcl_Free(argv);
         1864  +	Tcl_Free((void *)argv);
  1865   1865   
  1866   1866   	if ((argc < 1) || (argc > 2) || (inSize <= 0) || (outSize <= 0)) {
  1867   1867   	    if (interp != NULL) {
  1868   1868   		Tcl_SetObjResult(interp, Tcl_ObjPrintf(
  1869   1869   			"bad value \"%s\" for -sysbuffer: should be "
  1870   1870   			"a list of one or two integers > 0", value));
  1871   1871   		Tcl_SetErrorCode(interp, "TCL", "VALUE", "SYS_BUFFER", NULL);