summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixThrd.c')
-rw-r--r--unix/tclUnixThrd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index aa5926e..c67495e 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -222,7 +222,7 @@ TclpThreadCreate(
Tcl_ThreadId *idPtr, /* Return, the ID of the thread */
Tcl_ThreadCreateProc *proc, /* Main() function of the thread */
ClientData clientData, /* The one argument to Main() */
- int stackSize, /* Size of stack for the new thread */
+ TCL_HASH_TYPE stackSize, /* Size of stack for the new thread */
int flags) /* Flags controlling behaviour of the new
* thread. */
{
@@ -236,7 +236,7 @@ TclpThreadCreate(
#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE
if (stackSize != TCL_THREAD_STACK_DEFAULT) {
- pthread_attr_setstacksize(&attr, stackSize);
+ pthread_attr_setstacksize(&attr, (size_t)stackSize);
#ifdef TCL_THREAD_STACK_MIN
} else {
/*
@@ -255,7 +255,7 @@ TclpThreadCreate(
result = pthread_attr_getstacksize(&attr, &size);
if (!result && (size < TCL_THREAD_STACK_MIN)) {
- pthread_attr_setstacksize(&attr, (size_t) TCL_THREAD_STACK_MIN);
+ pthread_attr_setstacksize(&attr, (size_t)TCL_THREAD_STACK_MIN);
}
#endif /* TCL_THREAD_STACK_MIN */
}
@@ -827,7 +827,7 @@ TclpInetNtoa(
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
unsigned char *b = (unsigned char*) &addr.s_addr;
- sprintf(tsdPtr->nabuf, "%u.%u.%u.%u", b[0], b[1], b[2], b[3]);
+ snprintf(tsdPtr->nabuf, sizeof(tsdPtr->nabuf), "%u.%u.%u.%u", b[0], b[1], b[2], b[3]);
return tsdPtr->nabuf;
#else
return inet_ntoa(addr);