summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-04-17 14:49:53 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-04-17 14:49:53 (GMT)
commit7ab521d768effeec66e8d06abf0067ce0652a57f (patch)
treed38a0997ec4141e501a5f19512dfe1445d8c4404 /unix
parent3943396d1d7a64194d6babf11bbf7db8ab76be16 (diff)
downloadtcl-7ab521d768effeec66e8d06abf0067ce0652a57f.zip
tcl-7ab521d768effeec66e8d06abf0067ce0652a57f.tar.gz
tcl-7ab521d768effeec66e8d06abf0067ce0652a57f.tar.bz2
Eliminate use of (VOID*) casts when calling memset or memcpy.
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixInit.c4
-rw-r--r--unix/tclUnixTest.c6
-rw-r--r--unix/tclUnixTime.c8
3 files changed, 8 insertions, 10 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 3568bd6..854624f 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclUnixInit.c,v 1.68 2007/02/08 23:11:21 hobbs Exp $
+ * RCS: @(#) $Id: tclUnixInit.c,v 1.69 2007/04/17 14:49:53 dkf Exp $
*/
#include "tclInt.h"
@@ -560,7 +560,7 @@ TclpInitLibraryPath(
*encodingPtr = Tcl_GetEncoding(NULL, NULL);
str = Tcl_GetStringFromObj(pathPtr, lengthPtr);
*valuePtr = ckalloc((unsigned int) (*lengthPtr)+1);
- memcpy((VOID *) *valuePtr, (VOID *) str, (size_t)(*lengthPtr)+1);
+ memcpy(*valuePtr, str, (size_t)(*lengthPtr)+1);
Tcl_DecrRefCount(pathPtr);
}
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c
index eb339aa..acfa5fc 100644
--- a/unix/tclUnixTest.c
+++ b/unix/tclUnixTest.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixTest.c,v 1.24 2007/04/16 13:36:36 dkf Exp $
+ * RCS: @(#) $Id: tclUnixTest.c,v 1.25 2007/04/17 14:49:53 dkf Exp $
*/
#include "tclInt.h"
@@ -275,7 +275,7 @@ TestfilehandlerCmd(
return TCL_ERROR;
}
- memset((VOID *) buffer, 'a', 4000);
+ memset(buffer, 'a', 4000);
while (write(GetFd(pipePtr->writeFile), buffer, 4000) > 0) {
/* Empty loop body. */
}
@@ -288,7 +288,7 @@ TestfilehandlerCmd(
return TCL_ERROR;
}
- memset((VOID *) buffer, 'b', 10);
+ memset(buffer, 'b', 10);
TclFormatInt(buf, write(GetFd(pipePtr->writeFile), buffer, 10));
Tcl_SetResult(interp, buf, TCL_VOLATILE);
} else if (strcmp(argv[1], "oneevent") == 0) {
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index 660a831..d4f2067 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixTime.c,v 1.29 2007/04/16 13:36:36 dkf Exp $
+ * RCS: @(#) $Id: tclUnixTime.c,v 1.30 2007/04/17 14:49:53 dkf Exp $
*/
#include "tclInt.h"
@@ -428,8 +428,7 @@ TclpGmtime(
gmtime_r(timePtr, &(tsdPtr->gmtime_buf));
#else
Tcl_MutexLock(&tmMutex);
- memcpy((VOID *) &(tsdPtr->gmtime_buf), (VOID *) gmtime(timePtr),
- sizeof(struct tm));
+ memcpy(&(tsdPtr->gmtime_buf), gmtime(timePtr), sizeof(struct tm));
Tcl_MutexUnlock(&tmMutex);
#endif
@@ -480,8 +479,7 @@ TclpLocaltime(
localtime_r(timePtr, &(tsdPtr->localtime_buf));
#else
Tcl_MutexLock(&tmMutex);
- memcpy((VOID *) &(tsdPtr->localtime_buf), (VOID *) localtime(timePtr),
- sizeof(struct tm));
+ memcpy(&(tsdPtr->localtime_buf), localtime(timePtr), sizeof(struct tm));
Tcl_MutexUnlock(&tmMutex);
#endif